summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/APIDump/Classes/BlockEntities.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Server/Plugins/APIDump/Classes/BlockEntities.lua')
-rw-r--r--Server/Plugins/APIDump/Classes/BlockEntities.lua1433
1 files changed, 1240 insertions, 193 deletions
diff --git a/Server/Plugins/APIDump/Classes/BlockEntities.lua b/Server/Plugins/APIDump/Classes/BlockEntities.lua
index 4e19e03c0..7616d7180 100644
--- a/Server/Plugins/APIDump/Classes/BlockEntities.lua
+++ b/Server/Plugins/APIDump/Classes/BlockEntities.lua
@@ -1,5 +1,160 @@
return
{
+ cBeaconEntity =
+ {
+ Desc = [[
+ A beacon entity is a {{cBlockEntityWithItems}} descendant that represents a beacon
+ in the world.
+ ]],
+ Functions =
+ {
+ CalculatePyramidLevel =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Calculate the amount of layers the pyramid below the beacon has.",
+ },
+ GetBeaconLevel =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the beacon level. (0 - 4)",
+ },
+ GetPrimaryEffect =
+ {
+ Returns =
+ {
+ {
+ Name = "EffectType",
+ Type = "cEntityEffect#eType",
+ },
+ },
+ Notes = "Returns the primary effect.",
+ },
+ GetSecondaryEffect =
+ {
+ Returns =
+ {
+ {
+ Name = "EffectType",
+ Type = "cEntityEffect#eType",
+ },
+ },
+ Notes = "Returns the secondary effect.",
+ },
+ GiveEffects =
+ {
+ Notes = "Give the near-players the effects.",
+ },
+ IsActive =
+ {
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Is the beacon active?",
+ },
+ IsBeaconBlocked =
+ {
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Is the beacon blocked by non-transparent blocks that are higher than the beacon?",
+ },
+ IsMineralBlock =
+ {
+ IsStatic = true,
+ Params =
+ {
+ {
+ Name = "BlockType",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Returns true if the block is a diamond block, a golden block, an iron block or an emerald block.",
+ },
+ IsValidEffect =
+ {
+ IsStatic = true,
+ Params =
+ {
+ {
+ Name = "EffectType",
+ Type = "cEntityEffect#eType",
+ },
+ {
+ Name = "BeaconLevel",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Returns true if the effect can be used.",
+ },
+ SetPrimaryEffect =
+ {
+ Params =
+ {
+ {
+ Name = "EffectType",
+ Type = "cEntityEffect#eType",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Select the primary effect. Returns false when the effect is invalid.",
+ },
+ SetSecondaryEffect =
+ {
+ Params =
+ {
+ {
+ Name = "EffectType",
+ Type = "cEntityEffect#eType",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Select the secondary effect. Returns false when the effect is invalid.",
+ },
+ UpdateBeacon =
+ {
+ Notes = "Update the beacon.",
+ },
+ },
+ Inherits = "cBlockEntityWithItems",
+ },
cBlockEntity =
{
Desc = [[
@@ -7,22 +162,111 @@ return
or contents of a chest. All block entities are also saved in the chunk data of the chunk they reside in.
The cBlockEntity class acts as a common ancestor for all the individual block entities.
]],
-
Functions =
{
- GetBlockType = { Params = "", Return = "BLOCKTYPE", Notes = "Returns the blocktype which is represented by this blockentity. This is the primary means of type-identification" },
- GetChunkX = { Params = "", Return = "number", Notes = "Returns the chunk X-coord of the block entity's chunk" },
- GetChunkZ = { Params = "", Return = "number", Notes = "Returns the chunk Z-coord of the block entity's chunk" },
- GetPos = { Params = "", Return = "{{Vector3i}}", Notes = "Returns the name of the parent class, or empty string if no parent class." },
- GetPosX = { Params = "", Return = "number", Notes = "Returns the block X-coord of the block entity's block" },
- GetPosY = { Params = "", Return = "number", Notes = "Returns the block Y-coord of the block entity's block" },
- GetPosZ = { Params = "", Return = "number", Notes = "Returns the block Z-coord of the block entity's block" },
- GetRelX = { Params = "", Return = "number", Notes = "Returns the relative X coord of the block entity's block within the chunk" },
- GetRelZ = { Params = "", Return = "number", Notes = "Returns the relative Z coord of the block entity's block within the chunk" },
- GetWorld = { Params = "", Return = "{{cWorld|cWorld}}", Notes = "Returns the world to which the block entity belongs" },
+ GetBlockType =
+ {
+ Returns =
+ {
+ {
+ Name = "BLOCKTYPE",
+ Type = "number",
+ },
+ },
+ Notes = "Returns the blocktype which is represented by this blockentity. This is the primary means of type-identification",
+ },
+ GetChunkX =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the chunk X-coord of the block entity's chunk",
+ },
+ GetChunkZ =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the chunk Z-coord of the block entity's chunk",
+ },
+ GetPos =
+ {
+ Returns =
+ {
+ {
+ Type = "Vector3i",
+ },
+ },
+ Notes = "Returns the name of the parent class, or empty string if no parent class.",
+ },
+ GetPosX =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the block X-coord of the block entity's block",
+ },
+ GetPosY =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the block Y-coord of the block entity's block",
+ },
+ GetPosZ =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the block Z-coord of the block entity's block",
+ },
+ GetRelX =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the relative X coord of the block entity's block within the chunk",
+ },
+ GetRelZ =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the relative Z coord of the block entity's block within the chunk",
+ },
+ GetWorld =
+ {
+ Returns =
+ {
+ {
+ Type = "cWorld",
+ },
+ },
+ Notes = "Returns the world to which the block entity belongs",
+ },
},
},
-
cBlockEntityWithItems =
{
Desc = [[
@@ -32,51 +276,95 @@ return
number, or by XY coords within the grid. If a UI window is opened for this block entity, the item storage
is monitored for changes and the changes are immediately sent to clients of the UI window.
]],
-
- Inherits = "cBlockEntity",
-
Functions =
{
- GetContents = { Params = "", Return = "{{cItemGrid}}", Notes = "Returns the cItemGrid object representing the items stored within this block entity" },
+ GetContents =
+ {
+ Returns =
+ {
+ {
+ Type = "cItemGrid",
+ },
+ },
+ Notes = "Returns the cItemGrid object representing the items stored within this block entity",
+ },
GetSlot =
{
- { Params = "SlotNum", Return = "{{cItem}}", Notes = "Returns the cItem for the specified slot number. Returns nil for invalid slot numbers" },
- { Params = "X, Y", Return = "{{cItem}}", Notes = "Returns the cItem for the specified slot coords. Returns nil for invalid slot coords" },
+ {
+ Params =
+ {
+ {
+ Name = "SlotNum",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the cItem for the specified slot number. Returns nil for invalid slot numbers",
+ },
+ {
+ Params =
+ {
+ {
+ Name = "X",
+ Type = "number",
+ },
+ {
+ Name = "Y",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the cItem for the specified slot coords. Returns nil for invalid slot coords",
+ },
},
SetSlot =
{
- { Params = "SlotNum, {{cItem}}", Return = "", Notes = "Sets the cItem for the specified slot number. Ignored if invalid slot number" },
- { Params = "X, Y, {{cItem}}", Return = "", Notes = "Sets the cItem for the specified slot coords. Ignored if invalid slot coords" },
+ {
+ Params =
+ {
+ {
+ Name = "SlotNum",
+ Type = "number",
+ },
+ {
+ Name = "cItem",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the cItem for the specified slot number. Ignored if invalid slot number",
+ },
+ {
+ Params =
+ {
+ {
+ Name = "X",
+ Type = "number",
+ },
+ {
+ Name = "Y",
+ Type = "number",
+ },
+ {
+ Name = "cItem",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the cItem for the specified slot coords. Ignored if invalid slot coords",
+ },
},
},
+ Inherits = "cBlockEntity",
},
-
- cBeaconEntity =
- {
- Desc = [[
- A beacon entity is a {{cBlockEntityWithItems}} descendant that represents a beacon
- in the world.
- ]],
-
- Inherits = "cBlockEntityWithItems",
-
- Functions =
- {
- CalculatePyramidLevel = { Params = "", Return = "number", Notes = "Calculate the amount of layers the pyramid below the beacon has." },
- GetBeaconLevel = { Params = "", Return = "number", Notes = "Returns the beacon level. (0 - 4)" },
- GetPrimaryEffect = { Params = "", Return = "{{cEntityEffect#eType|EffectType}}", Notes = "Returns the primary effect." },
- GetSecondaryEffect = { Params = "", Return = "{{cEntityEffect#eType|EffectType}}", Notes = "Returns the secondary effect." },
- GiveEffects = { Params = "", Return = "", Notes = "Give the near-players the effects." },
- IsActive = { Params = "", Return = "bool", Notes = "Is the beacon active?" },
- IsBeaconBlocked = { Params = "", Return = "bool", Notes = "Is the beacon blocked by non-transparent blocks that are higher than the beacon?" },
- IsMineralBlock = { Params = "BLOCKTYPE", Return = "bool", IsStatic = true, Notes = "Returns true if the block is a diamond block, a golden block, an iron block or an emerald block." },
- IsValidEffect = { Params = "{{cEntityEffect#eType|EffectType}}, BeaconLevel", Return = "boolean", IsStatic = true, Notes = "Returns true if the effect can be used." },
- SetPrimaryEffect = { Params = "{{cEntityEffect#eType|EffectType}}", Return = "bool", Notes = "Select the primary effect. Returns false when the effect is invalid." },
- SetSecondaryEffect = { Params = "{{cEntityEffect#eType|EffectType}}", Return = "bool", Notes = "Select the secondary effect. Returns false when the effect is invalid." },
- UpdateBeacon = { Params = "", Return = "", Notes = "Update the beacon." },
- },
- },
-
cBrewingstandEntity =
{
Desc = [[
@@ -86,26 +374,154 @@ return
]],
Functions =
{
- GetBrewingTimeLeft = { Params = "", Return = "number", Notes = "Returns the time until the current items finishes brewing, in ticks" },
- GetTimeBrewed = { Params = "", Return = "number", Notes = "Returns the time that the current items has been brewing, in ticks" },
- GetLeftBottleSlot = { Params = "", Return = "{{cItem}}", Notes = "Returns the item in the left bottle slot" },
- GetMiddleBottleSlot = { Params = "", Return = "{{cItem}}", Notes = "Returns the item in the middle bottle slot" },
- GetRightBottleSlot = { Params = "", Return = "{{cItem}}", Notes = "Returns the item in the right bottle slot" },
- GetIndgredientSlot = { Params = "", Return = "{{cItem}}", Notes = "Returns the item in the ingredient slot" },
- GetResultItem = { Params = "number", Return = "{{cItem}}", Notes = "Returns the expected result item for the given slot number." },
- SetLeftBottleSlot = { Params = "{{cItem|LeftSlot}}", Return = "", Notes = "Sets the item in the left bottle slot" },
- SetMiddleBottleSlot = { Params = "{{cItem|MiddleSlot}}", Return = "", Notes = "Sets the item in the middle bottle slot" },
- SetRightBottleSlot = { Params = "{{cItem|RightSlot}}", Return = "", Notes = "Sets the item in the right bottle slot" },
- SetIngredientSlot = { Params = "{{cItem|Ingredient}}", Return = "", Notes = "Sets the item in the ingredient bottle slot" },
+ GetBrewingTimeLeft =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the time until the current items finishes brewing, in ticks",
+ },
+ GetIndgredientSlot =
+ {
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item in the ingredient slot",
+ },
+ GetLeftBottleSlot =
+ {
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item in the left bottle slot",
+ },
+ GetMiddleBottleSlot =
+ {
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item in the middle bottle slot",
+ },
+ GetResultItem =
+ {
+ Params =
+ {
+ {
+ Name = "SlotNumber",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the expected result item for the given slot number.",
+ },
+ GetRightBottleSlot =
+ {
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item in the right bottle slot",
+ },
+ GetTimeBrewed =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the time that the current items has been brewing, in ticks",
+ },
+ SetIngredientSlot =
+ {
+ Params =
+ {
+ {
+ Name = "Ingredient",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the item in the ingredient bottle slot",
+ },
+ SetLeftBottleSlot =
+ {
+ Params =
+ {
+ {
+ Name = "LeftSlot",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the item in the left bottle slot",
+ },
+ SetMiddleBottleSlot =
+ {
+ Params =
+ {
+ {
+ Name = "MiddleSlot",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the item in the middle bottle slot",
+ },
+ SetRightBottleSlot =
+ {
+ Params =
+ {
+ {
+ Name = "RightSlot",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the item in the right bottle slot",
+ },
},
Constants =
{
- bsLeftBottle = { Notes = "Index of the left bottle slot" },
- bsMiddleBottle = { Notes = "Index of the middle bottle slot" },
- bsRightBottle = { Notes = "Index of the right bottle slot" },
- bsIngredient = { Notes = "Index of the ingredient slot" },
- ContentsWidth = { Notes = "Width (X) of the {{cItemGrid|cItemGrid}} representing the contents" },
- ContentsHeight = { Notes = "Height (Y) of the {{cItemGrid|cItemGrid}} representing the contents" },
+ bsIngredient =
+ {
+ Notes = "Index of the ingredient slot",
+ },
+ bsLeftBottle =
+ {
+ Notes = "Index of the left bottle slot",
+ },
+ bsMiddleBottle =
+ {
+ Notes = "Index of the middle bottle slot",
+ },
+ bsRightBottle =
+ {
+ Notes = "Index of the right bottle slot",
+ },
+ ContentsHeight =
+ {
+ Notes = "Height (Y) of the {{cItemGrid|cItemGrid}} representing the contents",
+ },
+ ContentsWidth =
+ {
+ Notes = "Width (X) of the {{cItemGrid|cItemGrid}} representing the contents",
+ },
},
ConstantGroups =
{
@@ -115,9 +531,8 @@ return
TextBefore = "When using the GetSlot() or SetSlot() function, use these constants for slot index:",
},
},
- Inherits = "cBlockEntityWithItems"
- }, -- cBrewingstandEntity
-
+ Inherits = "cBlockEntityWithItems",
+ },
cChestEntity =
{
Desc = [[
@@ -128,13 +543,16 @@ return
To manipulate a chest already in the game, you need to use {{cWorld}}'s callback mechanism with
either DoWithChestAt() or ForEachChestInChunk() function. See the code example below
]],
-
- Inherits = "cBlockEntityWithItems",
-
Constants =
{
- ContentsHeight = { Notes = "Height of the contents' {{cItemGrid|ItemGrid}}, as required by the parent class, {{cBlockEntityWithItems}}" },
- ContentsWidth = { Notes = "Width of the contents' {{cItemGrid|ItemGrid}}, as required by the parent class, {{cBlockEntityWithItems}}" },
+ ContentsHeight =
+ {
+ Notes = "Height of the contents' {{cItemGrid|ItemGrid}}, as required by the parent class, {{cBlockEntityWithItems}}",
+ },
+ ContentsWidth =
+ {
+ Notes = "Width of the contents' {{cItemGrid|ItemGrid}}, as required by the parent class, {{cBlockEntityWithItems}}",
+ },
},
AdditionalInfo =
{
@@ -154,24 +572,67 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
</pre>
]],
},
- }, -- AdditionalInfo
- }, -- cChestEntity
-
-
+ },
+ Inherits = "cBlockEntityWithItems",
+ },
cCommandBlockEntity =
{
- Inherits = "cBlockEntity",
Functions =
{
- Activate = { Params = "", Return = "", Notes = "Sets the command block to execute a command in the next tick" },
- GetCommand = { Params = "", Return = "string", Notes = "Retrieves stored command" },
- GetLastOutput = { Params = "", Return = "string", Notes = "Retrieves the last line of output generated by the command block" },
- GetResult = { Params = "", Return = "number", Notes = "Retrieves the result (signal strength) of the last operation" },
- SetCommand = { Params = "Cmd", Return = "string", Notes = "Sets the command" },
+ Activate =
+ {
+ Notes = "Sets the command block to execute a command in the next tick",
+ },
+ GetCommand =
+ {
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Retrieves stored command",
+ },
+ GetLastOutput =
+ {
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Retrieves the last line of output generated by the command block",
+ },
+ GetResult =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Retrieves the result (signal strength) of the last operation",
+ },
+ SetCommand =
+ {
+ Params =
+ {
+ {
+ Name = "Command",
+ Type = "string",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Sets the command",
+ },
},
- }, -- cCommandBlockEntity
-
-
+ Inherits = "cBlockEntity",
+ },
cDispenserEntity =
{
Desc = [[
@@ -179,14 +640,66 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
functionality is implemented in the {{cDropSpenserEntity}} class that represents
the behavior common with the {{cDropperEntity|dropper}} block entity.
]],
- Inherits = "cDropSpenserEntity",
Functions =
{
- GetShootVector = { Params = "BlockMeta", Return = "{{Vector3d}}", IsStatic = true, Notes = "Returns a unit vector in the cardinal direction of where the dispenser with the specified meta would be facing." },
- SpawnProjectileFromDispenser = { Params = "BlockX, BlockY, BlockZ, {{cProjectileEntity#eKind|Kind}}, Speed, {{cItem|Item}}", Return = "number", Notes = "Spawns a projectile of the given kind in front of the dispenser with the specified speed. Returns the UniqueID of the spawned projectile, or {{cEntity#INVALID_ID|cEntity.INVALID_ID}} on failure." },
+ GetShootVector =
+ {
+ IsStatic = true,
+ Params =
+ {
+ {
+ Name = "BlockMeta",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "Vector3d",
+ },
+ },
+ Notes = "Returns a unit vector in the cardinal direction of where the dispenser with the specified meta would be facing.",
+ },
+ SpawnProjectileFromDispenser =
+ {
+ Params =
+ {
+ {
+ Name = "BlockX",
+ Type = "number",
+ },
+ {
+ Name = "BlockY",
+ Type = "number",
+ },
+ {
+ Name = "BlockZ",
+ Type = "number",
+ },
+ {
+ Name = "Kind",
+ Type = "cProjectileEntity#eKind",
+ },
+ {
+ Name = "Speed",
+ Type = "Vector3d",
+ },
+ {
+ Name = "Item",
+ Type = "cItem",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Spawns a projectile of the given kind in front of the dispenser with the specified speed. Returns the UniqueID of the spawned projectile, or {{cEntity#INVALID_ID|cEntity.INVALID_ID}} on failure.",
+ },
},
+ Inherits = "cDropSpenserEntity",
},
-
cDropperEntity =
{
Desc = [[
@@ -197,9 +710,7 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
An object of this class can be created from scratch when generating chunks ({{OnChunkGenerated|OnChunkGenerated}} and {{OnChunkGenerating|OnChunkGenerating}} hooks).
]],
Inherits = "cDropSpenserEntity",
- }, -- cDropperEntity
-
-
+ },
cDropSpenserEntity =
{
Desc = [[
@@ -207,19 +718,115 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
]],
Functions =
{
- Activate = { Params = "", Return = "", Notes = "Sets the block entity to dropspense an item in the next tick" },
- AddDropSpenserDir = { Params = "BlockX, BlockY, BlockZ, BlockMeta", Return = "BlockX, BlockY, BlockZ", Notes = "Adjusts the block coords to where the dropspenser items materialize" },
- SetRedstonePower = { Params = "IsPowered", Return = "", Notes = "Sets the redstone status of the dropspenser. If the redstone power goes from off to on, the dropspenser will be activated" },
+ Activate =
+ {
+ Notes = "Sets the block entity to dropspense an item in the next tick",
+ },
+ AddDropSpenserDir =
+ {
+ Params =
+ {
+ {
+ Name = "BlockX",
+ Type = "number",
+ },
+ {
+ Name = "BlockY",
+ Type = "number",
+ },
+ {
+ Name = "BlockZ",
+ Type = "number",
+ },
+ {
+ Name = "BlockMeta",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Name = "BlockX",
+ Type = "number",
+ },
+ {
+ Name = "BlockY",
+ Type = "number",
+ },
+ {
+ Name = "BlockZ",
+ Type = "number",
+ },
+ },
+ Notes = "Adjusts the block coords to where the dropspenser items materialize",
+ },
+ SetRedstonePower =
+ {
+ Params =
+ {
+ {
+ Name = "IsPowered",
+ Type = "boolean",
+ },
+ },
+ Notes = "Sets the redstone status of the dropspenser. If the redstone power goes from off to on, the dropspenser will be activated",
+ },
},
Constants =
{
- ContentsWidth = { Notes = "Width (X) of the {{cItemGrid}} representing the contents" },
- ContentsHeight = { Notes = "Height (Y) of the {{cItemGrid}} representing the contents" },
+ ContentsHeight =
+ {
+ Notes = "Height (Y) of the {{cItemGrid}} representing the contents",
+ },
+ ContentsWidth =
+ {
+ Notes = "Width (X) of the {{cItemGrid}} representing the contents",
+ },
+ },
+ Inherits = "cBlockEntityWithItems",
+ },
+ cFlowerPotEntity =
+ {
+ Desc = [[
+ This class represents a flower pot entity in the world.
+ ]],
+ Functions =
+ {
+ GetItem =
+ {
+ Returns =
+ {
+ {
+ Name = "Item",
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item in the flower pot.",
+ },
+ IsItemInPot =
+ {
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Is a flower in the pot?",
+ },
+ SetItem =
+ {
+ Params =
+ {
+ {
+ Name = "Item",
+ Type = "cItem",
+ },
+ },
+ Notes = "Set the item in the flower pot",
+ },
},
- Inherits = "cBlockEntityWithItems";
- }, -- cDropSpenserEntity
-
-
+ Inherits = "cBlockEntity",
+ },
cFurnaceEntity =
{
Desc = [[
@@ -229,24 +836,132 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
]],
Functions =
{
- GetCookTimeLeft = { Params = "", Return = "number", Notes = "Returns the time until the current item finishes cooking, in ticks" },
- GetFuelBurnTimeLeft = { Params = "", Return = "number", Notes = "Returns the time until the current fuel is depleted, in ticks" },
- GetFuelSlot = { Params = "", Return = "{{cItem|cItem}}", Notes = "Returns the item in the fuel slot" },
- GetInputSlot = { Params = "", Return = "{{cItem|cItem}}", Notes = "Returns the item in the input slot" },
- GetOutputSlot = { Params = "", Return = "{{cItem|cItem}}", Notes = "Returns the item in the output slot" },
- GetTimeCooked = { Params = "", Return = "number", Notes = "Returns the time that the current item has been cooking, in ticks" },
- HasFuelTimeLeft = { Params = "", Return = "bool", Notes = "Returns true if there's time before the current fuel is depleted" },
- SetFuelSlot = { Params = "{{cItem|cItem}}", Return = "", Notes = "Sets the item in the fuel slot" },
- SetInputSlot = { Params = "{{cItem|cItem}}", Return = "", Notes = "Sets the item in the input slot" },
- SetOutputSlot = { Params = "{{cItem|cItem}}", Return = "", Notes = "Sets the item in the output slot" },
+ GetCookTimeLeft =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the time until the current item finishes cooking, in ticks",
+ },
+ GetFuelBurnTimeLeft =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the time until the current fuel is depleted, in ticks",
+ },
+ GetFuelSlot =
+ {
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item in the fuel slot",
+ },
+ GetInputSlot =
+ {
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item in the input slot",
+ },
+ GetOutputSlot =
+ {
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item in the output slot",
+ },
+ GetTimeCooked =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the time that the current item has been cooking, in ticks",
+ },
+ HasFuelTimeLeft =
+ {
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Returns true if there's time before the current fuel is depleted",
+ },
+ SetFuelSlot =
+ {
+ Params =
+ {
+ {
+ Name = "Fuel",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the item in the fuel slot",
+ },
+ SetInputSlot =
+ {
+ Params =
+ {
+ {
+ Name = "Input",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the item in the input slot",
+ },
+ SetOutputSlot =
+ {
+ Params =
+ {
+ {
+ Name = "Output",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets the item in the output slot",
+ },
},
Constants =
{
- fsInput = { Notes = "Index of the input slot" },
- fsFuel = { Notes = "Index of the fuel slot" },
- fsOutput = { Notes = "Index of the output slot" },
- ContentsWidth = { Notes = "Width (X) of the {{cItemGrid|cItemGrid}} representing the contents" },
- ContentsHeight = { Notes = "Height (Y) of the {{cItemGrid|cItemGrid}} representing the contents" },
+ ContentsHeight =
+ {
+ Notes = "Height (Y) of the {{cItemGrid|cItemGrid}} representing the contents",
+ },
+ ContentsWidth =
+ {
+ Notes = "Width (X) of the {{cItemGrid|cItemGrid}} representing the contents",
+ },
+ fsFuel =
+ {
+ Notes = "Index of the fuel slot",
+ },
+ fsInput =
+ {
+ Notes = "Index of the input slot",
+ },
+ fsOutput =
+ {
+ Notes = "Index of the output slot",
+ },
},
ConstantGroups =
{
@@ -256,10 +971,8 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
TextBefore = "When using the GetSlot() or SetSlot() function, use these constants for slot index:",
},
},
- Inherits = "cBlockEntityWithItems"
- }, -- cFurnaceEntity
-
-
+ Inherits = "cBlockEntityWithItems",
+ },
cHopperEntity =
{
Desc = [[
@@ -267,83 +980,359 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
]],
Functions =
{
- GetOutputBlockPos = { Params = "BlockMeta", Return = "bool, BlockX, BlockY, BlockZ", Notes = "Returns whether the hopper is attached, and if so, the block coords of the block receiving the output items, based on the given meta." },
+ GetOutputBlockPos =
+ {
+ Params =
+ {
+ {
+ Name = "BlockMeta",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Name = "IsAttached",
+ Type = "boolean",
+ },
+ {
+ Name = "BlockX",
+ Type = "number",
+ },
+ {
+ Name = "BlockY",
+ Type = "number",
+ },
+ {
+ Name = "BlockZ",
+ Type = "number",
+ },
+ },
+ Notes = "Returns whether the hopper is attached, and if so, the block coords of the block receiving the output items, based on the given meta.",
+ },
},
Constants =
{
- ContentsHeight = { Notes = "Height (Y) of the internal {{cItemGrid}} representing the hopper contents." },
- ContentsWidth = { Notes = "Width (X) of the internal {{cItemGrid}} representing the hopper contents." },
- TICKS_PER_TRANSFER = { Notes = "Number of ticks between when the hopper transfers items." },
+ ContentsHeight =
+ {
+ Notes = "Height (Y) of the internal {{cItemGrid}} representing the hopper contents.",
+ },
+ ContentsWidth =
+ {
+ Notes = "Width (X) of the internal {{cItemGrid}} representing the hopper contents.",
+ },
+ TICKS_PER_TRANSFER =
+ {
+ Notes = "Number of ticks between when the hopper transfers items.",
+ },
},
Inherits = "cBlockEntityWithItems",
- }, -- cHopperEntity
-
-
+ },
cJukeboxEntity =
{
Desc = [[
This class represents a jukebox in the world. It can play the records, either when the
{{cPlayer|player}} uses the record on the jukebox, or when a plugin instructs it to play.
]],
- Inherits = "cBlockEntity",
Functions =
{
- EjectRecord = { Params = "", Return = "bool", Notes = "Ejects the current record as a {{cPickup|pickup}}. No action if there's no current record. To remove record without generating the pickup, use SetRecord(0). Returns true if pickup ejected." },
- GetRecord = { Params = "", Return = "number", Notes = "Returns the record currently present. Zero for no record, E_ITEM_*_DISC for records." },
- IsPlayingRecord = { Params = "", Return = "bool", Notes = "Returns true if the jukebox is playing a record." },
- IsRecordItem = { Params = "ItemType", Return = "bool", Notes = "Returns true if the specified item is a record that can be played." },
- PlayRecord = { Params = "RecordItemType", Return = "bool", Notes = "Plays the specified Record. Return false if the parameter isn't a playable Record (E_ITEM_XXX_DISC). If there is a record already playing, ejects it first." },
- SetRecord = { Params = "number", Return = "", Notes = "Sets the currently present record. Use zero for no record, or E_ITEM_*_DISC for records." },
+ EjectRecord =
+ {
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Ejects the current record as a {{cPickup|pickup}}. No action if there's no current record. To remove record without generating the pickup, use SetRecord(0). Returns true if pickup ejected.",
+ },
+ GetRecord =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the record currently present. Zero for no record, E_ITEM_*_DISC for records.",
+ },
+ IsPlayingRecord =
+ {
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Returns true if the jukebox is playing a record.",
+ },
+ IsRecordItem =
+ {
+ Params =
+ {
+ {
+ Name = "ItemType",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Returns true if the specified item is a record that can be played.",
+ },
+ PlayRecord =
+ {
+ Params =
+ {
+ {
+ Name = "RecordItemType",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Plays the specified Record. Return false if the parameter isn't a playable Record (E_ITEM_XXX_DISC). If there is a record already playing, ejects it first.",
+ },
+ SetRecord =
+ {
+ Params =
+ {
+ {
+ Name = "RecordItemType",
+ Type = "number",
+ },
+ },
+ Notes = "Sets the currently present record. Use zero for no record, or E_ITEM_*_DISC for records.",
+ },
},
- }, -- cJukeboxEntity
-
-
+ Inherits = "cBlockEntity",
+ },
cMobHeadEntity =
{
Desc = [[
This class represents a mob head block entity in the world.
]],
- Inherits = "cBlockEntity",
Functions =
{
- GetOwnerName = { Params = "", Return = "string", Notes = "Returns the player name of the mob head" },
- GetOwnerTexture = { Params = "", Return = "string", Notes = "Returns the player texture of the mob head" },
- GetOwnerTextureSignature = { Params = "", Return = "string", Notes = "Returns the signature of the player texture of the mob head" },
- GetOwnerUUID = { Params = "", Return = "string", Notes = "Returns the player UUID of the mob head" },
- GetRotation = { Params = "", Return = "eMobHeadRotation", Notes = "Returns the rotation of the mob head" },
- GetType = { Params = "", Return = "eMobHeadType", Notes = "Returns the type of the mob head" },
+ GetOwnerName =
+ {
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Returns the player name of the mob head",
+ },
+ GetOwnerTexture =
+ {
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Returns the player texture of the mob head",
+ },
+ GetOwnerTextureSignature =
+ {
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Returns the signature of the player texture of the mob head",
+ },
+ GetOwnerUUID =
+ {
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Returns the player UUID of the mob head",
+ },
+ GetRotation =
+ {
+ Returns =
+ {
+ {
+ Type = "eMobHeadRotation",
+ },
+ },
+ Notes = "Returns the rotation of the mob head",
+ },
+ GetType =
+ {
+ Returns =
+ {
+ {
+ Type = "eMobHeadType",
+ },
+ },
+ Notes = "Returns the type of the mob head",
+ },
SetOwner =
{
- { Params = "cPlayer", Return = "", Notes = "Set the {{cPlayer|player}} for mob heads with player type" },
- { Params = "OwnerUUID, OwnerName, OwnerTexture, OwnerTextureSignature", Return = "", Notes = "Sets the player components for the mob heads with player type" },
+ {
+ Params =
+ {
+ {
+ Name = "cPlayer",
+ Type = "cPlayer",
+ },
+ },
+ Notes = "Set the {{cPlayer|player}} for mob heads with player type",
+ },
+ {
+ Params =
+ {
+ {
+ Name = "OwnerUUID",
+ Type = "string",
+ },
+ {
+ Name = "OwnerName",
+ Type = "string",
+ },
+ {
+ Name = "OwnerTexture",
+ Type = "string",
+ },
+ {
+ Name = "OwnerTextureSignature",
+ Type = "string",
+ },
+ },
+ Notes = "Sets the player components for the mob heads with player type",
+ },
+ },
+ SetRotation =
+ {
+ Params =
+ {
+ {
+ Name = "Rotation",
+ Type = "eMobHeadRotation",
+ },
+ },
+ Notes = "Sets the rotation of the mob head.",
+ },
+ SetType =
+ {
+ Params =
+ {
+ {
+ Name = "HeadType",
+ Type = "eMobHeadType",
+ },
+ },
+ Notes = "Set the type of the mob head",
},
- SetRotation = { Params = "eMobHeadRotation", Return = "", Notes = "Sets the rotation of the mob head" },
- SetType = { Params = "eMobHeadType", Return = "", Notes = "Set the type of the mob head" },
},
- }, -- cMobHeadEntity
-
-
+ Inherits = "cBlockEntity",
+ },
cMobSpawnerEntity =
{
Desc = [[
This class represents a mob spawner block entity in the world.
]],
- Inherits = "cBlockEntity",
Functions =
{
- GetEntity = { Params = "", Return = "{{Globals#MobType|MobType}}", Notes = "Returns the entity type that will be spawn by this mob spawner." },
- GetNearbyMonsterNum = { Params = "EntityType", Return = "number", Notes = "Returns the amount of this monster type in a 8-block radius (Y: 4-block radius)." },
- GetNearbyPlayersNum = { Params = "", Return = "number", Notes = "Returns the amount of the nearby players in a 16-block radius." },
- GetSpawnDelay = { Params = "", Return = "number", Notes = "Returns the spawn delay. This is the tick delay that is needed to spawn new monsters." },
- ResetTimer = { Params = "", Return = "", Notes = "Sets the spawn delay to a new random value." },
- SetEntity = { Params = "{{Globals#MobType|MobType}}", Return = "", Notes = "Sets the entity type who will be spawn by this mob spawner." },
- SetSpawnDelay = { Params = "number", Return = "", Notes = "Sets the spawn delay." },
- SpawnEntity = { Params = "", Return = "", Notes = "Spawns the entity. This function automaticly change the spawn delay!" },
- UpdateActiveState = { Params = "", Return = "", Notes = "Upate the active flag from the mob spawner. This function will called every 5 seconds from the Tick() function." },
+ GetEntity =
+ {
+ Returns =
+ {
+ {
+ Name = "MobType",
+ Type = "eMonsterType",
+ },
+ },
+ Notes = "Returns the entity type that will be spawn by this mob spawner.",
+ },
+ GetNearbyMonsterNum =
+ {
+ Params =
+ {
+ {
+ Name = "MobType",
+ Type = "eMonsterType",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the amount of this monster type in a 8-block radius (Y: 4-block radius).",
+ },
+ GetNearbyPlayersNum =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the amount of the nearby players in a 16-block radius.",
+ },
+ GetSpawnDelay =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the spawn delay. This is the tick delay that is needed to spawn new monsters.",
+ },
+ ResetTimer =
+ {
+ Notes = "Sets the spawn delay to a new random value.",
+ },
+ SetEntity =
+ {
+ Params =
+ {
+ {
+ Name = "MobType",
+ Type = "eMonsterType",
+ },
+ },
+ Notes = "Sets the type of the mob that will be spawned by this mob spawner.",
+ },
+ SetSpawnDelay =
+ {
+ Params =
+ {
+ {
+ Name = "SpawnDelayTicks",
+ Type = "number",
+ },
+ },
+ Notes = "Sets the spawn delay.",
+ },
+ SpawnEntity =
+ {
+ Notes = "Spawns the entity. This function automaticly change the spawn delay!",
+ },
+ UpdateActiveState =
+ {
+ Notes = "Upate the active flag from the mob spawner. This function is called every 5 seconds from the Tick() function.",
+ },
},
- }, -- cMobSpawnerEntity
-
-
+ Inherits = "cBlockEntity",
+ },
cNoteEntity =
{
Desc = [[
@@ -355,14 +1344,38 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
]],
Functions =
{
- GetPitch = { Params = "", Return = "number", Notes = "Returns the current pitch set for the block" },
- IncrementPitch = { Params = "", Return = "", Notes = "Adds 1 to the current pitch. Wraps around to 0 when the pitch cannot go any higher." },
- MakeSound = { Params = "", Return = "", Notes = "Plays the sound for all {{cClientHandle|clients}} near this block." },
- SetPitch = { Params = "Pitch", Return = "", Notes = "Sets a new pitch for the block." },
+ GetPitch =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the current pitch set for the block",
+ },
+ IncrementPitch =
+ {
+ Notes = "Adds 1 to the current pitch. Wraps around to 0 when the pitch cannot go any higher.",
+ },
+ MakeSound =
+ {
+ Notes = "Plays the sound for all {{cClientHandle|clients}} near this block.",
+ },
+ SetPitch =
+ {
+ Params =
+ {
+ {
+ Name = "Pitch",
+ Type = "number",
+ },
+ },
+ Notes = "Sets a new pitch for the block.",
+ },
},
Inherits = "cBlockEntity",
- }, -- cNoteEntity
-
+ },
cSignEntity =
{
Desc = [[
@@ -371,28 +1384,62 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
]],
Functions =
{
- GetLine = { Params = "LineIndex", Return = "string", Notes = "Returns the specified line. LineIndex is expected between 0 and 3. Returns empty string and logs to server console when LineIndex is invalid." },
- SetLine = { Params = "LineIndex, LineText", Return = "", Notes = "Sets the specified line. LineIndex is expected between 0 and 3. Logs to server console when LineIndex is invalid." },
- SetLines = { Params = "Line1, Line2, Line3, Line4", Return = "", Notes = "Sets all the sign's lines at once." },
- },
- Inherits = "cBlockEntity";
- }, -- cSignEntity
-
- cFlowerPotEntity =
- {
- Desc = [[
- This class represents a flower pot entity in the world.
- ]],
- Functions =
- {
- IsItemInPot = { Params = "", Return = "bool", Notes = "Is a flower in the pot?" },
- GetItem = { Params = "", Return = "{{cItem|Item}}", Notes = "Returns the item in the flower pot." },
- SetItem = { Params = "{{cItem|Item}}", Return = "", Notes = "Set the item in the flower pot" },
+ GetLine =
+ {
+ Params =
+ {
+ {
+ Name = "LineIndex",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Returns the specified line. LineIndex is expected between 0 and 3. Returns empty string and logs to server console when LineIndex is invalid.",
+ },
+ SetLine =
+ {
+ Params =
+ {
+ {
+ Name = "LineIndex",
+ Type = "number",
+ },
+ {
+ Name = "LineText",
+ Type = "string",
+ },
+ },
+ Notes = "Sets the specified line. LineIndex is expected between 0 and 3. Logs to server console when LineIndex is invalid.",
+ },
+ SetLines =
+ {
+ Params =
+ {
+ {
+ Name = "Line1",
+ Type = "string",
+ },
+ {
+ Name = "Line2",
+ Type = "string",
+ },
+ {
+ Name = "Line3",
+ Type = "string",
+ },
+ {
+ Name = "Line4",
+ Type = "string",
+ },
+ },
+ Notes = "Sets all the sign's lines at once. Note that plugins should prefer to use {{cWorld}}:SetSignLines(), so that they can specify the player on whose behalf the sign is being set.",
+ },
},
- Inherits = "cBlockEntity";
- }, -- cFlowerPotEntity
+ Inherits = "cBlockEntity",
+ },
}
-
-
-
-