summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-30 22:31:43 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-30 22:31:43 +0200
commit66d34b83d27a72ed4cc2598527c25dfb8c1a873c (patch)
tree195c44b6d76b906e065cdc7f0d2d96ed7680a2c1
parentChanged return type from GetPrimaryPotion() and GetSecondaryPotion() (diff)
downloadcuberite-66d34b83d27a72ed4cc2598527c25dfb8c1a873c.tar
cuberite-66d34b83d27a72ed4cc2598527c25dfb8c1a873c.tar.gz
cuberite-66d34b83d27a72ed4cc2598527c25dfb8c1a873c.tar.bz2
cuberite-66d34b83d27a72ed4cc2598527c25dfb8c1a873c.tar.lz
cuberite-66d34b83d27a72ed4cc2598527c25dfb8c1a873c.tar.xz
cuberite-66d34b83d27a72ed4cc2598527c25dfb8c1a873c.tar.zst
cuberite-66d34b83d27a72ed4cc2598527c25dfb8c1a873c.zip
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua1
-rw-r--r--MCServer/Plugins/APIDump/Classes/BlockEntities.lua26
2 files changed, 27 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index e65da1d16..2a592e1e1 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -2244,6 +2244,7 @@ end
DigBlock = { Params = "X, Y, Z", Return = "", Notes = "Replaces the specified block with air, without dropping the usual pickups for the block. Wakes up the simulators for the block and its neighbors." },
DoExplosionAt = { Params = "Force, X, Y, Z, CanCauseFire, Source, SourceData", Return = "", Notes = "Creates an explosion of the specified relative force in the specified position. If CanCauseFire is set, the explosion will set blocks on fire, too. The Source parameter specifies the source of the explosion, one of the esXXX constants. The SourceData parameter is specific to each source type, usually it provides more info about the source." },
DoWithBlockEntityAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a block entity at the specified coords, calls the CallbackFunction with the {{cBlockEntity}} parameter representing the block entity. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cBlockEntity|BlockEntity}}, [CallbackData])</pre> The function returns false if there is no block entity, or if there is, it returns the bool value that the callback has returned. Use {{tolua}}.cast() to cast the Callback's BlockEntity parameter to the correct {{cBlockEntity}} descendant." },
+ DoWithBeaconAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a beacon at the specified coords, calls the CallbackFunction with the {{cBeaconEntity}} parameter representing the beacon. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cBeaconEntity|BeaconEntity}}, [CallbackData])</pre> The function returns false if there is no beacon, or if there is, it returns the bool value that the callback has returned." },
DoWithChestAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a chest at the specified coords, calls the CallbackFunction with the {{cChestEntity}} parameter representing the chest. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cChestEntity|ChestEntity}}, [CallbackData])</pre> The function returns false if there is no chest, or if there is, it returns the bool value that the callback has returned." },
DoWithCommandBlockAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a command block at the specified coords, calls the CallbackFunction with the {{cCommandBlockEntity}} parameter representing the command block. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cCommandBlockEntity|CommandBlockEntity}}, [CallbackData])</pre> The function returns false if there is no command block, or if there is, it returns the bool value that the callback has returned." },
DoWithDispenserAt = { Params = "X, Y, Z, CallbackFunction, [CallbackData]", Return = "bool", Notes = "If there is a dispenser at the specified coords, calls the CallbackFunction with the {{cDispenserEntity}} parameter representing the dispenser. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cDispenserEntity|DispenserEntity}}, [CallbackData])</pre> The function returns false if there is no dispenser, or if there is, it returns the bool value that the callback has returned." },
diff --git a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
index de42f66df..294d47295 100644
--- a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
+++ b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua
@@ -50,6 +50,32 @@ return
},
},
+ cBeaconEntity =
+ {
+ Desc = [[
+ A beacon entity is a {{cBlockEntityWithItems|cBlockEntityWithItems}} descendant that represents a beacon
+ in the world.
+ ]],
+
+ Inherits = "cBlockEntityWithItems",
+
+ Functions =
+ {
+ IsActive = { Params = "", Return = "bool", Notes = "Is the beacon active?" },
+ GetBeaconLevel = { Params = "", Return = "number", Notes = "Returns the beacon level. (0 - 4)" },
+ GetPrimaryPotion = { Params = "", Return = "EffectType", Notes = "Returns the primary potion." },
+ GetSecondaryPotion = { Params = "", Return = "EffectType", Notes = "Returns the secondary potion." },
+ SelectPrimaryPotion = { Params = "EffectType", Return = "bool", Notes = "Select the primary potion. Returns false when the potion is invalid." },
+ SelectSecondaryPotion = { Params = "EffectType", Return = "bool", Notes = "Select the secondary potion. Returns false when the potion is invalid." },
+ CalculatePyramidLevel = { Params = "", Return = "number", Notes = "Calculate the amount of layers the pyramid below the beacon has." },
+ IsBeaconBlocked = { Params = "", Return = "bool", Notes = "Is the beacon blocked by non-transparent blocks that are higher than the beacon?" },
+ UpdateBeacon = { Params = "", Return = "", Notes = "Update the beacon." },
+ GiveEffects = { Params = "", Return = "", Notes = "Give the near-players the effects." },
+ IsMineralBlock = { Params = "BLOCKTYPE", Return = "bool", Notes = "Returns true if the block is a diamond block, a golden block, an iron block or an emerald block." },
+ IsValidPotion = { Params = "EffectType", Return = "bool", Notes = "Returns true if the potion can be used." },
+ },
+ },
+
cChestEntity =
{
Desc = [[