CanPickup={Params="{{cPlayer|Player}}",Return="bool",Notes="Returns true if the specified player can pick the arrow when it's on the ground"},
GetDamageCoeff={Params="",Return="number",Notes="Returns the damage coefficient stored within the arrow. The damage dealt by this arrow is multiplied by this coeff"},
GetPickupState={Params="",Return="PickupState",Notes="Returns the pickup state (one of the psXXX constants, above)"},
IsCritical={Params="",Return="bool",Notes="Returns true if the arrow should deal critical damage. Based on the bow charge when the arrow was shot."},
SetDamageCoeff={Params="number",Return="",Notes="Sets the damage coefficient. The damage dealt by this arrow is multiplied by this coeff"},
SetIsCritical={Params="bool",Return="",Notes="Sets the IsCritical flag on the arrow. Critical arrow deal additional damage"},
SetPickupState={Params="PickupState",Return="",Notes="Sets the pickup state (one of the psXXX constants, above)"},
Clear={Params="",Return="",Notes="Clears the object, resets it to zero size"},
CopyFrom={Params="BlockAreaSrc",Return="",Notes="Copies contents from BlockAreaSrc into self"},
CopyTo={Params="BlockAreaDst",Return="",Notes="Copies contents from self into BlockAreaDst."},
Create={Params="SizeX, SizeY, SizeZ, [DataTypes]",Return="",Notes="Initializes this BlockArea to an empty area of the specified size and origin of {0, 0, 0}. Any previous contents are lost."},
Crop={Params="AddMinX, SubMaxX, AddMinY, SubMaxY, AddMinZ, SubMaxZ",Return="",Notes="Crops the specified number of blocks from each border. Modifies the size of this blockarea object."},
DumpToRawFile={Params="FileName",Return="",Notes="Dumps the raw data into a file. For debugging purposes only."},
Expand={Params="SubMinX, AddMaxX, SubMinY, AddMaxY, SubMinZ, AddMaxZ",Return="",Notes="Expands the specified number of blocks from each border. Modifies the size of this blockarea object. New blocks created with this operation are filled with zeroes."},
Fill={Params="DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Fills the entire block area with the same values, specified. Uses the DataTypes param to determine which content types are modified."},
FillRelCuboid={Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Fills the specified cuboid with the same values (like Fill() )."},
GetBlockLight={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the blocklight at the specified absolute coords"},
GetBlockMeta={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the block meta at the specified absolute coords"},
GetBlockSkyLight={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the skylight at the specified absolute coords"},
GetBlockType={Params="BlockX, BlockY, BlockZ",Return="BLOCKTYPE",Notes="Returns the block type at the specified absolute coords"},
GetBlockTypeMeta={Params="BlockX, BlockY, BlockZ",Return="BLOCKTYPE, NIBBLETYPE",Notes="Returns the block type and meta at the specified absolute coords"},
GetDataTypes={Params="",Return="number",Notes="Returns the mask of datatypes that the objectis currently holding"},
GetOriginX={Params="",Return="number",Notes="Returns the origin x-coord"},
GetOriginY={Params="",Return="number",Notes="Returns the origin y-coord"},
GetOriginZ={Params="",Return="number",Notes="Returns the origin z-coord"},
GetRelBlockLight={Params="RelBlockX, RelBlockY, RelBlockZ",Return="NIBBLETYPE",Notes="Returns the blocklight at the specified relative coords"},
GetRelBlockMeta={Params="RelBlockX, RelBlockY, RelBlockZ",Return="NIBBLETYPE",Notes="Returns the block meta at the specified relative coords"},
GetRelBlockSkyLight={Params="RelBlockX, RelBlockY, RelBlockZ",Return="NIBBLETYPE",Notes="Returns the skylight at the specified relative coords"},
GetRelBlockType={Params="RelBlockX, RelBlockY, RelBlockZ",Return="BLOCKTYPE",Notes="Returns the block type at the specified relative coords"},
GetRelBlockTypeMeta={Params="RelBlockX, RelBlockY, RelBlockZ",Return="NIBBLETYPE",Notes="Returns the block type and meta at the specified relative coords"},
GetSizeX={Params="",Return="number",Notes="Returns the size of the held data in the x-axis"},
GetSizeY={Params="",Return="number",Notes="Returns the size of the held data in the y-axis"},
GetSizeZ={Params="",Return="number",Notes="Returns the size of the held data in the z-axis"},
HasBlockLights={Params="",Return="bool",Notes="Returns true if current datatypes include blocklight"},
HasBlockMetas={Params="",Return="bool",Notes="Returns true if current datatypes include block metas"},
HasBlockSkyLights={Params="",Return="bool",Notes="Returns true if current datatypes include skylight"},
HasBlockTypes={Params="",Return="bool",Notes="Returns true if current datatypes include block types"},
LoadFromSchematicFile={Params="FileName",Return="",Notes="Clears current content and loads new content from the specified schematic file. Returns true if successful. Returns false and logs error if unsuccessful, old content is preserved in such a case."},
Merge={Params="BlockAreaSrc, RelX, RelY, RelZ, Strategy",Return="",Notes="Merges BlockAreaSrc into this object at the specified relative coords, using the specified strategy"},
MirrorXY={Params="",Return="",Notes="Mirrors this block area around the XY plane. Modifies blocks' metas (if present) to match (i. e. furnaces facing the opposite direction)."},
MirrorXYNoMeta={Params="",Return="",Notes="Mirrors this block area around the XY plane. Doesn't modify blocks' metas."},
MirrorXZ={Params="",Return="",Notes="Mirrors this block area around the XZ plane. Modifies blocks' metas (if present)"},
MirrorXZNoMeta={Params="",Return="",Notes="Mirrors this block area around the XZ plane. Doesn't modify blocks' metas."},
MirrorYZ={Params="",Return="",Notes="Mirrors this block area around the YZ plane. Modifies blocks' metas (if present)"},
MirrorYZNoMeta={Params="",Return="",Notes="Mirrors this block area around the YZ plane. Doesn't modify blocks' metas."},
Read={Params="World, MinX, MaxX, MinY, MaxY, MinZ, MaxZ, DataTypes",Return="bool",Notes="Reads the area from World, returns true if successful"},
RelLine={Params="RelX1, RelY1, RelZ1, RelX2, RelY2, RelZ2, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Draws a line between the two specified points. Sets only datatypes specified by DataTypes."},
RotateCCW={Params="",Return="",Notes="Rotates the block area around the Y axis, counter-clockwise (east -> north). Modifies blocks' metas (if present) to match."},
RotateCCWNoMeta={Params="",Return="",Notes="Rotates the block area around the Y axis, counter-clockwise (east -> north). Doesn't modify blocks' metas."},
RotateCW={Params="",Return="",Notes="Rotates the block area around the Y axis, clockwise (north -> east). Modifies blocks' metas (if present) to match."},
RotateCWNoMeta={Params="",Return="",Notes="Rotates the block area around the Y axis, clockwise (north -> east). Doesn't modify blocks' metas."},
SaveToSchematicFile={Params="FileName",Return="",Notes="Saves the current contents to a schematic file. Returns true if successful."},
SetBlockLight={Params="BlockX, BlockY, BlockZ, BlockLight",Return="",Notes="Sets the blocklight at the specified absolute coords"},
SetBlockMeta={Params="BlockX, BlockY, BlockZ, BlockMeta",Return="",Notes="Sets the block meta at the specified absolute coords"},
SetBlockSkyLight={Params="BlockX, BlockY, BlockZ, SkyLight",Return="",Notes="Sets the skylight at the specified absolute coords"},
SetBlockType={Params="BlockX, BlockY, BlockZ, BlockType",Return="",Notes="Sets the block type at the specified absolute coords"},
SetBlockTypeMeta={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block type and meta at the specified absolute coords"},
SetOrigin={Params="OriginX, OriginY, OriginZ",Return="",Notes="Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords."},
SetRelBlockTypeMeta={Params="RelBlockX, RelBlockY, RelBlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block type and meta at the specified relative coords"},
Write={Params="World, MinX, MinY, MinZ, DataTypes",Return="bool",Notes="Writes the area into World at the specified coords, returns true if successful"},
GetBlockType={Params="",Return="BLOCKTYPE",Notes="Returns the blocktype which is represented by this blockentity. This is the primary means of type-identification"},
{Params="MinX, MaxX, MinY, MaxY, MinZ, MaxZ",Return="cBoundingBox",Notes="Creates a new bounding box with the specified edges"},
{Params="{{Vector3d|Min}}, {{Vector3d|Max}}",Return="cBoundingBox",Notes="Creates a new bounding box with the coords specified as two vectors"},
{Params="{{Vector3d|Pos}}, Radius, Height",Return="cBoundingBox",Notes="Creates a new bounding box from the position given and radius (X/Z) and height. Radius is added from X/Z to calculate the maximum coords and subtracted from X/Z to get the minimum; minimum Y is set to Pos.y and maxumim Y to Pos.y plus Height. This corresponds with how {{cEntity|entities}} are represented in Minecraft."},
{Params="OtherBoundingBox",Return="cBoundingBox",Notes="Creates a new copy of the given bounding box. Same result can be achieved by using a simple assignment."},
},
CalcLineIntersection={Params="{{Vector3d|LineStart}}, {{Vector3d|LinePt2}}",Return="DoesIntersect, LineCoeff, Face",Notes="Calculates the intersection of a ray (half-line), given by two of its points, with the bounding box. Returns false if the line doesn't intersect the bounding box, or true, together with coefficient of the intersection (how much of the difference between the two ray points is needed to reach the intersection), and the face of the box which is intersected.<br /><b>TODO</b>: Lua binding for this function is wrong atm."},
DoesIntersect={Params="OtherBoundingBox",Return="bool",Notes="Returns true if the two bounding boxes have an intersection of nonzero volume."},
Expand={Params="ExpandX, ExpandY, ExpandZ",Return="",Notes="Expands this bounding box by the specified amount in each direction (so the box becomes larger by 2 * Expand in each axis)."},
IsInside=
{
{Params="{{Vector3d|Point}}",Return="bool",Notes="Returns true if the specified point is inside (including on the edge) of the box."},
{Params="PointX, PointY, PointZ",Return="bool",Notes="Returns true if the specified point is inside (including on the edge) of the box."},
{Params="OtherBoundingBox",Return="bool",Notes="Returns true if OtherBoundingBox is inside of this box."},
{Params="{{Vector3d|OtherBoxMin}}, {{Vector3d|OtherBoxMax}}",Return="bool",Notes="Returns true if the other bounding box, specified by its 2 corners, is inside of this box."},
},
Move=
{
{Params="OffsetX, OffsetY, OffsetZ",Return="",Notes="Moves the bounding box by the specified offset in each axis"},
{Params="{{Vector3d|Offset}}",Return="",Notes="Moves the bounding box by the specified offset in each axis"},
},
Union={Params="OtherBoundingBox",Return="cBoundingBox",Notes="Returns the smallest bounding box that contains both OtherBoundingBox and this bounding box. Note that unlike the strict geometrical meaning of \"union\", this operation actually returns a cBoundingBox."},
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta",Return="",Notes="Fills the cuboid, specified in relative coords, by the specified block type and block meta. The cuboid may reach outside of the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta",Return="",Notes="Fills the cuboid, specified in relative coords, by the specified block type and block meta. The cuboid may reach outside of the chunk, only the part intersecting with this chunk is filled."},
},
FloorRelCuboid=
{
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta",Return="",Notes="Fills those blocks of the cuboid (specified in relative coords) that are considered non-floor (air, water) with the specified block type and meta. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta",Return="",Notes="Fills those blocks of the cuboid (specified in relative coords) that are considered non-floor (air, water) with the specified block type and meta. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
GetBlockEntity={Params="RelX, RelY, RelZ",Return="{{cBlockEntity}} descendant",Notes="Returns the block entity for the block at the specified coords. Creates it if it doesn't exist. Returns nil if the block has no block entity capability."},
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta, RandomSeed, ChanceOutOf10k",Return="",Notes="Fills the specified relative cuboid with block type and meta in random locations. RandomSeed is used for the random number genertion (same seed produces same results); ChanceOutOf10k specifies the density (how many out of every 10000 blocks should be filled). Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta, RandomSeed, ChanceOutOf10k",Return="",Notes="Fills the specified relative cuboid with block type and meta in random locations. RandomSeed is used for the random number genertion (same seed produces same results); ChanceOutOf10k specifies the density (how many out of every 10000 blocks should be filled). Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
},
ReadBlockArea={Params="{{cBlockArea|BlockArea}}, MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ",Return="",Notes="Reads data from the chunk into the block area object. Block types and metas are processed."},
ReplaceRelCuboid=
{
{Params="{{cCuboid|RelCuboid}}, SrcType, SrcMeta, DstType, DstMeta",Return="",Notes="Replaces all SrcType+SrcMeta blocks in the cuboid (specified in relative coords) with DstType+DstMeta blocks. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, SrcType, SrcMeta, DstType, DstMeta",Return="",Notes="Replaces all SrcType+SrcMeta blocks in the cuboid (specified in relative coords) with DstType+DstMeta blocks. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
GetPlayer={Params="",Return="{{cPlayer|cPlayer}}",Notes="Returns the player object connected to this client. Note that this may be nil, for example if the player object is not yet spawned."},
SendBlockChange={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sends a BlockChange packet to the client. This can be used to create fake blocks only for that player."},
constructor={Params="Width, Height",Return="cCraftingGrid",Notes="Creates a new CraftingGrid object. This new crafting grid is not related to any player, but may be needed for {{cCraftingRecipe}}'s ConsumeIngredients function."},
ConsumeGrid={Params="{{cCraftingGrid|CraftingGrid}}",Return="",Notes="Consumes items specified in CraftingGrid from the current contents. Used internally by {{cCraftingRecipe}}'s ConsumeIngredients() function, but available to plugins, too."},
{Params="OtheCuboid",Return="cCuboid",Notes="Creates a new Cuboid object as a copy of OtherCuboid"},
{Params="{{Vector3i|Point1}}, {{Vector3i|Point2}}",Return="cCuboid",Notes="Creates a new Cuboid object with the specified points as its corners."},
{Params="X, Y, Z",Return="cCuboid",Notes="Creates a new Cuboid object with the specified point as both its corners (the cuboid has a size of 1 in each direction)."},
{Params="X1, Y1, Z1, X2, Y2, Z2",Return="cCuboid",Notes="Creates a new Cuboid object with the specified points as its corners."},
},
Assign={Params="X1, Y1, Z1, X2, Y2, Z2",Return="",Notes="Assigns all the coords stored in the cuboid. Sort-state is ignored."},
DifX={Params="",Return="number",Notes="Returns the difference between the two X coords (X-size minus 1). Assumes sorted."},
DifY={Params="",Return="number",Notes="Returns the difference between the two Y coords (Y-size minus 1). Assumes sorted."},
DifZ={Params="",Return="number",Notes="Returns the difference between the two Z coords (Z-size minus 1). Assumes sorted."},
DoesIntersect={Params="OtherCuboid",Return="bool",Notes="Returns true if this cuboid has at least one voxel in common with OtherCuboid. Note that edges are considered inclusive. Assumes both sorted."},
IsCompletelyInside={Params="OuterCuboid",Return="bool",Notes="Returns true if this cuboid is completely inside (in all directions) in OuterCuboid. Assumes both sorted."},
IsInside=
{
{Params="X, Y, Z",Return="bool",Notes="Returns true if the specified point (integral coords) is inside this cuboid. Assumes sorted."},
{Params="{{Vector3i|Point}}",Return="bool",Notes="Returns true if the specified point (integral coords) is inside this cuboid. Assumes sorted."},
{Params="{{Vector3d|Point}}",Return="bool",Notes="Returns true if the specified point (floating-point coords) is inside this cuboid. Assumes sorted."},
},
IsSorted={Params="",Return="bool",Notes="Returns true if this cuboid is sorted"},
Move={Params="OffsetX, OffsetY, OffsetZ",Return="",Notes="Adds the specified offsets to each respective coord, effectively moving the Cuboid. Sort-state is ignored."},
Sort={Params="",Return="",Notes="Sorts the internal representation so that p1 contains the lesser coords and p2 contains the greater coords."},
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"},
{Params="",Return="cEnchantments",Notes="Creates a new empty cEnchantments object"},
{Params="StringSpec",Return="cEnchantments",Notes="Creates a new cEnchantments object filled with enchantments based on the string description"},
},
operator_eq={Params="OtherEnchantments",Return="bool",Notes="Returns true if this enchantments object has the same enchantments as OtherEnchantments."},
AddFromString={Params="StringSpec",Return="",Notes="Adds the enchantments in the string description into the object. If a specified enchantment already existed, it is overwritten."},
Clear={Params="",Return="",Notes="Removes all enchantments"},
GetLevel={Params="EnchantmentNumID",Return="number",Notes="Returns the level of the specified enchantment stored in this object; 0 if not stored"},
IsEmpty={Params="",Return="bool",Notes="Returns true if the object stores no enchantments"},
SetLevel={Params="EnchantmentNumID, Level",Return="",Notes="Sets the level for the specified enchantment, adding it if not stored before or removing it if level < = 0"},
StringToEnchantmentID={Params="EnchantmentTextID",Return="number",Notes="(static) Returns the enchantment numerical ID, -1 if not understood. Case insensitive"},
ToString={Params="",Return="string",Notes="Returns the string description of all the enchantments stored in this object, in numerical-ID form"},
GetArmorCoverAgainst={Params="AttackerEntity, DamageType, RawDamage",Return="number",Notes="Returns the number of hitpoints out of RawDamage that the currently equipped armor would cover. See {{TakeDamageInfo}} for more information on attack damage."},
GetClassStatic={Params="",Return="string",Notes="Returns the entity classname that this class implements. Each descendant overrides this function. Is static"},
GetEntityType={Params="",Return="eEntityType",Notes="Returns the type of the entity, one of the etXXX constants. Note that to check specific entity type, you should use one of the IsXXX functions instead of comparing the value returned by this call."},
GetEquippedBoots={Params="",Return="{{cItem}}",Notes="Returns the boots that the entity has equipped. Returns an empty cItem if no boots equipped or not applicable."},
GetEquippedChestplate={Params="",Return="{{cItem}}",Notes="Returns the chestplate that the entity has equipped. Returns an empty cItem if no chestplate equipped or not applicable."},
GetEquippedHelmet={Params="",Return="{{cItem}}",Notes="Returns the helmet that the entity has equipped. Returns an empty cItem if no helmet equipped or not applicable."},
GetEquippedLeggings={Params="",Return="{{cItem}}",Notes="Returns the leggings that the entity has equipped. Returns an empty cItem if no leggings equipped or not applicable."},
GetEquippedWeapon={Params="",Return="{{cItem}}",Notes="Returns the weapon that the entity has equipped. Returns an empty cItem if no weapon equipped or not applicable."},
GetGravity={Params="",Return="number",Notes="Returns the number that is used as the gravity for physics simulation. 1G (9.78) by default."},
GetHeadYaw={Params="",Return="number",Notes="Returns the pitch of the entity's head (FIXME: Rename to GetHeadPitch() )."},
GetHealth={Params="",Return="number",Notes="Returns the current health of the entity."},
GetHeight={Params="",Return="number",Notes="Returns the height (Y size) of the entity"},
GetKnockbackAmountAgainst={Params="ReceiverEntity",Return="number",Notes="Returns the amount of knockback that the currently equipped items would cause when attacking the ReceiverEntity."},
GetRawDamageAgainst={Params="ReceiverEntity",Return="number",Notes="Returns the raw damage that this entity's equipment would cause when attacking the ReceiverEntity. This includes this entity's weapon {{cEnchantments|enchantments}}, but excludes the receiver's armor or potion effects. See {{TakeDamageInfo}} for more information on attack damage."},
GetRoll={Params="",Return="number",Notes="Returns the roll (sideways rotation) of the entity. Currently unused."},
GetRot={Params="",Return="{{Vector3f}}",Notes="Returns the entire rotation vector (Yaw, Pitch, Roll)"},
GetUniqueID={Params="",Return="number",Notes="Returns the ID that uniquely identifies the entity within the running server. Note that this ID is not persisted to the data files."},
GetWidth={Params="",Return="number",Notes="Returns the width (X and Z size) of the entity."},
IsA={Params="ClassName",Return="bool",Notes="Returns true if the entity class is a descendant of the specified class name, or the specified class itself"},
IsRiding={Params="",Return="bool",Notes="Returns true if the entity is attached to (riding) another entity."},
IsSprinting={Params="",Return="bool",Notes="Returns true if the entity is sprinting. Entities that cannot sprint return always false"},
IsTNT={Params="",Return="bool",Notes="Returns true if the entity represents a {{cTNTEntity|TNT entity}}"},
KilledBy={Notes="FIXME: Remove this from API"},
SetGravity={Params="Gravity",Return="",Notes="Sets the number that is used as the gravity for physics simulation. 1G (9.78) by default."},
SetHeadYaw={Params="HeadPitch",Return="",Notes="Sets the head pitch (FIXME: Rename to SetHeadPitch() )."},
SetHealth={Params="Hitpoints",Return="",Notes="Sets the entity's health to the specified amount of hitpoints. Doesn't broadcast any hurt animation. Doesn't kill the entity if health drops below zero. Use the TakeDamage() function instead for taking damage."},
SetHeight={Params="",Return="",Notes="FIXME: Remove this from API"},
SetMass={Params="Mass",Return="",Notes="Sets the mass of the entity. Currently unused."},
SetMaxHealth={Params="MaxHitpoints",Return="",Notes="Sets the maximum hitpoints of the entity. If current health is above MaxHitpoints, it is capped to MaxHitpoints."},
SetRotationFromSpeed={Params="",Return="",Notes="Sets the entity's yaw to match its current speed (entity looking forwards as it moves). (FIXME: Rename to SetYawFromSpeed)"},
SetSpeed=
{
{Params="SpeedX, SpeedY, SpeedZ",Return="",Notes="Sets the current speed of the entity"},
{Params="{{Vector3d|Speed}}",Return="",Notes="Sets the current speed of the entity"},
},
SetSpeedX={Params="SpeedX",Return="",Notes="Sets the X component of the entity speed"},
SetSpeedY={Params="SpeedY",Return="",Notes="Sets the Y component of the entity speed"},
SetSpeedZ={Params="SpeedZ",Return="",Notes="Sets the Z component of the entity speed"},
SetWidth={Params="",Return="",Notes="FIXME: Remove this from API"},
StartBurning={Params="NumTicks",Return="",Notes="Sets the entity on fire for the specified number of ticks. If entity is on fire already, makes it burn for either NumTicks or the number of ticks left from the previous fire, whichever is larger."},
SteerVehicle={Params="ForwardAmount, SidewaysAmount",Return="",Notes="Applies the specified steering to the vehicle this entity is attached to. Ignored if not attached to any entity."},
StopBurning={Params="",Return="",Notes="Extinguishes the entity fire, cancels all fire timers."},
TakeDamage=
{
{Params="AttackerEntity",Return="",Notes="Causes this entity to take damage that AttackerEntity would inflict. Includes their weapon and this entity's armor."},
{Params="DamageType, AttackerEntity, RawDamage, KnockbackAmount",Return="",Notes="Causes this entity to take damage of the specified type, from the specified attacker (may be nil). The final damage is calculated from RawDamage using the currently equipped armor."},
{Params="DamageType, ArrackerEntity, RawDamage, FinalDamage, KnockbackAmount",Return="",Notes="Causes this entity to take damage of the specified type, from the specified attacker (may be nil). The values are wrapped into a {{TakeDamageInfo}} structure and applied directly."},
},
TeleportToCoords={Params="PosX, PosY, PosZ",Return="",Notes="Teleports the entity to the specified coords."},
TeleportToEntity={Params="DestEntity",Return="",Notes="Teleports this entity to the specified destination entity."},
Copy={Params="SrcFileName, DstFileName",Return="bool",Notes="Copies a single file to a new destination. Returns true if successful. Fails if the destination already exists."},
CreateFolder={Params="FolderName",Return="bool",Notes="Creates a new folder. Returns true if successful."},
Delete={Params="FileName",Return="bool",Notes="Deletes the specified file. Returns true if successful."},
Exists={Params="FileName",Return="bool",Notes="Returns true if the specified file exists."},
GetSize={Params="FileName",Return="number",Notes="Returns the size of the file, or -1 on failure."},
IsFile={Params="Path",Return="bool",Notes="Returns true if the specified path points to an existing file."},
IsFolder={Params="Path",Return="bool",Notes="Returns true if the specified path points to an existing folder."},
Rename={Params="OrigPath, NewPath",Return="bool",Notes="Renames a file or a folder. Returns true if successful. Undefined result if NewPath already exists."},
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."},
},
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."},
constructor={Params="",Return="cIniFile",Notes="Creates a new empty cIniFile object."},
AddHeaderComment={Params="Comment",Return="",Notes="Adds a comment to be stored in the file header."},
AddKeyComment=
{
{Params="KeyID, Comment",Return="",Notes="Adds a comment to be stored in the file under the specified key"},
{Params="KeyName, Comment",Return="",Notes="Adds a comment to be stored in the file under the specified key"},
},
AddKeyName={Params="KeyName",Returns="number",Notes="Adds a new key of the specified name. Returns the KeyID of the new key."},
CaseInsensitive={Params="",Return="",Notes="Sets key names' and value names' comparisons to case insensitive (default)."},
CaseSensitive={Params="",Return="",Notes="Sets key names and value names comparisons to case sensitive."},
Clear={Params="",Return="",Notes="Removes all the in-memory data. Note that , like all the other operations, this doesn't affect any file data."},
DeleteHeaderComment={Params="CommentID",Return="bool",Notes="Deletes the specified header comment. Returns true if successful."},
DeleteHeaderComments={Params="",Return="",Notes="Deletes all headers comments."},
DeleteKey={Params="KeyName",Return="bool",Notes="Deletes the specified key, and all values in that key. Returns true if successful."},
DeleteKeyComment=
{
{Params="KeyID, CommentID",Return="bool",Notes="Deletes the specified key comment. Returns true if successful."},
{Params="KeyName, CommentID",Return="bool",Notes="Deletes the specified key comment. Returns true if successful."},
},
DeleteKeyComments=
{
{Params="KeyID",Return="bool",Notes="Deletes all comments for the specified key. Returns true if successful."},
{Params="KeyName",Return="bool",Notes="Deletes all comments for the specified key. Returns true if successful."},
},
DeleteValue={Params="KeyName, ValueName",Return="bool",Notes="Deletes the specified value. Returns true if successful."},
DeleteValueByID={Params="KeyID, ValueID",Return="bool",Notes="Deletes the specified value. Returns true if successful."},
FindKey={Params="KeyName",Return="number",Notes="Returns the KeyID for the specified key name, or the noID constant if the key doesn't exist."},
FindValue={Params="KeyID, ValueName",Return="numebr",Notes="Returns the ValueID for the specified value name, or the noID constant if the specified key doesn't contain a value of that name."},
GetHeaderComment={Params="CommentID",Return="string",Notes="Returns the specified header comment, or an empty string if such comment doesn't exist"},
GetKeyComment=
{
{Params="KeyID, CommentID",Return="string",Notes="Returns the specified key comment, or an empty string if such a comment doesn't exist"},
{Params="KeyName, CommentID",Return="string",Notes="Returns the specified key comment, or an empty string if such a comment doesn't exist"},
},
GetKeyName={Params="KeyID",Return="string",Notes="Returns the key name for the specified key ID. Inverse for FindKey()."},
GetNumHeaderComments={Params="",Return="number",Notes="Retuns the number of header comments."},
GetNumKeyComments=
{
{Params="KeyID",Return="number",Notes="Returns the number of comments under the specified key"},
{Params="KeyName",Return="number",Notes="Returns the number of comments under the specified key"},
},
GetNumKeys={Params="",Return="number",Notes="Returns the total number of keys. This is the range for the KeyID (0 .. GetNumKeys() - 1)"},
GetNumValues=
{
{Params="KeyID",Return="number",Notes="Returns the number of values stored under the specified key."},
{Params="KeyName",Return="number",Notes="Returns the number of values stored under the specified key."},
},
GetValue=
{
{Params="KeyName, ValueName",Return="string",Notes="Returns the value of the specified name under the specified key. Returns an empty string if the value doesn't exist."},
{Params="KeyID, ValueID",Return="string",Notes="Returns the value of the specified name under the specified key. Returns an empty string if the value doesn't exist."},
},
GetValueB={Params="KeyName, ValueName",Return="bool",Notes="Returns the value of the specified name under the specified key, as a bool. Returns false if the value doesn't exist."},
GetValueF={Params="KeyName, ValueName",Return="number",Notes="Returns the value of the specified name under the specified key, as a floating-point number. Returns zero if the value doesn't exist."},
GetValueI={Params="KeyName, ValueName",Return="number",Notes="Returns the value of the specified name under the specified key, as an integer. Returns zero if the value doesn't exist."},
GetValueName=
{
{Params="KeyID, ValueID",Return="string",Notes="Returns the name of the specified value Inverse for FindValue()."},
{Params="KeyName, ValueID",Return="string",Notes="Returns the name of the specified value Inverse for FindValue()."},
},
GetValueSet={Params="KeyName, ValueName, Default",Return="string",Notes="Returns the value of the specified name under the specified key. If the value doesn't exist, creates it with the specified default."},
GetValueSetB={Params="KeyName, ValueName, Default",Return="bool",Notes="Returns the value of the specified name under the specified key, as a bool. If the value doesn't exist, creates it with the specified default."},
GetValueSetF={Params="KeyName, ValueName, Default",Return="number",Notes="Returns the value of the specified name under the specified key, as a floating-point number. If the value doesn't exist, creates it with the specified default."},
GetValueSetI={Params="KeyName, ValueName, Default",Return="number",Notes="Returns the value of the specified name under the specified key, as an integer. If the value doesn't exist, creates it with the specified default."},
ReadFile={Params="FileName, [AllowExampleFallback]",Return="bool",Notes="Reads the values from the specified file. Previous in-memory contents are lost. If the file cannot be opened, and AllowExample is true, another file, \"filename.example.ini\", is loaded and then saved as \"filename.ini\". Returns true if successful, false if not."},
SetValue=
{
{Params="KeyID, ValueID, NewValue",Return="bool",Notes="Overwrites the specified value with a new value. If the specified value doesn't exist, returns false (doesn't add)."},
{Params="KeyName, ValueName, NewValue, [CreateIfNotExists]",Return="bool",Notes="Overwrites the specified value with a new value. If CreateIfNotExists is true (default) and the value doesn't exist, it is first created. Returns true if the value was successfully set, false if not (didn't exists, CreateIfNotExists false)."},
},
SetValueB={Params="KeyName, ValueName, NewValueBool, [CreateIfNotExists]",Return="bool",Notes="Overwrites the specified value with a new bool value. If CreateIfNotExists is true (default) and the value doesn't exist, it is first created. Returns true if the value was successfully set, false if not (didn't exists, CreateIfNotExists false)."},
SetValueF={Params="KeyName, ValueName, NewValueFloat, [CreateIfNotExists]",Return="bool",Notes="Overwrites the specified value with a new floating-point number value. If CreateIfNotExists is true (default) and the value doesn't exist, it is first created. Returns true if the value was successfully set, false if not (didn't exists, CreateIfNotExists false)."},
SetValueI={Params="KeyName, ValueName, NewValueInt, [CreateIfNotExists]",Return="bool",Notes="Overwrites the specified value with a new integer value. If CreateIfNotExists is true (default) and the value doesn't exist, it is first created. Returns true if the value was successfully set, false if not (didn't exists, CreateIfNotExists false)."},
WriteFile={Params="FileName",Return="bool",Notes="Writes the current in-memory data into the specified file. Returns true if successful, false if not."},
AddItem={Params="{{cItem|cItem}}, [AllowNewStacks]",Return="number",Notes="Adds an item to the storage; if AllowNewStacks is true (default), will also create new stacks in empty slots. Returns the number of items added"},
AddItems={Params="{{cItems|cItems}}, [AllowNewStacks]",Return="number",Notes="Same as AddItem, but for several items at once"},
ChangeSlotCount={Params="SlotNum, AddToCount",Return="number",Notes="Adds AddToCount to the count of items in the specified slot. If the slot was empty, ignores the call. Returns the new count in the slot, or -1 if invalid SlotNum"},
Clear={Params="",Return="",Notes="Empties all slots"},
CopyToItems={Params="{{cItems|cItems}}",Return="",Notes="Copies all non-empty slots into the cItems object provided; original cItems contents are preserved"},
DamageEquippedItem={Params="[DamageAmount]",Return="bool",Notes="Adds the specified damage (1 by default) to the currently equipped it"},
DamageItem={Params="SlotNum, [DamageAmount]",Return="bool",Notes="Adds the specified damage (1 by default) to the specified item, returns true if the item reached its max damage and should be destroyed"},
GetArmorGrid={Params="",Return="{{cItemGrid|cItemGrid}}",Notes="Returns the ItemGrid representing the armor grid (1 x 4 slots)"},
GetArmorSlot={Params="ArmorSlotNum",Return="{{cItem|cItem}}",Notes="Returns the specified armor slot contents. Note that the returned item is read-only"},
GetEquippedBoots={Params="",Return="{{cItem|cItem}}",Notes="Returns the item in the \"boots\" slot of the armor grid. Note that the returned item is read-only"},
GetEquippedChestplate={Params="",Return="{{cItem|cItem}}",Notes="Returns the item in the \"chestplate\" slot of the armor grid. Note that the returned item is read-only"},
GetEquippedHelmet={Params="",Return="{{cItem|cItem}}",Notes="Returns the item in the \"helmet\" slot of the armor grid. Note that the returned item is read-only"},
GetEquippedItem={Params="",Return="{{cItem|cItem}}",Notes="Returns the currently selected item from the hotbar. Note that the returned item is read-only"},
GetEquippedLeggings={Params="",Return="{{cItem|cItem}}",Notes="Returns the item in the \"leggings\" slot of the armor grid. Note that the returned item is read-only"},
GetEquippedSlotNum={Params="",Return="number",Notes="Returns the hotbar slot number for the currently selected item"},
GetHotbarGrid={Params="",Return="{{cItemGrid|cItemGrid}}",Notes="Returns the ItemGrid representing the hotbar grid (9 x 1 slots)"},
GetHotbarSlot={Params="HotBarSlotNum",Return="{{cItem|cItem}}",Notes="Returns the specified hotbar slot contents. Note that the returned item is read-only"},
GetInventoryGrid={Params="",Return="{{cItemGrid|cItemGrid}}",Notes="Returns the ItemGrid representing the main inventory (9 x 3 slots)"},
GetInventorySlot={Params="InventorySlotNum",Return="{{cItem|cItem}}",Notes="Returns the specified main inventory slot contents. Note that the returned item is read-only"},
GetOwner={Params="",Return="{{cPlayer|cPlayer}}",Notes="Returns the player whose inventory this object represents"},
GetSlot={Params="SlotNum",Return="{{cItem|cItem}}",Notes="Returns the contents of the specified slot. Note that the returned item is read-only"},
HasItems={Params="{{cItem|cItem}}",Return="bool",Notes="Returns true if there are at least as many items of the specified type as in the parameter"},
HowManyCanFit={Params="{{cItem|cItem}}",Return="number",Notes="Returns the number of the specified items that can fit in the storage, including empty slots"},
HowManyItems={Params="{{cItem|cItem}}",Return="number",Notes="Returns the number of the specified items that are currently stored"},
RemoveOneEquippedItem={Params="",Return="",Notes="Removes one item from the hotbar's currently selected slot"},
SetArmorSlot={Params="ArmorSlotNum, {{cItem|cItem}}",Return="",Notes="Sets the specified armor slot contents"},
SetEquippedSlotNum={Params="EquippedSlotNum",Return="",Notes="Sets the currently selected hotbar slot number"},
SetHotbarSlot={Params="HotbarSlotNum, {{cItem|cItem}}",Return="",Notes="Sets the specified hotbar slot contents"},
SetInventorySlot={Params="InventorySlotNum, {{cItem|cItem}}",Return="",Notes="Sets the specified main inventory slot contents"},
SetSlot={Params="SlotNum, {{cItem|cItem}}",Return="",Notes="Sets the specified slot contents"},
{Params="ItemType, Count, Damage, EnchantmentString",Return="cItem",Notes="Creates a new cItem object of the specified type, count (1 by default), damage (0 by default) and enchantments (non-enchanted by default)"},
{Params="cItem",Return="cItem",Notes="Creates an exact copy of the cItem object in the parameter"},
Clear={Params="",Return="",Notes="Resets the instance to an empty item"},
CopyOne={Params="",Return="cItem",Notes="Creates a copy of this object, with its count set to 1"},
DamageItem={Params="[Amount]",Return="bool",Notes="Adds the specified damage. Returns true when damage reaches max value and the item should be destroyed (but doesn't destroy the item)"},
Empty={Params="",Return="",Notes="Resets the instance to an empty item"},
GetMaxDamage={Params="",Return="number",Notes="Returns the maximum value for damage that this item can get before breaking; zero if damage is not accounted for for this item type"},
IsEqual={Params="cItem",Return="bool",Notes="Returns true if the item in the parameter is the same as the one stored in the object (type, damage and enchantments)"},
IsSameType={Params="cItem",Return="bool",Notes="Returns true if the item in the parameter is of the same ItemType as the one stored in the object. This is true even if the two items have different enchantments"},
IsStackableWith={Params="cItem",Return="bool",Notes="Returns true if the item in the parameter is stackable with the one stored in the object. Two items with different enchantments cannot be stacked"},
AddItem={Params="{{cItem|cItem}}, [AllowNewStacks]",Return="number",Notes="Adds an item to the storage; if AllowNewStacks is true (default), will also create new stacks in empty slots. Returns the number of items added"},
AddItems={Params="{{cItems|cItems}}, [AllowNewStacks]",Return="number",Notes="Same as AddItem, but for several items at once"},
{Params="SlotNum, AddToCount",Return="number",Notes="Adds AddToCount to the count of items in the specified slot. If the slot was empty, ignores the call. Returns the new count in the slot, or -1 if invalid SlotNum"},
{Params="X, Y, AddToCount",Return="number",Notes="Adds AddToCount to the count of items in the specified slot. If the slot was empty, ignores the call. Returns the new count in the slot, or -1 if invalid slot coords"},
Clear={Params="",Return="",Notes="Empties all slots"},
CopyToItems={Params="{{cItems|cItems}}",Return="",Notes="Copies all non-empty slots into the cItems object provided; original cItems contents are preserved"},
{Params="SlotNum, [DamageAmount]",Return="bool",Notes="Adds the specified damage (1 by default) to the specified item, returns true if the item reached its max damage and should be destroyed"},
{Params="X, Y, [DamageAmount]",Return="bool",Notes="Adds the specified damage (1 by default) to the specified item, returns true if the item reached its max damage and should be destroyed"},
},
EmptySlot=
{
{Params="SlotNum",Return="",Notes="Destroys the item in the specified slot"},
{Params="X, Y",Return="",Notes="Destroys the item in the specified slot"},
GetNextEmptySlot={Params="StartFrom",Return="number",Notes="Returns the SlotNumber of the first empty slot following StartFrom, -1 if all the following slots are full"},
GetNextUsedSlot={Params="StartFrom",Return="number",Notes="Returns the SlotNumber of the first non-empty slot following StartFrom, -1 if all the following slots are full"},
GetSlotCoords={Params="SlotNum",Return="number, number",Notes="Returns the X and Y coords for the specified SlotNumber. Returns \"-1, -1\" on invalid SlotNumber"},
GetSlotNum={Params="X, Y",Return="number",Notes="Returns the SlotNumber for the specified slot coords. Returns -1 on invalid coords"},
GetWidth={Params="",Return="number",Notes="Returns the X dimension of the grid"},
HasItems={Params="{{cItem|cItem}}",Return="bool",Notes="Returns true if there are at least as many items of the specified type as in the parameter"},
HowManyCanFit={Params="{{cItem|cItem}}",Return="number",Notes="Returns the number of the specified items that can fit in the storage, including empty slots"},
HowManyItems={Params="{{cItem|cItem}}",Return="number",Notes="Returns the number of the specified items that are currently stored"},
{Params="SlotNum",Return="bool",Notes="Returns true if the specified slot is empty, or an invalid slot is specified"},
{Params="X, Y",Return="bool",Notes="Returns true if the specified slot is empty, or an invalid slot is specified"},
},
RemoveOneItem=
{
{Params="SlotNum",Return="{{cItem|cItem}}",Notes="Removes one item from the stack in the specified slot and returns it as a single cItem. Empty slots are skipped and an empty item is returned"},
{Params="X, Y",Return="{{cItem|cItem}}",Notes="Removes one item from the stack in the specified slot and returns it as a single cItem. Empty slots are skipped and an empty item is returned"},
},
SetSlot=
{
{Params="SlotNum, {{cItem|cItem}}",Return="",Notes="Sets the specified slot to the specified item"},
{Params="X, Y, {{cItem|cItem}}",Return="",Notes="Sets the specified slot to the specified item"},
EjectRecord={Params="",Return="",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)"},
GetRecord={Params="",Return="number",Notes="Returns the record currently present. Zero for no record, E_ITEM_*_DISC for records."},
PlayRecord={Params="",Return="",Notes="Plays the currently present record. No action if there's no current record."},
SetRecord={Params="number",Return="",Notes="Sets the currently present record. Use zero for no record, or E_ITEM_*_DISC for records."},
Trace={Params="{{cWorld}}, Callbacks, StartX, StartY, StartZ, EndX, EndY, EndZ",Return="bool",Notes="(STATIC) Performs the trace on the specified line. Returns true if the entire trace was processed (no callback returned true)"},
<p>Thisclassinheritsfromthe{{cWindow|cWindow}}class,soallcWindow's functions and constants can be used, in addition to the cLuaWindow-specific functions listed below.
<p>WhencreatinganewcLuaWindowobject,youneedtospecifyboththewindowtypeandthecontents' width and height. Note that MCServer accepts any combination of these, but opening a window for a player may crash their client if the contents'dimensionsdon't match the client'sexpectations.
Thiscallback,settableviatheSetOnSlotChanged()function,willbecalledwheneverthecontentsofanyslotinthewindow's contents (i. e. NOT in the player inventory!) changes.</p>
<p>Thea_WindowparameteristhecLuaWindowobjectrepresentingthewindow,a_SlotNumistheslotnumber.Thereisnoreferencetoa{{cPlayer}},becausetheslotchangeneedn't originate from the player action. To get or set the slot, you'llneedtoretrieveacPlayerobject,forexamplebycalling{{cWorld|cWorld}}:DoWithPlayer().
FamilyFromType={Params="MobType",Return="MobFamily",Notes="(STATIC) Returns the mob family (mfXXX constants) based on the mob type (mtXXX constants)"},
GetMobFamily={Params="",Return="MobFamily",Notes="Returns this mob's family (mfXXX constant)"},
GetMobType={Params="",Return="MobType",Notes="Returns the type of this mob (mtXXX constant)"},
GetSpawnDelay={Params="MobFamily",Return="number",Notes="(STATIC) Returns the spawn delay - the number of game ticks between spawn attempts - for the specified mob family."},
MobTypeToString={Params="MobType",Return="string",Notes="(STATIC) Returns the string representing the given mob type (mtXXX constant), or empty string if unknown type."},
StringToMobType={Params="string",Return="MobType",Notes="(STATIC) Returns the mob type (mtXXX constant) parsed from the string type (\"creeper\"), or mtInvalidType if unrecognized."},
constructor={Params="PosX, PosY, PosZ, {{cItem|Item}}, IsPlayerCreated, [SpeedX, SpeedY, SpeedZ]",Return="cPickup",Notes="Creates a new pickup at the specified coords. If IsPlayerCreated is true, the pickup has a longer initial collection interval."},
CollectedBy={Params="{{cPlayer}}",Return="bool",Notes="Tries to make the player collect the pickup. Returns true if the pickup was collected, at least partially."},
GetAge={Params="",Return="number",Notes="Returns the number of ticks that the pickup has existed."},
GetItem={Params="",Return="{{cItem|cItem}}",Notes="Returns the item represented by this pickup"},
IsCollected={Params="",Return="bool",Notes="Returns true if this pickup has already been collected (is waiting to be destroyed)"},
AddFoodExhaustion={Params="Exhaustion",Return="",Notes="Adds the specified number to the food exhaustion. Only positive numbers expected."},
AddToGroup={Params="GroupName",Return="",Notes="Temporarily adds the player to the specified group. The assignment is lost when the player disconnects."},
CanUseCommand={Params="Command",Return="bool",Notes="Returns true if the player is allowed to use the specified command."},
CloseWindow={Params="[CanRefuse]",Return="",Notes="Closes the currently open UI window. If CanRefuse is true (default), the window may refuse the closing."},
CloseWindowIfID={Params="WindowID, [CanRefuse]",Return="",Notes="Closes the currently open UI window if its ID matches the given ID. If CanRefuse is true (default), the window may refuse the closing."},
Feed={Params="AddFood, AddSaturation",Return="bool",Notes="Tries to add the specified amounts to food level and food saturation level (only positive amounts expected). Returns true if player was hungry and the food was consumed, false if too satiated."},
FoodPoison={Params="NumTicks",Return="",Notes="Starts the food poisoning for the specified amount of ticks; if already foodpoisoned, sets FoodPoisonedTicksRemaining to the larger of the two"},
GetAirLevel={Params="",Return="number",Notes="Returns the air level (number of ticks of air left)."},
GetClientHandle={Params="",Return="{{cClientHandle}}",Notes="Returns the client handle representing the player's connection. May be nil (AI players)."},
GetColor={Return="string",Notes="Returns the full color code to be used for this player (based on the first group). Prefix player messages with this code."},
GetEffectiveGameMode={Params="",Return="{{eGameMode|GameMode}}",Notes="Returns the current resolved game mode of the player. If the player is set to inherit the world's gamemode, returns that instead. See also GetGameMode() and IsGameModeXXX() functions."},
GetEquippedItem={Params="",Return="{{cItem}}",Notes="Returns the item that the player is currently holding; empty item if holding nothing."},
GetEyeHeight={Return="number",Notes="Returns the height of the player's eyes, in absolute coords"},
GetEyePosition={Return="{{Vector3d|EyePositionVector}}",Notes="Returns the position of the player's eyes, as a {{Vector3d}}"},
GetFoodExhaustionLevel={Params="",Return="number",Notes="Returns the food exhaustion level"},
GetFoodLevel={Params="",Return="number",Notes="Returns the food level (number of half-drumsticks on-screen)"},
GetFoodPoisonedTicksRemaining={Params="",Return="",Notes="Returns the number of ticks left for the food posoning effect"},
GetFoodSaturationLevel={Params="",Return="number",Notes="Returns the food saturation (overcharge of the food level, is depleted before food level)"},
GetFoodTickTimer={Params="",Return="",Notes="Returns the number of ticks past the last food-based heal or damage action; when this timer reaches 80, a new heal / damage is applied."},
GetGameMode={Return="{{eGameMode|GameMode}}",Notes="Returns the player's gamemode. The player may have their gamemode unassigned, in which case they inherit the gamemode from the current {{cWorld|world}}.<br /> <b>NOTE:</b> Instead of comparing the value returned by this function to the gmXXX constants, use the IsGameModeXXX() functions. These functions handle the gamemode inheritance automatically."},
GetGroups={Return="array-table of {{cGroup}}",Notes="Returns all the groups that this player is member of, as a table. The groups are stored in the array part of the table, beginning with index 1."},
GetIP={Return="string",Notes="Returns the IP address of the player, if available. Returns an empty string if there's no IP to report."},
GetInventory={Return="{{cInventory|Inventory}}",Notes="Returns the player's inventory"},
GetMaxSpeed={Params="",Return="number",Notes="Returns the player's current maximum speed (as reported by the 1.6.1+ protocols)"},
GetName={Return="string",Notes="Returns the player's name"},
GetNormalMaxSpeed={Params="",Return="number",Notes="Returns the player's maximum walking speed (as reported by the 1.6.1+ protocols)"},
GetResolvedPermissions={Return="array-table of string",Notes="Returns all the player's permissions, as a table. The permissions are stored in the array part of the table, beginning with index 1."},
GetSprintingMaxSpeed={Params="",Return="number",Notes="Returns the player's maximum sprinting speed (as reported by the 1.6.1+ protocols)"},
GetStance={Return="number",Notes="Returns the player's stance (Y-pos of player's eyes)"},
GetThrowSpeed={Params="SpeedCoeff",Return="{{Vector3d}}",Notes="Returns the speed vector for an object thrown with the specified speed coeff. Basically returns the normalized look vector multiplied by the coeff, with a slight random variation."},
GetThrowStartPos={Params="",Return="{{Vector3d}}",Notes="Returns the position where the projectiles should start when thrown by this player."},
GetWindow={Params="",Return="{{cWindow}}",Notes="Returns the currently open UI window. If the player doesn't have any UI window open, returns the inventory window."},
HasPermission={Params="PermissionString",Return="bool",Notes="Returns true if the player has the specified permission"},
Heal={Params="HitPoints",Return="",Notes="Heals the player by the specified amount of HPs. Only positive amounts are expected. Sends a health update to the client."},
IsEating={Params="",Return="bool",Notes="Returns true if the player is currently eating the item in their hand."},
IsGameModeAdventure={Params="",Return="bool",Notes="Returns true if the player is in the gmAdventure gamemode, or has their gamemode unset and the world is a gmAdventure world."},
IsGameModeCreative={Params="",Return="bool",Notes="Returns true if the player is in the gmCreative gamemode, or has their gamemode unset and the world is a gmCreative world."},
IsGameModeSurvival={Params="",Return="bool",Notes="Returns true if the player is in the gmSurvival gamemode, or has their gamemode unset and the world is a gmSurvival world."},
IsInGroup={Params="GroupNameString",Return="bool",Notes="Returns true if the player is a member of the specified group."},
IsOnGround={Params="",Return="bool",Notes="Returns true if the player is on ground (not falling, not jumping, not flying)"},
IsSatiated={Params="",Return="bool",Notes="Returns true if the player is satiated (cannot eat)."},
IsSubmerged={Params="",Return="bool",Notes="Returns true if the player is submerged in water (the player's head is in a water block)"},
IsSwimming={Params="",Return="bool",Notes="Returns true if the player is swimming in water (the player's feet are in a water block)"},
IsVisible={Params="",Return="bool",Notes="Returns true if the player is visible to other players"},
LoadPermissionsFromDisk={Params="",Return="",Notes="Reloads the player's permissions from the disk. This loses any temporary changes made to the player's groups."},
MoveTo={Params="{{Vector3d|NewPosition}}",Return="Tries to move the player into the specified position."},
MoveToWorld={Params="WorldName",Return="bool",Return="Moves the player to the specified world. Returns true if successful."},
OpenWindow={Params="{{cWindow|Window}}",Return="",Notes="Opens the specified UI window for the player."},
RemoveFromGroup={Params="GroupName",Return="",Notes="Temporarily removes the player from the specified group. This change is lost when the player disconnects."},
Respawn={Params="",Return="",Notes="Restores the health, extinguishes fire, makes visible and sends the Respawn packet."},
SendMessage={Params="MessageString",Return="",Notes="Sends the specified message to the player."},
SetCrouch={Params="IsCrouched",Return="",Notes="Sets the crouch state, broadcasts the change to other players."},
SetFoodExhaustionLevel={Params="ExhaustionLevel",Return="",Notes="Sets the food exhaustion to the specified level."},
SetFoodLevel={Params="FoodLevel",Return="",Notes="Sets the food level (number of half-drumsticks on-screen)"},
SetFoodPoisonedTicksRemaining={Params="FoodPoisonedTicksRemaining",Return="",Notes="Sets the number of ticks remaining for food poisoning. Doesn't send foodpoisoning effect to the client, use FoodPoison() for that."},
SetFoodSaturationLevel={Params="FoodSaturationLevel",Return="",Notes="Sets the food saturation (overcharge of the food level)."},
SetFoodTickTimer={Params="FoodTickTimer",Return="",Notes="Sets the number of ticks past the last food-based heal or damage action; when this timer reaches 80, a new heal / damage is applied."},
SetGameMode={Params="{{eGameMode|NewGameMode}}",Return="",Notes="Sets the gamemode for the player. The new gamemode overrides the world's default gamemode, unless it is set to gmInherit."},
SetName={Params="Name",Return="",Notes="Sets the player name. This rename will NOT be visible to any players already in the server who are close enough to see this player."},
SetNormalMaxSpeed={Params="NormalMaxSpeed",Return="",Notes="Sets the normal (walking) maximum speed (as reported by the 1.6.1+ protocols)"},
SetSprint={Params="IsSprinting",Return="",Notes="Sets whether the player is sprinting or not."},
SetSprintingMaxSpeed={Params="SprintingMaxSpeed",Return="",Notes="Sets the sprinting maximum speed (as reported by the 1.6.1+ protocols)"},
SetVisible={Params="IsVisible",Return="",Notes="Sets the player visibility to other players"},
TossItem={Params="DraggedItem, [Amount], [CreateType], [CreateDamage]",Return="",Notes="FIXME: This function will be rewritten, avoid it. It tosses an item, either from the inventory, dragged in hand (while in UI window) or a newly created one."},
Call={Params="Function name, [All the parameters divided with commas]",Notes="This function allows you to call a function from another plugin. It can only use pass: integers, booleans, strings and usertypes (cPlayer, cEntity, cCuboid, etc.)."},
GetDirectory={Return="string",Notes="Returns the name of the folder where the plugin's files are. (APIDump)"},
GetLocalDirectory={Notes="OBSOLETE use GetLocalFolder instead."},
GetLocalFolder={Return="string",Notes="Returns the path where the plugin's files are. (Plugins/APIDump)"},
GetName={Return="string",Notes="Returns the name of the plugin."},
SetName={Params="string",Notes="Sets the name of the Plugin."},
GetVersion={Return="number",Notes="Returns the version of the plugin."},
SetVersion={Params="number",Notes="Sets the version of the plugin."},
{Params="HookType, [HookFunction]",Return="",Notes="(STATIC) Informs the plugin manager that it should call the specified function when the specified hook event occurs. If a function is not specified, a default function name is looked up, based on the hook type"},
{Params="{{cPlugin|Plugin}}, HookType, [HookFunction]",Return="",Notes="(STATIC, <b>DEPRECATED</b>) Informs the plugin manager that it should call the specified function when the specified hook event occurs. If a function is not specified, a default function name is looked up, based on the hook type. NOTE: This format is deprecated and the server outputs a warning if it is used!"},
},
BindCommand=
{
{Params="Command, Permission, Callback, HelpString",Return="",Notes="(STATIC) Binds an in-game command with the specified callback function, permission and help string. By common convention, providing an empty string for HelpString will hide the command from the /help display."},
{Params="Command, Permission, Callback, HelpString",Return="",Notes="Binds an in-game command with the specified callback function, permission and help string. By common convention, providing an empty string for HelpString will hide the command from the /help display."},
},
BindConsoleCommand=
{
{Params="Command, Callback, HelpString",Return="",Notes="(STATIC) Binds a console command with the specified callback function and help string. By common convention, providing an empty string for HelpString will hide the command from the \"help\" console command."},
{Params="Command, Callback, HelpString",Return="",Notes="Binds a console command with the specified callback function and help string. By common convention, providing an empty string for HelpString will hide the command from the \"help\" console command."},
},
DisablePlugin={Params="PluginName",Return="bool",Notes="Disables a plugin specified by its name. Returns true if the plugin was disabled, false if it wasn't found or wasn't active."},
ExecuteCommand={Params="{{cPlayer|Player}}, CommandStr",Return="bool",Notes="Executes the command as if given by the specified Player. Checks permissions. Returns true if executed."},
FindPlugins={Params="",Return="",Notes="Refreshes the list of plugins to include all folders inside the Plugins folder (potentially new disabled plugins)"},
ForEachCommand={Params="CallbackFn",Return="bool",Notes="Calls the CallbackFn function for each command that has been bound using BindCommand(). The CallbackFn has the following signature: <pre class=\"prettyprint lang-lua\">function(Command, Permission, HelpString)</pre>. If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true."},
ForEachConsoleCommand={Params="CallbackFn",Return="bool",Notes="Calls the CallbackFn function for each command that has been bound using BindConsoleCommand(). The CallbackFn has the following signature: <pre class=\"prettyprint lang-lua\">function (Command, HelpString)</pre>. If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true."},
IsCommandBound={Params="Command",Return="bool",Notes="Returns true if in-game Command is already bound (by any plugin)"},
IsConsoleCommandBound={Params="Command",Return="bool",Notes="Returns true if console Command is already bound (by any plugin)"},
LoadPlugin={Params="PluginFolder",Return="",Notes="(<b>DEPRECATED</b>) Loads a plugin from the specified folder. NOTE: Loading plugins may be an unsafe operation and may result in a deadlock or a crash. This API is deprecated and might be removed."},
HOOK_BLOCK_TO_PICKUPS={Notes="Called when a block has been dug and is being converted to pickups. The server has provided the default pickups and the plugins may modify them."},
HOOK_CHAT={Notes="Called when a client sends a chat message that is not a command. The plugin may modify the chat message"},
HOOK_CHUNK_AVAILABLE={Notes="Called when a chunk is loaded or generated and becomes available in the {{cWorld|world}}."},
HOOK_CHUNK_GENERATED={Notes="Called after a chunk is generated. A plugin may do last modifications on the generated chunk before it is handed of to the {{cWorld|world}}."},
HOOK_CHUNK_GENERATING={Notes="Called before a chunk is generated. A plugin may override some parts of the generation algorithm."},
HOOK_CHUNK_UNLOADED={Notes="Called after a chunk has been unloaded from a {{cWorld|world}}."},
HOOK_CHUNK_UNLOADING={Notes="Called before a chunk is unloaded from a {{cWorld|world}}. The chunk has already been saved."},
HOOK_COLLECTING_PICKUP={Notes="Called when a player is about to collect a pickup."},
HOOK_CRAFTING_NO_RECIPE={Notes="Called when a player has items in the crafting slots and the server cannot locate any recipe. Plugin may provide a recipe."},
HOOK_DISCONNECT={Notes="Called after the player has disconnected."},
HOOK_EXECUTE_COMMAND={Notes="Called when a client sends a chat message that is recognized as a command, before handing that command to the regular command handler. A plugin may stop the command from being handled. This hook is called even when the player doesn't have permissions for the command."},
HOOK_EXPLODED={Notes="Called after an explosion has been processed in a {{cWorld|world}}."},
HOOK_EXPLODING={Notes="Called before an explosion is processed in a {{cWorld|world}}. A plugin may alter the explosion parameters or cancel the explosion altogether."},
HOOK_HANDSHAKE={Notes="Called when a Handshake packet is received from a client."},
HOOK_HOPPER_PULLING_ITEM={Notes="Called when a hopper is pulling an item from the container above it."},
HOOK_HOPPER_PUSHING_ITEM={Notes="Called when a hopper is pushing an item into the container it is aimed at."},
HOOK_KILLING={Notes="Called when an entity has just been killed. A plugin may resurrect the entity by setting its health to above zero."},
HOOK_LOGIN={Notes="Called when a Login packet is sent to the client, before the client is queued for authentication."},
HOOK_MAX={Notes="The maximum TypeID of a hook. Used internally by MCS to check hook type for validity."},
HOOK_NUM_HOOKS={Notes="Total number of hook types MCS supports. Used internally by MCS to check hook type for validity."},
HOOK_PLAYER_ANIMATION={Notes="Called when a client send the Animation packet."},
HOOK_PLAYER_BREAKING_BLOCK={Notes="Called when a player is about to break a block. A plugin may cancel the event."},
HOOK_PLAYER_BROKEN_BLOCK={Notes="Called after a player has broken a block."},
HOOK_PLAYER_EATING={Notes="Called when the player starts eating a held item. Plugins may abort the eating."},
HOOK_PLAYER_JOINED={Notes="Called when the player entity has been created. It has not yet been fully initialized."},
HOOK_PLAYER_LEFT_CLICK={Notes="Called when the client sends the LeftClick packet."},
HOOK_PLAYER_MOVING={Notes="Called when the player has moved and the movement is now being applied."},
HOOK_PLAYER_PLACED_BLOCK={Notes="Called when the player has just placed a block"},
HOOK_PLAYER_PLACING_BLOCK={Notes="Called when the player is about to place a block. A plugin may cancel the event."},
HOOK_PLAYER_RIGHT_CLICK={Notes="Called when the client sends the RightClick packet."},
HOOK_PLAYER_RIGHT_CLICKING_ENTITY={Notes="Called when the client sends the UseEntity packet."},
HOOK_PLAYER_SHOOTING={Notes="Called when the player releases the mouse button to fire their bow."},
HOOK_PLAYER_SPAWNED={Notes="Called after the player entity has been created. The entity is fully initialized and is spawning in the {{cWorld|world}}."},
HOOK_PLAYER_TOSSING_ITEM={Notes="Called when the player is tossing the held item (keypress Q)"},
HOOK_PLAYER_USED_BLOCK={Notes="Called after the player has right-clicked a block"},
HOOK_PLAYER_USED_ITEM={Notes="Called after the player has right-clicked with a usable item in their hand."},
HOOK_PLAYER_USING_BLOCK={Notes="Called when the player is about to use (right-click) a block"},
HOOK_PLAYER_USING_ITEM={Notes="Called when the player is about to right-click with a usable item in their hand."},
HOOK_POST_CRAFTING={Notes="Called after a valid recipe has been chosen for the current contents of the crafting grid. Plugins may modify the recipe."},
HOOK_PRE_CRAFTING={Notes="Called before a recipe is searched for the current contents of the crafting grid. Plugins may provide a recipe and cancel the built-in search."},
HOOK_SPAWNED_ENTITY={Notes="Called after an entity is spawned in a {{cWorld|world}}. The entity is already part of the world."},
HOOK_SPAWNED_MONSTER={Notes="Called after a mob is spawned in a {{cWorld|world}}. The mob is already part of the world."},
HOOK_SPAWNING_ENTITY={Notes="Called just before an entity is spawned in a {{cWorld|world}}."},
HOOK_SPAWNING_MONSTER={Notes="Called just before a mob is spawned in a {{cWorld|world}}."},
HOOK_TAKE_DAMAGE={Notes="Called when an entity is taking any kind of damage. Plugins may modify the damage value, effects, source or cancel the damage."},
HOOK_TICK={Notes="Called when the main server thread ticks - 20 times a second."},
HOOK_UPDATED_SIGN={Notes="Called after a {{cSignEntity|sign}} text has been updated, either by a player or by any external means."},
HOOK_UPDATING_SIGN={Notes="Called before a {{cSignEntity|sign}} text is updated, either by a player or by any external means."},
HOOK_WEATHER_CHANGED={Notes="Called after the weather has changed."},
HOOK_WEATHER_CHANGING={Notes="Called just before the weather changes"},
HOOK_WORLD_TICK={Notes="Called in each world's tick thread when the game logic is about to tick (20 times a second)."},
ForEachPlayer={Params="CallbackFunction",Return="",Notes="Calls the given callback function for each player. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|cPlayer}})</pre>"},
ForEachWorld={Params="CallbackFunction",Return="",Notes="Calls the given callback function for each world. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cWorld|cWorld}})</pre>"},
GetPhysicalRAMUsage={Params="",Return="number",Notes="Returns the amount of physical RAM that the entire MCServer process is using, in KiB. Negative if the OS doesn't support this query."},
GetPluginManager={Params="",Return="{{cPluginManager|cPluginManager}}",Notes="Returns the cPluginManager object."},
GetPrimaryServerVersion={Params="",Return="number",Notes="Returns the servers primary server version."},
GetProtocolVersionTextFromInt={Params="Protocol Version",Return="string",Notes="Returns the Minecraft version from the given Protocol. If there is no version found, it returns 'Unknown protocol(Parameter)'"},
GetServer={Params="",Return="{{cServer|cServer}}",Notes="Returns the cServer object."},
GetTotalChunkCount={Params="",Return="number",Notes="Returns the amount of loaded chunks."},
GetVirtualRAMUsage={Params="",Return="number",Notes="Returns the amount of virtual RAM that the entire MCServer process is using, in KiB. Negative if the OS doesn't support this query."},
GetWebAdmin={Params="",Return="{{cWebAdmin|cWebAdmin}}",Notes="Returns the cWebAdmin object."},
GetWorld={Params="WorldName",Return="{{cWorld|cWorld}}",Notes="Returns the cWorld object of the given world. It returns nil if there is no world with the given name."},
QueueExecuteConsoleCommand={Params="Message",Return="",Notes="Queues a console command for execution through the cServer class. The command will be executed in the tick thread. The command's output will be sent to console."},
SaveAllChunks={Params="",Return="",Notes="Saves all the chunks in all the worlds. Note that the saving is queued on each world's tick thread and this functions returns before the chunks are actually saved."},
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."},
GetHTMLEscapedString={Params="string",Return="string",Notes="Gets the HTML escaped representation of a requested string. This is useful for user input and game data that is not guaranteed to be escaped already."},
GetSlot={Params="{{cPlayer|Player}}, SlotNumber",Return="{{cItem}}",Notes="Returns the item at the specified slot for the specified player. Returns nil and logs to server console on error."},
IsSlotInPlayerHotbar={Params="SlotNum",Return="bool",Notes="Returns true if the specified slot number is in the player hotbar"},
IsSlotInPlayerInventory={Params="SlotNum",Return="bool",Notes="Returns true if the specified slot number is in the player's main inventory or in the hotbar. Note that this returns false for armor slots!"},
IsSlotInPlayerMainInventory={Params="SlotNum",Return="bool",Notes="Returns true if the specified slot number is in the player's main inventory"},
SetProperty={Params="PropertyID, PropartyValue, {{cPlayer|Player}}",Return="",Notes="Sends the UpdateWindowProperty (0x69) packet to the specified player; or to all players who are viewing this window if Player is not specified or nil."},
SetSlot={Params="{{cPlayer|Player}}, SlotNum, {{cItem|cItem}}",Return="",Notes="Sets the contents of the specified slot for the specified player. Ignored if the slot number is invalid"},
BroadcastChat={Params="Message, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Sends the Message to all players in this world, except the optional ExceptClient"},
BroadcastSoundEffect={Params="SoundName, X, Y, Z, Volume, Pitch, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Sends the specified sound effect to all players in this world, except the optional ExceptClient"},
BroadcastSoundParticleEffect={Params="EffectID, X, Y, Z, EffectData, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Sends the specified effect to all players in this world, except the optional ExceptClient"},
CastThunderbolt={Params="X, Y, Z",Return="",Notes="Creates a thunderbolt at the specified coords"},
ChangeWeather={Params="",Return="",Notes="Forces the weather to change in the next game tick. Weather is changed according to the normal rules: wSunny <-> wRain <-> wStorm"},
CreateProjectile={Params="X, Y, Z, {{cProjectileEntity|ProjectileKind}}, {{cEntity|Creator}}, [{{Vector3d|Speed}}]",Return="",Notes="Creates a new projectile of the specified kind at the specified coords. The projectile's creator is set to Creator (may be nil). Optional speed indicates the initial speed for the projectile."},
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."},
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."},
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."},
DoWithDropSpenserAt={Params="X, Y, Z, CallbackFunction, [CallbackData]",Return="bool",Notes="If there is a dropper or a dispenser at the specified coords, calls the CallbackFunction with the {{cDropSpenserEntity}} parameter representing the dropper or dispenser. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cDropSpenserEntity|DropSpenserEntity}}, [CallbackData])</pre> Note that this can be used to access both dispensers and droppers in a similar way. The function returns false if there is neither dispenser nor dropper, or if there is, it returns the bool value that the callback has returned."},
DoWithDropperAt={Params="X, Y, Z, CallbackFunction, [CallbackData]",Return="bool",Notes="If there is a dropper at the specified coords, calls the CallbackFunction with the {{cDropperEntity}} parameter representing the dropper. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cDropperEntity|DropperEntity}}, [CallbackData])</pre> The function returns false if there is no dropper, or if there is, it returns the bool value that the callback has returned."},
DoWithEntityByID={Params="EntityID, CallbackFunction, [CallbackData]",Return="bool",Notes="If an entity with the specified ID exists, calls the callback with the {{cEntity}} parameter representing the entity. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cEntity|Entity}}, [CallbackData])</pre> The function returns false if the entity was not found, and it returns the same bool value that the callback has returned if the entity was found."},
DoWithFurnaceAt={Params="X, Y, Z, CallbackFunction, [CallbackData]",Return="bool",Notes="If there is a furnace at the specified coords, calls the CallbackFunction with the {{cFurnaceEntity}} parameter representing the furnace. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cFurnaceEntity|FurnaceEntity}}, [CallbackData])</pre> The function returns false if there is no furnace, or if there is, it returns the bool value that the callback has returned."},
DoWithPlayer={Params="PlayerName, CallbackFunction, [CallbackData]",Return="bool",Notes="If there is a player of the specified name (exact match), calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}}, [CallbackData])</pre> The function returns false if the player was not found, or whatever bool value the callback returned if the player was found."},
{Params="X, Y, Z, BlockType, BlockMeta",Return="",Notes="Sets the block at the specified coords, without waking up the simulators or replacing the block entities for the previous block type. Do not use if the block being replaced has a block entity tied to it!"},
{Params="{{Vector3i|BlockCoords}}, BlockType, BlockMeta",Return="",Notes="Sets the block at the specified coords, without waking up the simulators or replacing the block entities for the previous block type. Do not use if the block being replaced has a block entity tied to it!"},
FindAndDoWithPlayer={Params="PlayerNameHint, CallbackFunction, [CallbackData]",Return="bool",Notes="If there is a player of a name similar to the specified name (weighted-match), calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}}, [CallbackData])</pre> The function returns false if the player was not found, or whatever bool value the callback returned if the player was found. Note that the name matching is very loose, so it is a good idea to check the player name in the callback function."},
ForEachBlockEntityInChunk={Params="ChunkX, ChunkZ, CallbackFunction, [CallbackData]",Return="bool",Notes="Calls the specified callback for each block entity in the chunk. Returns true if all block entities in the chunk have been processed (including when there are zero block entities), or false if the callback has aborted the enumeration by returning true. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cBlockEntity|BlockEntity}}, [CallbackData])</pre> The callback should return false or no value to continue with the next block entity, or true to abort the enumeration. Use {{tolua}}.cast() to cast the Callback's BlockEntity parameter to the correct {{cBlockEntity}} descendant."},
ForEachChestInChunk={Params="ChunkX, ChunkZ, CallbackFunction, [CallbackData]",Return="bool",Notes="Calls the specified callback for each chest in the chunk. Returns true if all chests in the chunk have been processed (including when there are zero chests), or false if the callback has aborted the enumeration by returning true. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cChestEntity|ChestEntity}}, [CallbackData])</pre> The callback should return false or no value to continue with the next chest, or true to abort the enumeration."},
ForEachEntity={Params="CallbackFunction, [CallbackData]",Return="bool",Notes="Calls the specified callback for each entity in the loaded world. Returns true if all the entities have been processed (including when there are zero entities), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cEntity|Entity}}, [CallbackData])</pre> The callback should return false or no value to continue with the next entity, or true to abort the enumeration."},
ForEachEntityInChunk={Params="ChunkX, ChunkZ, CallbackFunction, [CallbackData]",Return="bool",Notes="Calls the specified callback for each entity in the specified chunk. Returns true if all the entities have been processed (including when there are zero entities), or false if the chunk is not loaded or the callback function has aborted the enumeration by returning true. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cEntity|Entity}}, [CallbackData])</pre> The callback should return false or no value to continue with the next entity, or true to abort the enumeration."},
ForEachFurnaceInChunk={Params="ChunkX, ChunkZ, CallbackFunction, [CallbackData]",Return="bool",Notes="Calls the specified callback for each furnace in the chunk. Returns true if all furnaces in the chunk have been processed (including when there are zero furnaces), or false if the callback has aborted the enumeration by returning true. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cFurnaceEntity|FurnaceEntity}}, [CallbackData])</pre> The callback should return false or no value to continue with the next furnace, or true to abort the enumeration."},
ForEachPlayer={Params="CallbackFunction, [CallbackData]",Return="bool",Notes="Calls the specified callback for each player in the loaded world. Returns true if all the players have been processed (including when there are zero players), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}}, [CallbackData])</pre> The callback should return false or no value to continue with the next player, or true to abort the enumeration."},
GenerateChunk={Params="ChunkX, ChunkZ",Return="",Notes="Queues the specified chunk in the chunk generator. Ignored if the chunk is already generated (use RegenerateChunk() to force chunk re-generation)."},
GetBiomeAt={Params="BlockX, BlockZ",Return="eBiome",Notes="Returns the biome at the specified coords. Reads the biome from the chunk, if it is loaded, otherwise it uses the chunk generator to provide the biome value."},
{Params="BlockX, BlockY, BlockZ",Return="BLOCKTYPE",Notes="Returns the block type of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
{Params="{{Vector3i|BlockCoords}}",Return="BLOCKTYPE",Notes="Returns the block type of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
GetBlockBlockLight={Params="BlockX, BlockY, BlockZ",Return="number",Notes="Returns the amount of block light at the specified coords, or 0 if the appropriate chunk is not loaded."},
GetBlockInfo={Params="BlockX, BlockY, BlockZ",Return="BlockValid, BlockType, BlockMeta, BlockSkyLight, BlockBlockLight",Notes="Returns the complete block info for the block at the specified coords. The first value specifies if the block is in a valid loaded chunk, the other values are valid only if BlockValid is true."},
{Params="BlockX, BlockY, BlockZ",Return="number",Notes="Returns the block metadata of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
{Params="{{Vector3i|BlockCoords}}",Return="number",Notes="Returns the block metadata of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
GetBlockSkyLight={Params="BlockX, BlockY, BlockZ",Return="number",Notes="Returns the block skylight of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
GetBlockTypeMeta={Params="BlockX, BlockY, BlockZ",Return="BlockValid, BlockType, BlockMeta",Notes="Returns the block type and metadata for the block at the specified coords. The first value specifies if the block is in a valid loaded chunk, the other values are valid only if BlockValid is true."},
GetDimension={Params="",Return="eDimension",Notes="Returns the dimension of the world - dimOverworld, dimNether or dimEnd."},
GetGameMode={Params="",Return="eGameMode",Notes="Returns the gamemode of the world - gmSurvival, gmCreative or gmAdventure."},
GetGeneratorQueueLength={Params="",Return="number",Notes="Returns the number of chunks that are queued in the chunk generator."},
GetHeight={Params="BlockX, BlockZ",Return="number",Notes="Returns the maximum height of the particula block column in the world. If the chunk is not loaded, it waits for it to load / generate. <b>WARNING</b>: Do not use, Use TryGetHeight() instead for a non-waiting version, otherwise you run the risk of a deadlock!"},
GetIniFileName={Params="",Return="string",Notes="Returns the name of the world.ini file that the world uses to store the information."},
GetLightingQueueLength={Params="",Return="number",Notes="Returns the number of chunks in the lighting thread's queue."},
GetMaxCactusHeight={Params="",Return="number",Notes="Returns the configured maximum height to which cacti will grow naturally."},
GetMaxSugarcaneHeight={Params="",Return="number",Notes="Returns the configured maximum height to which sugarcane will grow naturally."},
GetName={Params="",Return="string",Notes="Returns the name of the world, as specified in the settings.ini file."},
GetNumChunks={Params="",Return="number",Notes="Returns the number of chunks currently loaded."},
GetSignLines={Params="BlockX, BlockY, BlockZ",Return="IsValid, [Line1, Line2, Line3, Line4]",Notes="Returns true and the lines of a sign at the specified coords, or false if there is no sign at the coords."},
GetSpawnX={Params="",Return="number",Notes="Returns the X coord of the default spawn"},
GetSpawnY={Params="",Return="number",Notes="Returns the Y coord of the default spawn"},
GetSpawnZ={Params="",Return="number",Notes="Returns the Z coord of the default spawn"},
GetStorageLoadQueueLength={Params="",Return="number",Notes="Returns the number of chunks queued up for loading"},
GetStorageSaveQueueLength={Params="",Return="number",Notes="Returns the number of chunks queued up for saving"},
GetTicksUntilWeatherChange={Params="",Return="number",Notes="Returns the number of ticks that will pass before the weather is changed"},
GetTimeOfDay={Params="",Return="number",Notes="Returns the number of ticks that have passed from the sunrise, 0 .. 24000."},
GetWeather={Params="",Return="eWeather",Notes="Returns the current weather in the world (wSunny, wRain, wStorm). To check for weather, use IsWeatherXXX() functions instead."},
GetWorldAge={Params="",Return="number",Notes="Returns the total age of the world, in ticks. The age always grows, cannot be set by plugins and is unrelated to TimeOfDay."},
GrowCactus={Params="BlockX, BlockY, BlockZ, NumBlocksToGrow",Return="",Notes="Grows a cactus block at the specified coords, by up to the specified number of blocks. Adheres to the world's maximum cactus growth (GetMaxCactusHeight())."},
GrowMelonPumpkin={Params="BlockX, BlockY, BlockZ, StemType",Return="",Notes="Grows a melon or pumpkin, based on the stem type specified (assumed to be in the coords provided). Checks for normal melon / pumpkin growth conditions - stem not having another produce next to it and suitable ground below."},
GrowRipePlant={Params="BlockX, BlockY, BlockZ, IsByBonemeal",Return="bool",Notes="Grows the plant at the specified coords. If IsByBonemeal is true, checks first if the specified plant type is bonemealable in the settings. Returns true if the plant was grown, false if not."},
GrowSugarcane={Params="BlockX, BlockY, BlockZ, NumBlocksToGrow",Return="",Notes="Grows a sugarcane block at the specified coords, by up to the specified number of blocks. Adheres to the world's maximum sugarcane growth (GetMaxSugarcaneHeight())."},
GrowTree={Params="BlockX, BlockY, BlockZ",Return="",Notes="Grows a tree based at the specified coords. If there is a sapling there, grows the tree based on that sapling, otherwise chooses a tree image based on the biome."},
GrowTreeByBiome={Params="BlockX, BlockY, BlockZ",Return="",Notes="Grows a tree based at the specified coords. The tree type is picked from types available for the biome at those coords."},
GrowTreeFromSapling={Params="BlockX, BlockY, BlockZ, SaplingMeta",Return="",Notes="Grows a tree based at the specified coords. The tree type is determined from the sapling meta (the sapling itself needn't be present)."},
IsBlockDirectlyWatered={Params="BlockX, BlockY, BlockZ",Return="bool",Notes="Returns true if the specified block has a water block right next to it (on the X/Z axes)"},
IsDeepSnowEnabled={Params="",Return="bool",Notes="Returns whether the configuration has DeepSnow enabled."},
IsGameModeAdventure={Params="",Return="bool",Notes="Returns true if the current gamemode is gmAdventure."},
IsGameModeCreative={Params="",Return="bool",Notes="Returns true if the current gamemode is gmCreative."},
IsGameModeSurvival={Params="",Return="bool",Notes="Returns true if the current gamemode is gmSurvival."},
IsPVPEnabled={Params="",Return="bool",Notes="Returns whether PVP is enabled in the world settings."},
QueueBlockForTick={Params="BlockX, BlockY, BlockZ, TicksToWait",Return="",Notes="Queues the specified block to be ticked after the specified number of gameticks."},
QueueSaveAllChunks={Params="",Return="",Notes="Queues all chunks to be saved in the world storage thread"},
QueueSetBlock={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta, TickDelay",Return="",Notes="Queues the block to be set to the specified blocktype and meta after the specified amount of game ticks. Uses SetBlock() for the actual setting, so simulators are woken up and block entities are handled correctly."},
QueueTask={Params="TaskFunction",Return="",Notes="Queues the specified function to be executed in the tick thread. This is the primary means of interaction with a cWorld from the WebAdmin page handlers (see {{WebWorldThreads}}). The function signature is <pre class=\"pretty-print lang-lua\">function()</pre>All return values from the function are ignored. Note that this function is actually called *after* the QueueTask() function returns."},
RegenerateChunk={Params="ChunkX, ChunkZ",Return="",Notes="Queues the specified chunk to be re-generated, overwriting the current data. To queue a chunk for generating only if it doesn't exist, use the GenerateChunk() instead."},
SendBlockTo={Params="BlockX, BlockY, BlockZ, {{cPlayer|Player}}",Return="",Notes="Sends the block at the specified coords to the specified player's client, as an UpdateBlock packet."},
SetBlock={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block at the specified coords, replaces the block entities for the previous block type, creates a new block entity for the new block, if appropriate, and wakes up the simulators. This is the preferred way to set blocks, as opposed to FastSetBlock(), which is only to be used under special circumstances."},
SetBlockMeta=
{
{Params="BlockX, BlockY, BlockZ, BlockMeta",Return="",Notes="Sets the meta for the block at the specified coords."},
{Params="{{Vector3i|BlockCoords}}, BlockMeta",Return="",Notes="Sets the meta for the block at the specified coords."},
},
SetNextBlockTick={Params="BlockX, BlockY, BlockZ",Return="",Notes="Sets the blockticking to start at the specified block in the next tick."},
SetSignLines={Params="X, Y, Z, Line1, Line2, Line3, Line4, [{{cPlayer|Player}}]",Return="",Notes="Sets the sign text at the specified coords. The sign-updating hooks are called for the change. The Player parameter is used to indicate the player from whom the change has come, it may be nil. Same as UpdateSign()."},
SetTicksUntilWeatherChange={Params="NumTicks",Return="",Notes="Sets the number of ticks after which the weather will be changed."},
SetTimeOfDay={Params="TimeOfDayTicks",Return="",Notes="Sets the time of day, expressed as number of ticks past sunrise, in the range 0 .. 24000."},
SetWeather={Params="Weather",Return="",Notes="Sets the current weather (wSunny, wRain, wStorm) and resets the TicksUntilWeatherChange to the default value for the new weather. The normal weather-changing hooks are called for the change."},
SpawnItemPickups=
{
{Params="{{cItems|Pickups}}, X, Y, Z, FlyAwaySpeed",Return="",Notes="Spawns the specified pickups at the position specified. The FlyAway speed is used to initialize the random speed in which the pickups fly away from the spawn position."},
{Params="{{cItems|Pickups}}, X, Y, Z, SpeedX, SpeedY, SpeedZ",Return="",Notes="Spawns the specified pickups at the position specified. All the pickups fly away from the spawn position using the specified speed."},
},
SpawnMob={Params="X, Y, Z, {{cMonster|MonsterType}}",Return="EntityID",Notes="Spawns the specified type of mob at the specified coords. Returns the EntityID of the creates entity, or -1 on failure. "},
SpawnPrimedTNT={Params="X, Y, Z, FuseTimeSecs, InitialVelocityCoeff",Return="",Notes="Spawns a {{cTNTEntity|primed TNT entity}} at the specified coords, with the given fuse time. The entity gets a random speed multiplied by the InitialVelocityCoeff, 1 being the default value."},
TryGetHeight={Params="BlockX, BlockZ",Return="IsValid, Height",Notes="Returns true and height of the highest non-air block if the chunk is loaded, or false otherwise."},
UnloadUnusedChunks={Params="",Return="",Notes="Unloads chunks that are no longer needed, and are saved. NOTE: This API is deprecated and will be removed soon."},
UpdateSign={Params="X, Y, Z, Line1, Line2, Line3, Line4, [{{cPlayer|Player}}]",Return="",Notes="Sets the sign text at the specified coords. The sign-updating hooks are called for the change. The Player parameter is used to indicate the player from whom the change has come, it may be nil. Same as SetSignLiens()"},
UseBlockEntity={Params="{{cPlayer|Player}}, BlockX, BlockY, BlockZ",Return="",Notes="Makes the specified Player use the block entity at the specified coords (open chest UI, etc.) If the cords are in an unloaded chunk or there's no block entity, ignores the call."},
WakeUpSimulators={Params="BlockX, BlockY, BlockZ",Return="",Notes="Wakes up the simulators for the specified block."},
WakeUpSimulatorsInArea={Params="MinBlockX, MaxBlockX, MinBlockY, MaxBlockY, MinBlockZ, MaxBlockZ",Return="",Notes="Wakes up the simulators for all the blocks in the specified area (edges inclusive)."},
FormData={Notes="Array-table of {{HTTPFormData}}, contains the values of individual form elements submitted by the client"},
Params={Notes="Map-table of parameters given to the request in the URL (?param=value); if a form uses GET method, this is the same as FormData. For each parameter given as \"param=value\", there is an entry in the table with \"param\" as its key and \"value\" as its value."},
PostParams={Notes="Map-table of data posted through a FORM - either a GET or POST method. Logically the same as FormData, but in a map-table format (for each parameter given as \"param=value\", there is an entry in the table with \"param\" as its key and \"value\" as its value)."},
},
Variables=
{
Method={Type="string",Notes="The HTTP method used to make the request. Usually GET or POST."},
Path={Type="string",Notes="The Path part of the URL (excluding the parameters)"},
Username={Type="string",Notes="Name of the logged-in user."},
IsArmor={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of an armor."},
IsAxe={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of an axe."},
IsBoots={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of boots."},
IsChestPlate={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a chestplate."},
IsHelmet={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a helmet."},
IsHoe={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a hoe."},
IsLeggings={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a leggings."},
IsPickaxe={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a pickaxe."},
IsShovel={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a shovel."},
IsSword={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a sword."},
IsTool={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a tool (axe, hoe, pickaxe, shovel or FIXME: sword)"},
new={Params="CallbacksTable, [SeparatorChar]",Return="XMLParser object",Notes="Creates a new XML parser object, with the specified callbacks table and optional separator character."},
<tr><td>StartElement</td><td>Parser,ElementName,AttributesTable</td><td>CalledwhentheparserdetectsthestartofanXMLelement.TheAttributesTableisaLuatablecontainingalltheelement's attributes, both in the array section (in the order received) and in the dictionary section.</td></tr>
Attacker={Type="{{cEntity}}",Notes="The entity who is attacking. Only valid if dtAttack."},
DamageType={Type="eDamageType",Notes="Source of the damage. One of the dtXXX constants."},
FinalDamage={Type="number",Notes=" The final amount of damage that will be applied to the Receiver. It is the RawDamage minus any Receiver's armor-protection "},
Knockback={Type="{{Vector3d}}",Notes="Vector specifying the amount and direction of knockback that will be applied to the Receiver "},
RawDamage={Type="number",Notes="Amount of damage that the attack produces on the Receiver, including the Attacker's equipped weapon, but excluding the Receiver's armor."},
leveloperationsandqueriesontheobjects.Seealsothetolua++'s documentation at
{{http://www.codenix.com/~tolua/tolua++.html#utilities}}.Normallyyoushouldn't use any of these
functionsexceptforcast()andtype()
]],
Functions=
{
cast={Params="Object, TypeStr",Return="Object",Notes="Casts the object to the specified type through the inheritance hierarchy."},
getpeer={Params="",Return="",Notes=""},
inherit={Params="",Return="",Notes=""},
releaseownership={Params="",Return="",Notes=""},
setpeer={Params="",Return="",Notes=""},
takeownership={Params="",Return="",Notes=""},
type={Params="Object",Return="TypeStr",Notes="Returns a string representing the type of the object. This works similar to Lua's built-in type() function, but recognizes the underlying C++ types, too."},
{Params="{{Vector3f}}",Return="Vector3d",Notes="Creates a new Vector3d object by copying the coords from the given Vector3f."},
{Params="",Return="Vector3d",Notes="Creates a new Vector3d object with all its coords set to 0."},
{Params="X, Y, Z",Return="Vector3d",Notes="Creates a new Vector3d object with its coords set to the specified values."},
},
operator_div={Params="number",Return="Vector3d",Notes="Returns a new Vector3d with each coord divided by the specified number."},
operator_mul={Params="number",Return="Vector3d",Notes="Returns a new Vector3d with each coord multiplied."},
operator_sub={Params="Vector3d",Return="Vector3d",Notes="Returns a new Vector3d containing the difference between this object and the specified vector."},
operator_plus={Params="Vector3d",Return="Vector3d",Notes="Returns a new Vector3d containing the sum of this vector and the specified vector"},
Cross={Params="Vector3d",Return="Vector3d",Notes="Returns a new Vector3d that is a {{http://en.wikipedia.org/wiki/Cross_product|cross product}} of this vector and the specified vector."},
Dot={Params="Vector3d",Return="number",Notes="Returns the dot product of this vector and the specified vector."},
Equals={Params="Vector3d",Return="bool",Notes="Returns true if this vector is exactly equal to the specified vector."},
Length={Params="",Return="number",Notes="Returns the (euclidean) length of the vector."},
LineCoeffToXYPlane={Params="Vector3d, Z",Return="number",Notes="Returns the coefficient for the line from the specified vector through this vector to reach the specified Z coord. The result satisfies the following equation: (this + Result * (Param - this)).z = Z. Returns the NO_INTERSECTION constant if there's no intersection."},
LineCoeffToXZPlane={Params="Vector3d, Y",Return="number",Notes="Returns the coefficient for the line from the specified vector through this vector to reach the specified Y coord. The result satisfies the following equation: (this + Result * (Param - this)).y = Y. Returns the NO_INTERSECTION constant if there's no intersection."},
LineCoeffToYZPlane={Params="Vector3d, X",Return="number",Notes="Returns the coefficient for the line from the specified vector through this vector to reach the specified X coord. The result satisfies the following equation: (this + Result * (Param - this)).x = X. Returns the NO_INTERSECTION constant if there's no intersection."},
Normalize={Params="",Return="",Notes="Changes this vector so that it keeps current direction but is exactly 1 unit long. FIXME: Fails for a zero vector."},
NormalizeCopy={Params="",Return="Vector3d",Notes="Returns a new vector that has the same directino as this but is exactly 1 unit long. FIXME: Fails for a zero vector."},
Set={Params="X, Y, Z",Return="",Notes="Sets all the coords in this object."},
SqrLength={Params="",Return="number",Notes="Returns the (euclidean) length of this vector, squared. This operation is slightly less computationally expensive than Length(), while it conserves some properties of Length(), such as comparison. "},
{Params="",Return="Vector3f",Notes="Creates a new Vector3f object with zero coords"},
{Params="x, y, z",Return="Vector3f",Notes="Creates a new Vector3f object with the specified coords"},
{Params="Vector3f",Return="Vector3f",Notes="Creates a new Vector3f object as a copy of the specified vector"},
{Params="{{Vector3d}}",Return="Vector3f",Notes="Creates a new Vector3f object as a copy of the specified {{Vector3d}}"},
{Params="{{Vector3i}}",Return="Vector3f",Notes="Creates a new Vector3f object as a copy of the specified {{Vector3i}}"},
},
operator_mul=
{
{Params="number",Return="Vector3f",Notes="Returns a new Vector3f object that has each of its coords multiplied by the specified number"},
{Params="Vector3f",Return="Vector3f",Notes="Returns a new Vector3f object that has each of its coords multiplied by the respective coord of the specified vector."},
},
operator_plus={Params="Vector3f",Return="Vector3f",Notes="Returns a new Vector3f object that holds the vector sum of this vector and the specified vector."},
operator_sub={Params="Vector3f",Return="Vector3f",Notes="Returns a new Vector3f object that holds the vector differrence between this vector and the specified vector."},
Cross={Params="Vector3f",Return="Vector3f",Notes="Returns a new Vector3f object that holds the cross product of this vector and the specified vector."},
Dot={Params="Vector3f",Return="number",Notes="Returns the dot product of this vector and the specified vector."},
Equals={Params="Vector3f",Return="bool",Notes="Returns true if the specified vector is exactly equal to this vector."},
Length={Params="",Return="number",Notes="Returns the (euclidean) length of this vector"},
Normalize={Params="",Return="",Notes="Normalizes this vector (makes it 1 unit long while keeping the direction). FIXME: Fails for zero vectors."},
NormalizeCopy={Params="",Return="Vector3f",Notes="Returns a copy of this vector that is normalized (1 unit long while keeping the same direction). FIXME: Fails for zero vectors."},
Set={Params="x, y, z",Return="",Notes="Sets all the coords of the vector at once."},
SqrLength={Params="",Return="number",Notes="Returns the (euclidean) length of this vector, squared. This operation is slightly less computationally expensive than Length(), while it conserves some properties of Length(), such as comparison."},
{Params="",Return="Vector3i",Notes="Creates a new Vector3i object with zero coords."},
{Params="x, y, z",Return="Vector3i",Notes="Creates a new Vector3i object with the specified coords."},
{Params="{{Vector3d}}",Return="Vector3i",Notes="Creates a new Vector3i object with coords copied and floor()-ed from the specified {{Vector3d}}."},
},
Equals={Params="Vector3i",Return="bool",Notes="Returns true if this vector is exactly the same as the specified vector."},
Length={Params="",Return="number",Notes="Returns the (euclidean) length of this vector."},
Set={Params="x, y, z",Return="",Notes="Sets all the coords of the vector at once"},
SqrLength={Params="",Return="number",Notes="Returns the (euclidean) length of this vector, squared. This operation is slightly less computationally expensive than Length(), while it conserves some properties of Length(), such as comparison."},
Desc=[[These functions are available directly, without a class instance. Any plugin cal call them at any time.]],
Functions=
{
AddFaceDirection={Params="BlockX, BlockY, BlockZ, BlockFace, Inverse",Return="BlockX, BlockY, BlockZ",Notes="Returns the coords of a block adjacent to the specified block through the specified face"},
BlockStringToType={Params="BlockTypeString",Return="BLOCKTYPE",Notes="Returns the block type parsed from the given string"},
ClickActionToString={Params="ClickAction",Return="string",Notes="Returns a string description of the ClickAction enumerated value"},
DamageTypeToString={Params="{{TakeDamageInfo|eDamageType}}",Return="string",Notes="Converts a damage type enumerated value to a string representation "},
EscapeString={Params="string",Return="string",Notes="Returns a copy of the string with all quotes and backslashes escaped by a backslash"},
GetChar={Params="String, Pos",Return="string",Notes="Returns one character from the string, specified by position "},
GetTime={Return="number",Notes="Returns the current OS time, as a unix time stamp (number of seconds since Jan 1, 1970)"},
IsValidBlock={Params="BlockType",Return="bool",Notes="Returns true if BlockType is a known block type"},
IsValidItem={Params="ItemType",Return="bool",Notes="Returns true if ItemType is a known item type"},
ItemToFullString={Params="{{cItem|cItem}}",Return="string",Notes="Returns the string representation of the item, in the format “ItemTypeText:ItemDamage * Count”"},
NoCaseCompare={Params="string, string",Return="number",Notes="Case-insensitive string comparison; returns 0 if the strings are the same"},
ReplaceString={Params="full-string, to-be-replaced-string, to-replace-string",Notes="Replaces *each* occurence of to-be-replaced-string in full-string with to-replace-string"},
StringSplit={Params="string, Seperator",Return="list",Notes="Seperates string into multiple by splitting every time Seperator is encountered."},
StringToBiome={Params="string",Return="EMCSBiome",Notes="Converts a string representation to a biome enumerated value"},
StringToDamageType={Params="string",Return="{{TakeDamageInfo|eDamageType}}",Notes="Converts a string representation to an {{TakeDamageInfo|eDamageType}} enumerated value "},
StringToDimension={Params="string",Return="eDimension",Notes="Converts a string representation to an eDimension enumerated value"},
StringToItem={Params="string, {{cItem|cItem}}",Return="bool",Notes="Parses the given string and sets the item; returns true if successful"},
StringToMobType={Params="string",Return="number",Notes="Converts a string representation to a mob enumerated value"},
StripColorCodes={Params="string",Return="string",Notes="Removes all control codes used by MC for colors and styles"},
CalledWhen="A block is about to be dug ({{cPlayer|player}}, {{cEntity|entity}} or natural reason), plugins may override what pickups that will produce.",
DefaultFnName="OnBlockToPickups",-- also used as pagename
{Name="World",Type="{{cWorld}}",Notes="The world in which the block resides"},
{Name="Digger",Type="{{cEntity}} descendant",Notes="The entitycausing the digging. May be a {{cPlayer}}, {{cTNTEntity}} or even nil (natural causes)"},
{Name="BlockX",Type="number",Notes="X-coord of the block"},
{Name="BlockY",Type="number",Notes="Y-coord of the block"},
{Name="BlockZ",Type="number",Notes="Z-coord of the block"},
{Name="BlockType",Type="BLOCKTYPE",Notes="Block type of the block"},
{Name="BlockMeta",Type="NIBBLETYPE",Notes="Block meta of the block"},
{Name="Pickups",Type="{{cItems}}",Notes="Items that will be spawned as pickups"},
Desc="This example callback function generates one block of emerald ore in each chunk, under the condition that the randomly chosen location is in an ExtremeHills biome.",
CalledWhen="A player executes an in-game command, or the admin issues a console command. Note that built-in console commands are exempt to this hook - they are always performed and the hook is not called.",
DefaultFnName="OnExecuteCommand",-- also used as pagename
{Name="Client",Type="{{cClientHandle}}",Notes="The client handle representing the connection. Note that there's no {{cPlayer}} object for this client yet."},
{Name="UserName",Type="string",Notes="The username presented in the packet. Note that this username is unverified."},
{Name="Client",Type="{{cClientHandle}}",Notes="The client handle representing the connection"},
{Name="ProtocolVersion",Type="number",Notes="Versio of the protocol that the client is talking"},
{Name="UserName",Type="string",Notes="The name that the client has presented for authentication. This name will be given to the {{cPlayer}} object when it is created for this client."},