1
0
Fork 0

Updated API documentation.

This commit is contained in:
Mattes D 2016-07-06 12:39:56 +02:00
parent 28732bc339
commit f8e1df2476
19 changed files with 384 additions and 157 deletions

View File

@ -105,7 +105,13 @@ return
{ Params = "BlockType", Return = "number", Notes = "Counts the number of occurences of the specified blocktype contained in the area." },
{ Params = "BlockType, BlockMeta", Return = "number", Notes = "Counts the number of occurrences of the specified blocktype + blockmeta combination contained in the area." },
},
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." },
Create =
{
{ Params = "SizeX, SizeY, SizeZ", Return = "", Notes = "Initializes this BlockArea to an empty area of the specified size and origin of {0, 0, 0}. Datatypes are set to baTypes + baMetas. Any previous contents are lost." },
{ 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." },
{ Params = "{{Vector3i|Size}}", Return = "", Notes = "Creates a new area of the specified size. Datatypes are set to baTypes + baMetas. Origin is set to all zeroes. BlockTypes are set to air, block metas to zero, blocklights to zero and skylights to full light." },
{ Params = "{{Vector3i|Size}}, DataTypes", Return = "", Notes = "Creates a new area of the specified size and contents. Origin is set to all zeroes. BlockTypes are set to air, block metas to zero, blocklights to zero and skylights to full light." },
},
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." },
@ -157,9 +163,12 @@ return
MirrorYZNoMeta = { Params = "", Return = "", Notes = "Mirrors this block area around the YZ plane. Doesn't modify blocks' metas." },
Read =
{
{ Params = "World, {{cCuboid|Cuboid}}", Return = "bool", Notes = "Reads the area from World, returns true if successful. baTypes and baMetas are read." },
{ Params = "World, {{cCuboid|Cuboid}}, DataTypes", Return = "bool", Notes = "Reads the area from World, returns true if successful" },
{ Params = "World, {{Vector3i|Point1}}, {{Vector3i|Point2}}", Return = "bool", Notes = "Reads the area from World, returns true if successful. baTypes and baMetas are read." },
{ Params = "World, {{Vector3i|Point1}}, {{Vector3i|Point2}}, DataTypes", Return = "bool", Notes = "Reads the area from World, returns true if successful" },
{ Params = "World, X1, X2, Y1, Y2, Z1, Z2, DataTypes", Return = "bool", Notes = "Reads the area from World, returns true if successful" },
{ Params = "World, MinX, MaxX, MinY, MaxY, MinZ, MaxZ", Return = "bool", Notes = "Reads the area from World, returns true if successful. baTypes and baMetas are read." },
{ Params = "World, MinX, MaxX, MinY, MaxY, MinZ, MaxZ, DataTypes", Return = "bool", Notes = "Reads the area from World, returns true if successful" },
},
RelLine =
{
@ -170,7 +179,7 @@ return
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." },
SaveToSchematicFile = { Params = "FileName", Return = "boolean", Notes = "Saves the current contents to a schematic file. Returns true if successful." },
SaveToSchematicString = { Params = "", Return = "string", Notes = "Saves the current contents to a string (in a .schematic file format). Returns the data if successful, nil if failed." },
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" },
@ -194,7 +203,9 @@ return
},
Write =
{
{ Params = "World, {{Vector3i|MinPoint}}", Return = "bool", Notes = "Writes the area into World at the specified coords, returns true if successful. baTypes and baMetas are written." },
{ Params = "World, {{Vector3i|MinPoint}}, DataTypes", Return = "bool", Notes = "Writes the area into World at the specified coords, returns true if successful" },
{ Params = "World, MinX, MinY, MinZ", Return = "bool", Notes = "Writes the area into World at the specified coords, returns true if successful. baTypes and baMetas are written." },
{ Params = "World, MinX, MinY, MinZ, DataTypes", Return = "bool", Notes = "Writes the area into World at the specified coords, returns true if successful" },
},
},
@ -438,9 +449,9 @@ return
Black = { Notes = "" },
Blue = { Notes = "" },
Bold = { Notes = "" },
Color = { Notes = "The first character of the color-code-sequence, <EFBFBD>" },
Color = { Notes = "The first character of the color-code-sequence, §" },
DarkPurple = { Notes = "" },
Delimiter = { Notes = "The first character of the color-code-sequence, <EFBFBD>" },
Delimiter = { Notes = "The first character of the color-code-sequence, §" },
Gold = { Notes = "" },
Gray = { Notes = "" },
Green = { Notes = "" },
@ -521,7 +532,7 @@ return
SetUseDefaultHeight = { Params = "bool", Return = "", Notes = "Sets the chunk to use default height generator or not" },
SetUseDefaultStructures = { Params = "bool", Return = "", Notes = "Sets the chunk to use default structures or not" },
UpdateHeightmap = { Params = "", Return = "", Notes = "Updates the heightmap to match current contents. The plugins should do that if they modify the contents and don't modify the heightmap accordingly; Cuberite expects (and checks in Debug mode) that the heightmap matches the contents when the cChunkDesc is returned from a plugin." },
WriteBlockArea = { Params = "{{cBlockArea|BlockArea}}, MinRelX, MinRelY, MinRelZ", Return = "", Notes = "Writes data from the block area into the chunk" },
WriteBlockArea = { Params = "{{cBlockArea|BlockArea}}, MinRelX, MinRelY, MinRelZ, [{{cBlockArea#eMergeStrategy|MergeStrategy}}]", Return = "", Notes = "Writes data from the block area into the chunk" },
},
AdditionalInfo =
{
@ -632,7 +643,7 @@ end
constructor =
{
{ Params = "", Return = "", Notes = "Creates an empty chat message" },
{ Params = "Text", Return = "", Notes = "Creates a chat message containing the specified text, parsed by the ParseText() function. This allows easy migration from old chat messages." },
{ Params = "Text, [MessageType]", Return = "", Notes = "Creates a chat message containing the specified text, parsed by the ParseText() function. This allows easy migration from old chat messages." },
},
AddRunCommandPart = { Params = "Text, Command, [Style]", Return = "self", Notes = "Adds a text which, when clicked, runs the specified command. Chaining." },
AddShowAchievementPart = { Params = "PlayerName, AchievementName, [Style]", Return = "", Notes = "Adds a text that represents the 'Achievement get' message." },
@ -645,7 +656,7 @@ end
GetAdditionalMessageTypeData = { Params = "", Return = "string", Notes = "Returns the AdditionalData associated with the message, such as the sender's name for mtPrivateMessage" },
GetMessageType = { Params = "", Return = "MessageType", Notes = "Returns the MessageType (mtXXX constant) that is associated with this message. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.)" },
ParseText = { Params = "Text", Return = "self", Notes = "Adds text, while recognizing http and https URLs and old-style formatting codes (\"@2\"). Chaining." },
SetMessageType = { Params = "MessageType, AdditionalData", Return = "self", Notes = "Sets the MessageType (mtXXX constant) that is associated with this message. Also sets the additional data (string) associated with the message, which is specific for the message type - such as the sender's name for mtPrivateMessage. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.). Chaining." },
SetMessageType = { Params = "MessageType, [AdditionalData]", Return = "self", Notes = "Sets the MessageType (mtXXX constant) that is associated with this message. Also sets the additional data (string) associated with the message, which is specific for the message type - such as the sender's name for mtPrivateMessage. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.). Chaining." },
UnderlineUrls = { Params = "", Return = "self", Notes = "Makes all URL parts contained in the message underlined. Doesn't affect parts added in the future. Chaining." },
},
@ -778,12 +789,14 @@ local Hash = cCryptoHash.sha1HexString("DataToHash")
{ 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." },
Add = { Params = "{{cEnchantments|Other}}", Return = "", Notes = "Adds the enchantments contained in Other into this object. Existing enchantments are preserved, unless Other specifies a different level, in which case the level is changed to the Other's one." },
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" },
Count = { Params = "", Return = "number", Notes = "Get the count of enchantments contained within the class" },
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. Also understands plain numbers." },
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. Also understands plain numbers." },
ToString = { Params = "", Return = "string", Notes = "Returns the string description of all the enchantments stored in this object, in numerical-ID form" },
},
Constants =
@ -856,10 +869,10 @@ local Hash = cCryptoHash.sha1HexString("DataToHash")
AddSpeedX = { Params = "AddX", Return = "", Notes = "Adds the specified amount of speed in the X axis direction." },
AddSpeedY = { Params = "AddY", Return = "", Notes = "Adds the specified amount of speed in the Y axis direction." },
AddSpeedZ = { Params = "AddZ", Return = "", Notes = "Adds the specified amount of speed in the Z axis direction." },
ArmorCoversAgainst = { Params = "{{cEntity|AttackerEntity}}, DamageType, RawDamage", Return = "number", Notes = "Returns the points out of a_RawDamage that the currently equipped armor would cover." },
Destroy = { Params = "", Return = "", Notes = "Schedules the entity to be destroyed" },
ArmorCoversAgainst = { Params = "DamageType", Return = "boolean", Notes = "Returns whether armor will protect against the specified damage type" },
Destroy = { Params = "[ShouldBroadcast]", Return = "", Notes = "Schedules the entity to be destroyed; if ShouldBroadcast is not present or set to true, broadcasts the DestroyEntity packet" },
GetAirLevel = { Params = "", Return = "number", Notes = "Returns the air level (number of ticks of air left). Note, this function is only updated with mobs or players." },
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." },
GetArmorCoverAgainst = { Params = "{{cEntity|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." },
GetChunkX = { Params = "", Return = "number", Notes = "Returns the X-coord of the chunk in which the entity is placed" },
GetChunkZ = { Params = "", Return = "number", Notes = "Returns the Z-coord of the chunk in which the entity is placed" },
GetClass = { Params = "", Return = "string", Notes = "Returns the classname of the entity, such as \"cSpider\" or \"cPickup\"" },
@ -930,10 +943,11 @@ local Hash = cCryptoHash.sha1HexString("DataToHash")
KilledBy = { Notes = "FIXME: Remove this from API" },
MoveToWorld =
{
{ Params = "{{cWorld|World}}, [ShouldSendRespawn]", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world's spawn point. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions)." },
{ Params = "WorldName, [ShouldSendRespawn]", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world's spawn point. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions)." },
{ Params = "{{cWorld|World}}, ShouldSendRespawn, {{Vector3d|Position}}", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions). The Position parameter specifies the location that the entity should be placed in, in the new world." },
{ Params = "{{cWorld|World}}, [ShouldSendRespawn]", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world's spawn point. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions). <b>OBSOLETE</b>, use ScheduleMoveToWorld() instead." },
{ Params = "WorldName, [ShouldSendRespawn]", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world's spawn point. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions). <b>OBSOLETE</b>, use ScheduleMoveToWorld() instead." },
{ Params = "{{cWorld|World}}, ShouldSendRespawn, {{Vector3d|Position}}", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions). The Position parameter specifies the location that the entity should be placed in, in the new world. <b>OBSOLETE</b>, use ScheduleMoveToWorld() instead." },
},
ScheduleMoveToWorld = { Params = "{{cWorld|World}}, NewPosition, [ShouldSetPortalCooldown]", Return = "", Notes = "Schedules a MoveToWorld call to occur on the next Tick of the entity. If ShouldSetPortalCooldown is false (default), doesn't set any portal cooldown, if it is true, the default portal cooldown is applied to the entity." },
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." },
@ -1005,6 +1019,19 @@ local Hash = cCryptoHash.sha1HexString("DataToHash")
},
},
cEntityEffect =
{
-- TODO: Description
Functions =
{
GetPotionColor = { Params = "ItemDamage", Return = "number", IsStatic = true, Notes = "Returns the potion color (used by the client for visuals), based on the potion's damage value" },
GetPotionEffectDuration = { Params = "ItemDamage", Return = "number", IsStatic = true, Notes = "Returns the effect duration, in ticks, based on the potion's damage value" },
GetPotionEffectIntensity = { Params = "ItemDamage", Return = "short", IsStatic = true, Notes = "Retrieves the intensity level from the potion's damage value. Returns 0 for level I potions, 1 for level II potions." },
GetPotionEffectType = { Params = "ItemDamage", Return = "{{cEntityEffect#eType}}", IsStatic = true, Notes = "Translates the potion's damage value into the entity effect that the potion gives" },
IsPotionDrinkable = { Params = "ItemDamage", Return = "boolean", IsStatic = true, Notes = "Returns true if the potion with the given damage is drinkable" },
},
},
cFile =
{
Desc = [[
@ -1051,6 +1078,19 @@ cFile:DeleteFile("/usr/bin/virus.exe");
Inherits = "cEntity",
},
cHangingEntity =
{
-- TODO: Description
Inherits = "cEntity",
Functions =
{
GetFacing = { Params = "", Return = "{{Globals#eBlockFace|BlockFace}}", Notes = "Returns the direction in which the entity is facing." },
SetFacing = { Params = "{{Globals#eBlockFace|BlockFace}}", Return = "", Notes = "Set the direction in which the entity is facing." },
},
},
cIniFile =
{
Desc = [[
@ -1115,6 +1155,7 @@ ValueName0=SomeOtherValue
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." },
Flush = { Params = "", Return = "boolean", Notes = "Writes the data stored in the object to the file that was last associated with the object (ReadFile() or WriteFile()). Returns true on success, false on failure." },
GetHeaderComment = { Params = "CommentID", Return = "string", Notes = "Returns the specified header comment, or an empty string if such comment doesn't exist" },
GetKeyComment =
{
@ -1136,21 +1177,21 @@ ValueName0=SomeOtherValue
},
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." },
{ Params = "KeyName, ValueName, [DefaultValue]", Return = "string", Notes = "Returns the value of the specified name under the specified key. Returns DefaultValue (empty string if not given) if the value doesn't exist." },
{ Params = "KeyID, ValueID, [DefaultValue]", Return = "string", Notes = "Returns the value of the specified name under the specified key. Returns DefaultValue (empty string if not given) 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." },
GetValueB = { Params = "KeyName, ValueName, [DefaultValue]", Return = "bool", Notes = "Returns the value of the specified name under the specified key, as a bool. Returns DefaultValue (false if not given) if the value doesn't exist." },
GetValueF = { Params = "KeyName, ValueName, [DefaultValue]", Return = "number", Notes = "Returns the value of the specified name under the specified key, as a floating-point number. Returns DefaultValue (zero if not given) if the value doesn't exist." },
GetValueI = { Params = "KeyName, ValueName, [DefaultValue]", Return = "number", Notes = "Returns the value of the specified name under the specified key, as an integer. Returns DefaultValue (zero if not given) 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()." },
{ Params = "KeyID, ValueID", Return = "string", Notes = "Returns the name of the value specified by its ID. Inverse for FindValue()." },
{ Params = "KeyName, ValueID", Return = "string", Notes = "Returns the name of the value specified by its ID. 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." },
GetValueSet = { Params = "KeyName, ValueName, [DefaultValue]", 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 (empty string if not given)." },
GetValueSetB = { Params = "KeyName, ValueName, [DefaultValue]", 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 (false if not given)." },
GetValueSetF = { Params = "KeyName, ValueName, [DefaultValue]", 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 (zero if not given)." },
GetValueSetI = { Params = "KeyName, ValueName, [DefaultValue]", 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 (zero if not given)." },
HasValue = { Params = "KeyName, ValueName", Return = "bool", Notes = "Returns true if the specified value is present." },
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 =
@ -1208,6 +1249,7 @@ end
}, -- AdditionalInfo
}, -- cIniFile
cInventory =
{
Desc = [[This object is used to store the items that a {{cPlayer|cPlayer}} has. It also keeps track of what item the player has currently selected in their hotbar.
@ -1245,10 +1287,15 @@ These ItemGrids are available in the API and can be manipulated by the plugins,
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" },
HowManyCanFit =
{
{ Params = "{{cItem|ItemStack}}, [AllowNewStacks]", Return = "number", Notes = "Returns number of items out of a_ItemStack that can fit in the storage. If AllowNewStacks is false, only considers slots already containing the specified item. AllowNewStacks defaults to true if not given." },
{ Params = "{{cItem|ItemStack}}, BeginSlotNum, EndSlotNum, [AllowNewStacks]", Return = "number", Notes = "Returns how many items of the specified type would fit into the slot range specified. If AllowNewStacks is false, only considers slots already containing the specified item. AllowNewStacks defaults to true if not given." },
},
HowManyItems = { Params = "{{cItem|cItem}}", Return = "number", Notes = "Returns the number of the specified items that are currently stored" },
RemoveItem = { Params = "{{cItem}}", Return = "number", Notes = "Removes the specified item from the inventory, as many as possible, up to the item's m_ItemCount. Returns the number of items that were removed." },
RemoveOneEquippedItem = { Params = "", Return = "", Notes = "Removes one item from the hotbar's currently selected slot" },
SendEquippedSlot = { Params = "", Return = "", Notes = "Sends the equipped item slot to the client" },
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" },
@ -1277,6 +1324,7 @@ These ItemGrids are available in the API and can be manipulated by the plugins,
},
}, -- cInventory
cItem =
{
Desc = [[
@ -1298,7 +1346,7 @@ These ItemGrids are available in the API and can be manipulated by the plugins,
constructor =
{
{ Params = "", Return = "cItem", Notes = "Creates a new empty cItem object" },
{ Params = "ItemType, Count, Damage, EnchantmentString, CustomName, Lore", Return = "cItem", Notes = "Creates a new cItem object of the specified type, count (1 by default), damage (0 by default), enchantments (non-enchanted by default), CustomName (empty by default) and Lore (string, empty by default)" },
{ Params = "ItemType, [Count], [Damage], [EnchantmentString], [CustomName], [Lore]", Return = "cItem", Notes = "Creates a new cItem object of the specified type, count (1 by default), damage (0 by default), enchantments (non-enchanted by default), CustomName (empty by default) and Lore (string, empty by default)" },
{ Params = "cItem", Return = "cItem", Notes = "Creates an exact copy of the cItem object in the parameter" },
} ,
AddCount = { Params = "AmountToAdd", Return = "cItem", Notes = "Adds the specified amount to the item count. Returns self (useful for chaining)." },
@ -1374,6 +1422,20 @@ local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3");
},
}, -- cItem
cItemFrame =
{
-- TODO: Description
Functions =
{
GetItem = { Params = "", Return = "const cItem", Notes = "Returns the item in the frame" },
GetItemRotation = { Params = "", Return = "number", Notes = "Returns the rotation from the item in the frame" },
SetItem = { Params = "{{cItem|Item}}", Return = "", Notes = "Set the item in the frame" },
SetItemRotation = { Params = "ItemRotation", Return = "", Notes = "Set the rotation from the item in the frame" },
},
},
cItemGrid =
{
Desc = [[This class represents a 2D array of items. It is used as the underlying storage and API for all cases that use a grid of items:
@ -1391,15 +1453,15 @@ local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3");
]],
Functions =
{
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" },
AddItem = { Params = "{{cItem|ItemStack}}, [AllowNewStacks], [PrioritarySlot]", Return = "number", Notes = "Adds as many items out of ItemStack as can fit. If AllowNewStacks is set to false, only existing stacks can be topped up. If AllowNewStacks is set to true (default), empty slots can be used for the rest. If PrioritarySlot is set to a non-negative value, then the corresponding slot will be used first (if empty or compatible with added items). If PrioritarySlot is set to -1 (default), regular order applies. Returns the number of items that fit." },
AddItems = { Params = "{{cItems|ItemStackList}}, [AllowNewStacks], [PrioritarySlot]", Return = "number", Notes = "Same as AddItem, but works on an entire list of item stacks. The a_ItemStackList is modified to reflect the leftover items. If a_AllowNewStacks is set to false, only existing stacks can be topped up. If AllowNewStacks is set to true, empty slots can be used for the rest. If PrioritarySlot is set to a non-negative value, then the corresponding slot will be used first (if empty or compatible with added items). If PrioritarySlot is set to -1 (default), regular order applies. Returns the total number of items that fit." },
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" },
{ 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" },
CopyToItems = { Params = "{{cItems}}", Return = "", Notes = "Copies all non-empty slots into the {{cItems}} object provided; original cItems contents are preserved as well." },
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" },
@ -1420,15 +1482,15 @@ local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3");
GetNumSlots = { Params = "", Return = "number", Notes = "Returns the total number of slots in the grid (Width * Height)" },
GetSlot =
{
{ Params = "SlotNumber", Return = "{{cItem|cItem}}", Notes = "Returns the item in the specified slot. Note that the item is read-only" },
{ Params = "X, Y", Return = "{{cItem|cItem}}", Notes = "Returns the item in the specified slot. Note that the item is read-only" },
{ Params = "SlotNumber", Return = "{{cItem}}", Notes = "Returns the item in the specified slot. Note that the item is read-only" },
{ Params = "X, Y", Return = "{{cItem}}", Notes = "Returns the item in the specified slot. Note that the item is read-only" },
},
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" },
HasItems = { Params = "{{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}}, [AllowNewStacks]", Return = "number", Notes = "Returns the number of the specified items that can fit in the storage. If AllowNewStacks is true (default), includes empty slots in the returned count." },
HowManyItems = { Params = "{{cItem}}", Return = "number", Notes = "Returns the number of the specified items that are currently stored" },
IsSlotEmpty =
{
{ Params = "SlotNum", Return = "bool", Notes = "Returns true if the specified slot is empty, or an invalid slot is specified" },
@ -1437,13 +1499,15 @@ local Item5 = cItem(E_ITEM_DIAMOND_CHESTPLATE, 1, 0, "thorns=1;unbreaking=3");
RemoveItem = { Params = "{{cItem}}", Return = "number", Notes = "Removes the specified item from the grid, as many as possible, up to the item's m_ItemCount. Returns the number of items that were removed." },
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" },
{ Params = "SlotNum", Return = "{{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}}", 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" },
{ Params = "SlotNum, {{cItem}}", Return = "", Notes = "Sets the specified slot to the specified item" },
{ Params = "SlotNum, ItemType, ItemCount, ItemDamage", Return = "", Notes = "Sets the specified slot to the specified item" },
{ Params = "X, Y, {{cItem}}", Return = "", Notes = "Sets the specified slot to the specified item" },
{ Params = "X, Y, ItemType, ItemCount, ItemDamage", Return = "", Notes = "Sets the specified slot to the specified item" },
},
},
AdditionalInfo =
@ -1879,16 +1943,16 @@ a_Player:OpenWindow(Window);
]],
Functions =
{
AddEntityEffect = { Params = "{{cEntityEffect|EffectType}}, EffectDurationTicks, EffectIntensity, DistanceModifier", Return = "", Notes = "Applies an entity effect. Checks with plugins if they allow the addition. EffectIntensity is the level of the effect (0 = Potion I, 1 = Potion II, etc). DistanceModifier is the scalar multiplied to the potion duration (only applies to splash potions)." },
ClearEntityEffects = { Return = "", Notes = "Removes all currently applied entity effects" },
GetHealth = { Return = "number" },
HasEntityEffect = { Return = "bool", Params = "{{cEntityEffect|EffectType}}", Notes = "Returns true, if the supplied entity effect type is currently applied" },
Heal = { Return = "" },
KilledBy = { Return = "" },
RemoveEntityEffect = { Params = "{{cEntityEffect|EffectType}}", Return = "", Notes = "Removes a currently applied entity effect" },
TakeDamage = { Return = "" },
TeleportToEntity = { Return = "" },
TeleportTo = { Return = "" },
Heal = { Return = "" },
TakeDamage = { Return = "" },
KilledBy = { Return = "" },
GetHealth = { Return = "number" },
AddEntityEffect = { Params = "{{cEntityEffect|EffectType}}", Return = "", Notes = "Applies an entity effect" },
RemoveEntityEffect = { Params = "{{cEntityEffect|EffectType}}", Return = "", Notes = "Removes a currently applied entity effect" },
HasEntityEffect = { Return = "bool", Params = "{{cEntityEffect|EffectType}}", Notes = "Returns true, if the supplied entity effect type is currently applied" },
ClearEntityEffects = { Return = "", Notes = "Removes all currently applied entity effects" },
},
Inherits = "cEntity",
}, -- cPawn
@ -2223,11 +2287,13 @@ end
]],
Functions =
{
DoesAllowMultiLogin = { Params = "", Return = "boolean", Notes = "Returns true if players can log in multiple times from the same account (normally used for debugging), false if only one player per name is allowed." },
GetDescription = { Return = "string", Notes = "Returns the server description set in the settings.ini." },
GetMaxPlayers = { Return = "number", Notes = "Returns the max amount of players who can join the server." },
GetNumPlayers = { Return = "number", Notes = "Returns the amount of players online." },
GetServerID = { Return = "string", Notes = "Returns the ID of the server?" },
IsHardcore = { Params = "", Return = "bool", Notes = "Returns true if the server is hardcore (players get banned on death)." },
IsPlayerInQueue = { Params = "Username", Return = "boolean", Notes = "Returns true if the specified player is queued to be transferred to a World." },
SetMaxPlayers = { Params = "number", Notes = "Sets the max amount of players who can join." },
ShouldAuthenticate = { Params = "", Return = "bool", Notes = "Returns true iff the server is set to authenticate players (\"online mode\")." },
},
@ -2280,6 +2346,7 @@ local CompressedString = cStringCompression.CompressStringGZIP("DataToCompress")
},
}, -- cTeam
cTNTEntity =
{
Desc = "This class manages a TNT entity.",
@ -2287,11 +2354,12 @@ local CompressedString = cStringCompression.CompressStringGZIP("DataToCompress")
{
Explode = { Return = "", Notes = "Explode the tnt." },
GetFuseTicks = { Return = "number", Notes = "Returns the fuse ticks until the tnt will explode." },
SetFuseTicks = { Return = "number", Notes = "Set the fuse ticks until the tnt will explode." },
SetFuseTicks = { Params = "number", Notes = "Set the fuse ticks until the tnt will explode." },
},
Inherits = "cEntity",
}, -- cTNTEntity
cUrlParser =
{
Desc = [[
@ -2335,12 +2403,14 @@ end
},
}, -- cUrlParser
cWebPlugin =
{
Desc = "",
Functions = {},
}, -- cWebPlugin
cWindow =
{
Desc = [[
@ -2363,10 +2433,11 @@ end
GetWindowID = { Params = "", Return = "number", Notes = "Returns the ID of the window, as used by the network protocol" },
GetWindowTitle = { Params = "", Return = "string", Notes = "Returns the window title that will be displayed to the player" },
GetWindowType = { Params = "", Return = "number", Notes = "Returns the type of the window, one of the constants in the table above" },
GetWindowTypeName = { Params = "", Return = "string", Notes = "Returns the textual representation of the window's type, such as \"minecraft:chest\"." },
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." },
SetProperty = { Params = "PropertyID, PropartyValue, [{{cPlayer|Player}}]", Return = "", Notes = "Updates a numerical property associated with the window. Typically used for furnace progressbars. Sends the UpdateWindowProperty packet to the specified Player, or to all current clients of the window if Player is not specified." },
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" },
SetWindowTitle = { Params = "string", Return = "", Notes = "Sets the window title that will be displayed to the player" },
},
@ -2387,6 +2458,7 @@ end
},
}, -- cWindow
cWorld =
{
Desc = [[
@ -2424,7 +2496,7 @@ end
{
AreCommandBlocksEnabled = { Params = "", Return = "bool", Notes = "Returns whether command blocks are enabled on the (entire) server" },
BroadcastBlockAction = { Params = "BlockX, BlockY, BlockZ, ActionByte1, ActionByte2, BlockType, [{{cClientHandle|ExcludeClient}}]", Return = "", Notes = "Broadcasts the BlockAction packet to all clients who have the appropriate chunk loaded (except ExcludeClient). The contents of the packet are specified by the parameters for the call, the blocktype needn't match the actual block that is present in the world data at the specified location." },
BroadcastChat = { Params = "Message, [{{cClientHandle|ExcludeClient}}]", Return = "", Notes = "Sends the Message to all players in this world, except the optional ExcludeClient. No formatting is done by the server." },
BroadcastChat = { Params = "Message, [{{cClientHandle|ExcludeClient}}], [ChatPrefix]", Return = "", Notes = "Sends the Message to all players in this world, except the optional ExcludeClient. No formatting is done by the server." },
BroadcastChatDeath = { Params = "Message, [{{cClientHandle|ExcludeClient}}]", Return = "", Notes = "Prepends Gray [DEATH] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For when a player dies." },
BroadcastChatFailure = { Params = "Message, [{{cClientHandle|ExcludeClient}}]", Return = "", Notes = "Prepends Rose [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For a command that failed to run because of insufficient permissions, etc." },
BroadcastChatFatal = { Params = "Message, [{{cClientHandle|ExcludeClient}}]", Return = "", Notes = "Prepends Red [FATAL] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For a plugin that crashed, or similar." },
@ -2477,7 +2549,11 @@ end
{ 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." },
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." },
{ Params = "{{Vector3i|Pos}", 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." },
GetBlockMeta =
{
@ -2557,10 +2633,10 @@ end
{ Params = "{{cCuboid|Cuboid}}, EMCSBiome", Return = "bool", Notes = "Sets the biome in the cuboid specified. Returns true if successful, false if any of the chunks were unloaded. The cuboid needn't be sorted." },
},
SetBiomeAt = { Params = "BlockX, BlockZ, EMCSBiome", Return = "bool", Notes = "Sets the biome at the specified block coords. Returns true if successful, false otherwise." },
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." },
SetBlock = { Params = "BlockX, BlockY, BlockZ, BlockType, BlockMeta, [ShouldSendToClients]", 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. If ShouldSendToClients is true (default), the change is broadcast to all players who have this chunk loaded; if false, the change is made server-side only." },
SetBlockMeta =
{
{ Params = "BlockX, BlockY, BlockZ, BlockMeta", Return = "", Notes = "Sets the meta for the block at the specified coords." },
{ Params = "BlockX, BlockY, BlockZ, BlockMeta, [ShouldMarkChunkDirty], [ShouldSendToClients]", Return = "", Notes = "Sets the meta for the block at the specified coords. If ShouldMarkChunkDirty is true (default), the chunk is marked dirty and will be saved later on. If ShouldSendToClients is true (default), the change is broadcast to all clients who have the chunk loaded, if false, the change is kept server-side only." },
{ Params = "{{Vector3i|BlockCoords}}, BlockMeta", Return = "", Notes = "Sets the meta for the block at the specified coords." },
},
SetChunkAlwaysTicked = { Params = "ChunkX, ChunkZ, IsAlwaysTicked", Return = "", Notes = "Sets the chunk to always be ticked even when it doesn't contain any clients. IsAlwaysTicked set to true turns forced ticking on, set to false turns it off. Every call with 'true' should be paired with a later call with 'false', otherwise the ticking won't stop. Multiple actions can request ticking independently, the ticking will continue until the last call with 'false'. Note that when the chunk unloads, it loses the value of this flag." },
@ -2589,12 +2665,12 @@ end
ShouldLavaSpawnFire = { Params = "", Return = "bool", Notes = "Returns true if the world is configured to spawn fires near lava (world.ini: [Physics].ShouldLavaSpawnFire value)" },
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." },
{ Params = "{{cItems|Pickups}}, X, Y, Z, [FlyAwaySpeed], [IsPlayerCreated]", Return = "", Notes = "Spawns the specified pickups at the position specified. The FlyAwaySpeed is a coefficient (default: 1) used to initialize the random speed in which the pickups fly away from the spawn position. The IsPlayerCreated parameter (default: false) is used to initialize the created {{cPickup}} object's IsPlayerCreated value." },
{ Params = "{{cItems|Pickups}}, X, Y, Z, SpeedX, SpeedY, SpeedZ, [IsPlayerCreated]", Return = "", Notes = "Spawns the specified pickups at the position specified. All the pickups fly away from the spawn position using the specified speed. The IsPlayerCreated parameter (default: false) is used to initialize the created {{cPickup}} object's IsPlayerCreated value." },
},
SpawnMinecart = { Params = "X, Y, Z, MinecartType, Item, BlockHeight", Return = "number", Notes = "Spawns a minecart at the specific coordinates. MinecartType is the item type of the minecart. If the minecart is an empty minecart then the given item is the block inside the minecart, and blockheight is the distance of the block and the minecart." },
SpawnBoat = { Params = "X, Y, Z", Return = "number", Notes = "Spawns a boat at the specific coordinates." },
SpawnMob = { Params = "X, Y, Z, {{cMonster|MonsterType}}, [Baby]", Return = "EntityID", Notes = "Spawns the specified type of mob at the specified coords. If the Baby parameter is true, the mob will be a baby. Returns the EntityID of the creates entity, or -1 on failure. " },
SpawnMinecart = { Params = "X, Y, Z, MinecartType, [{{cItem|Item}}], [BlockHeight]", Return = "EntityID", Notes = "Spawns a minecart at the specific coordinates. MinecartType is the item type of the minecart. If the minecart is an empty minecart then the given Item (default: empty) is the block to be displayed inside the minecart, and BlockHeight (default: 1) is the relative distance of the block from the minecart. Returns the entity ID of the new minecart, or {{cEntity#NO_ID|cEntity.NO_ID}} if no minecart was created." },
SpawnBoat = { Params = "X, Y, Z", Return = "EntityID", Notes = "Spawns a boat at the specific coordinates. Returns the entity ID of the new boat, or {{cEntity#NO_ID|cEntity.NO_ID}} if no boat was created." },
SpawnMob = { Params = "X, Y, Z, {{cMonster|MonsterType}}, [IsBaby]", Return = "EntityID", Notes = "Spawns the specified type of mob at the specified coords. If the Baby parameter is true, the mob will be a baby. Returns the EntityID of the creates entity, or -1 on failure. " },
SpawnFallingBlock = { Params = "X, Y, Z, BlockType, BlockMeta", Return = "EntityID", Notes = "Spawns an {{cFallingBlock|Falling Block}} entity at the specified coords with the given block type/meta" },
SpawnExperienceOrb = { Params = "X, Y, Z, Reward", Return = "EntityID", Notes = "Spawns an {{cExpOrb|experience orb}} at the specified coords, with the given reward" },
SpawnPrimedTNT = { Params = "X, Y, Z, FuseTicks, InitialVelocityCoeff", Return = "", Notes = "Spawns a {{cTNTEntity|primed TNT entity}} at the specified coords, with the given fuse ticks. The entity gets a random speed multiplied by the InitialVelocityCoeff, 1 being the default value." },
@ -2669,6 +2745,7 @@ World:ForEachEntity(
}, -- AdditionalInfo
}, -- cWorld
ItemCategory =
{
Desc = [[
@ -2708,6 +2785,7 @@ end
},
}, -- ItemCategory
lxp =
{
Desc = [[
@ -2814,6 +2892,7 @@ Parser:close();
}, -- AdditionalInfo
}, -- lxp
sqlite3 =
{
Desc = [[
@ -2843,6 +2922,7 @@ myDB:close()
},
},
TakeDamageInfo =
{
Desc = [[
@ -2879,6 +2959,7 @@ end
}, -- AdditionalInfo
}, -- TakeDamageInfo
tolua =
{
Desc = [[
@ -2899,6 +2980,7 @@ end
},
}, -- tolua
Globals =
{
Desc = [[

View File

@ -13,6 +13,7 @@ return
GetBlockType = { Params = "", Return = "BLOCKTYPE", Notes = "Returns the blocktype which is represented by this blockentity. This is the primary means of type-identification" },
GetChunkX = { Params = "", Return = "number", Notes = "Returns the chunk X-coord of the block entity's chunk" },
GetChunkZ = { Params = "", Return = "number", Notes = "Returns the chunk Z-coord of the block entity's chunk" },
GetPos = { Params = "", Return = "{{Vector3i}}", Notes = "Returns the name of the parent class, or empty string if no parent class." },
GetPosX = { Params = "", Return = "number", Notes = "Returns the block X-coord of the block entity's block" },
GetPosY = { Params = "", Return = "number", Notes = "Returns the block Y-coord of the block entity's block" },
GetPosZ = { Params = "", Return = "number", Notes = "Returns the block Z-coord of the block entity's block" },
@ -36,16 +37,16 @@ return
Functions =
{
GetContents = { Params = "", Return = "{{cItemGrid|cItemGrid}}", Notes = "Returns the cItemGrid object representing the items stored within this block entity" },
GetContents = { Params = "", Return = "{{cItemGrid}}", Notes = "Returns the cItemGrid object representing the items stored within this block entity" },
GetSlot =
{
{ Params = "SlotNum", Return = "{{cItem|cItem}}", Notes = "Returns the cItem for the specified slot number. Returns nil for invalid slot numbers" },
{ Params = "X, Y", Return = "{{cItem|cItem}}", Notes = "Returns the cItem for the specified slot coords. Returns nil for invalid slot coords" },
{ Params = "SlotNum", Return = "{{cItem}}", Notes = "Returns the cItem for the specified slot number. Returns nil for invalid slot numbers" },
{ Params = "X, Y", Return = "{{cItem}}", Notes = "Returns the cItem for the specified slot coords. Returns nil for invalid slot coords" },
},
SetSlot =
{
{ Params = "SlotNum, {{cItem|cItem}}", Return = "", Notes = "Sets the cItem for the specified slot number. Ignored if invalid slot number" },
{ Params = "X, Y, {{cItem|cItem}}", Return = "", Notes = "Sets the cItem for the specified slot coords. Ignored if invalid slot coords" },
{ Params = "SlotNum, {{cItem}}", Return = "", Notes = "Sets the cItem for the specified slot number. Ignored if invalid slot number" },
{ Params = "X, Y, {{cItem}}", Return = "", Notes = "Sets the cItem for the specified slot coords. Ignored if invalid slot coords" },
},
},
},
@ -53,7 +54,7 @@ return
cBeaconEntity =
{
Desc = [[
A beacon entity is a {{cBlockEntityWithItems|cBlockEntityWithItems}} descendant that represents a beacon
A beacon entity is a {{cBlockEntityWithItems}} descendant that represents a beacon
in the world.
]],
@ -61,18 +62,18 @@ return
Functions =
{
IsActive = { Params = "", Return = "bool", Notes = "Is the beacon active?" },
GetBeaconLevel = { Params = "", Return = "number", Notes = "Returns the beacon level. (0 - 4)" },
GetPrimaryEffect = { Params = "", Return = "EffectType", Notes = "Returns the primary effect." },
GetSecondaryEffect = { Params = "", Return = "EffectType", Notes = "Returns the secondary effect." },
SetPrimaryEffect = { Params = "EffectType", Return = "bool", Notes = "Select the primary effect. Returns false when the effect is invalid." },
SetSecondaryEffect = { Params = "EffectType", Return = "bool", Notes = "Select the secondary effect. Returns false when the effect is invalid." },
CalculatePyramidLevel = { Params = "", Return = "number", Notes = "Calculate the amount of layers the pyramid below the beacon has." },
IsBeaconBlocked = { Params = "", Return = "bool", Notes = "Is the beacon blocked by non-transparent blocks that are higher than the beacon?" },
UpdateBeacon = { Params = "", Return = "", Notes = "Update the beacon." },
GetBeaconLevel = { Params = "", Return = "number", Notes = "Returns the beacon level. (0 - 4)" },
GetPrimaryEffect = { Params = "", Return = "{{cEntityEffect#eType|EffectType}}", Notes = "Returns the primary effect." },
GetSecondaryEffect = { Params = "", Return = "{{cEntityEffect#eType|EffectType}}", Notes = "Returns the secondary effect." },
GiveEffects = { Params = "", Return = "", Notes = "Give the near-players the effects." },
IsMineralBlock = { Params = "BLOCKTYPE", Return = "bool", Notes = "Returns true if the block is a diamond block, a golden block, an iron block or an emerald block." },
IsValidEffect = { Params = "EffectType", Return = "bool", Notes = "Returns true if the effect can be used." },
IsActive = { Params = "", Return = "bool", Notes = "Is the beacon active?" },
IsBeaconBlocked = { Params = "", Return = "bool", Notes = "Is the beacon blocked by non-transparent blocks that are higher than the beacon?" },
IsMineralBlock = { Params = "BLOCKTYPE", Return = "bool", IsStatic = true, Notes = "Returns true if the block is a diamond block, a golden block, an iron block or an emerald block." },
IsValidEffect = { Params = "{{cEntityEffect#eType|EffectType}}, BeaconLevel", Return = "boolean", IsStatic = true, Notes = "Returns true if the effect can be used." },
SetPrimaryEffect = { Params = "{{cEntityEffect#eType|EffectType}}", Return = "bool", Notes = "Select the primary effect. Returns false when the effect is invalid." },
SetSecondaryEffect = { Params = "{{cEntityEffect#eType|EffectType}}", Return = "bool", Notes = "Select the secondary effect. Returns false when the effect is invalid." },
UpdateBeacon = { Params = "", Return = "", Notes = "Update the beacon." },
},
},
@ -87,15 +88,15 @@ return
{
GetBrewingTimeLeft = { Params = "", Return = "number", Notes = "Returns the time until the current items finishes brewing, in ticks" },
GetTimeBrewed = { Params = "", Return = "number", Notes = "Returns the time that the current items has been brewing, in ticks" },
GetLeftBottleSlot = { Params = "", Return = "{{cItem|cItem}}", Notes = "Returns the item in the left bottle slot" },
GetMiddleBottleSlot = { Params = "", Return = "{{cItem|cItem}}", Notes = "Returns the item in the middle bottle slot" },
GetRightBottleSlot = { Params = "", Return = "{{cItem|cItem}}", Notes = "Returns the item in the right bottle slot" },
GetIndgredientSlot = { Params = "", Return = "{{cItem|cItem}}", Notes = "Returns the item in the ingredient slot" },
GetResultItem = { Params = "number", Return = "{{cItem|cItem}}", Notes = "Returns the expected result item for the given slot number." },
SetLeftBottleSlot = { Params = "{{cItem|cItem}}", Return = "", Notes = "Sets the item in the left bottle slot" },
SetMiddleBottleSlot = { Params = "{{cItem|cItem}}", Return = "", Notes = "Sets the item in the middle bottle slot" },
SetRightBottleSlot = { Params = "{{cItem|cItem}}", Return = "", Notes = "Sets the item in the right bottle slot" },
SetIngredientSlot = { Params = "{{cItem|cItem}}", Return = "", Notes = "Sets the item in the ingredient bottle slot" },
GetLeftBottleSlot = { Params = "", Return = "{{cItem}}", Notes = "Returns the item in the left bottle slot" },
GetMiddleBottleSlot = { Params = "", Return = "{{cItem}}", Notes = "Returns the item in the middle bottle slot" },
GetRightBottleSlot = { Params = "", Return = "{{cItem}}", Notes = "Returns the item in the right bottle slot" },
GetIndgredientSlot = { Params = "", Return = "{{cItem}}", Notes = "Returns the item in the ingredient slot" },
GetResultItem = { Params = "number", Return = "{{cItem}}", Notes = "Returns the expected result item for the given slot number." },
SetLeftBottleSlot = { Params = "{{cItem|LeftSlot}}", Return = "", Notes = "Sets the item in the left bottle slot" },
SetMiddleBottleSlot = { Params = "{{cItem|MiddleSlot}}", Return = "", Notes = "Sets the item in the middle bottle slot" },
SetRightBottleSlot = { Params = "{{cItem|RightSlot}}", Return = "", Notes = "Sets the item in the right bottle slot" },
SetIngredientSlot = { Params = "{{cItem|Ingredient}}", Return = "", Notes = "Sets the item in the ingredient bottle slot" },
},
Constants =
{
@ -154,16 +155,36 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
]],
},
}, -- AdditionalInfo
},
}, -- cChestEntity
cCommandBlockEntity =
{
Inherits = "cBlockEntity",
Functions =
{
Activate = { Params = "", Return = "", Notes = "Sets the command block to execute a command in the next tick" },
GetCommand = { Params = "", Return = "string", Notes = "Retrieves stored command" },
GetLastOutput = { Params = "", Return = "string", Notes = "Retrieves the last line of output generated by the command block" },
GetResult = { Params = "", Return = "number", Notes = "Retrieves the result (signal strength) of the last operation" },
SetCommand = { Params = "Cmd", Return = "string", Notes = "Sets the command" },
},
}, -- cCommandBlockEntity
cDispenserEntity =
{
Desc = [[
This class represents a dispenser block entity in the world. Most of this block entity's
functionality is implemented in the {{cDropSpenserEntity|cDropSpenserEntity}} class that represents
the behavior common with a {{cDropperEntity|dropper}} entity.
functionality is implemented in the {{cDropSpenserEntity}} class that represents
the behavior common with the {{cDropperEntity|dropper}} block entity.
]],
Inherits = "cDropSpenserEntity",
Functions =
{
GetShootVector = { Params = "BlockMeta", Return = "{{Vector3d}}", IsStatic = true, Notes = "Returns a unit vector in the cardinal direction of where the dispenser with the specified meta would be facing." },
SpawnProjectileFromDispenser = { Params = "BlockX, BlockY, BlockZ, {{cProjectileEntity#eKind|Kind}}, Speed, {{cItem|Item}}", Return = "number", Notes = "Spawns a projectile of the given kind in front of the dispenser with the specified speed. Returns the UniqueID of the spawned projectile, or {{cEntity#INVALID_ID|cEntity.INVALID_ID}} on failure." },
},
},
cDropperEntity =
@ -178,6 +199,7 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
Inherits = "cDropSpenserEntity",
}, -- cDropperEntity
cDropSpenserEntity =
{
Desc = [[
@ -197,6 +219,7 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
Inherits = "cBlockEntityWithItems";
}, -- cDropSpenserEntity
cFurnaceEntity =
{
Desc = [[
@ -236,6 +259,7 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
Inherits = "cBlockEntityWithItems"
}, -- cFurnaceEntity
cHopperEntity =
{
Desc = [[
@ -254,6 +278,7 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
Inherits = "cBlockEntityWithItems",
}, -- cHopperEntity
cJukeboxEntity =
{
Desc = [[
@ -272,6 +297,7 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
},
}, -- cJukeboxEntity
cMobHeadEntity =
{
Desc = [[
@ -280,18 +306,23 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
Inherits = "cBlockEntity",
Functions =
{
SetType = { Params = "eMobHeadType", Return = "", Notes = "Set the type of the mob head" },
SetRotation = { Params = "eMobHeadRotation", Return = "", Notes = "Sets the rotation of the mob head" },
SetOwner = { Params = "cPlayer", Return = "", Notes = "Set the {{cPlayer|player}} for mob heads with player type" },
GetType = { Params = "", Return = "eMobHeadType", Notes = "Returns the type of the mob head" },
GetRotation = { Params = "", Return = "eMobHeadRotation", Notes = "Returns the rotation of the mob head" },
GetOwnerName = { Params = "", Return = "string", Notes = "Returns the player name of the mob head" },
GetOwnerUUID = { Params = "", Return = "string", Notes = "Returns the player UUID of the mob head" },
GetOwnerTexture = { Params = "", Return = "string", Notes = "Returns the player texture of the mob head" },
GetOwnerTextureSignature = { Params = "", Return = "string", Notes = "Returns the signature of the player texture of the mob head" },
GetOwnerUUID = { Params = "", Return = "string", Notes = "Returns the player UUID of the mob head" },
GetRotation = { Params = "", Return = "eMobHeadRotation", Notes = "Returns the rotation of the mob head" },
GetType = { Params = "", Return = "eMobHeadType", Notes = "Returns the type of the mob head" },
SetOwner =
{
{ Params = "cPlayer", Return = "", Notes = "Set the {{cPlayer|player}} for mob heads with player type" },
{ Params = "OwnerUUID, OwnerName, OwnerTexture, OwnerTextureSignature", Return = "", Notes = "Sets the player components for the mob heads with player type" },
},
SetRotation = { Params = "eMobHeadRotation", Return = "", Notes = "Sets the rotation of the mob head" },
SetType = { Params = "eMobHeadType", Return = "", Notes = "Set the type of the mob head" },
},
}, -- cMobHeadEntity
cMobSpawnerEntity =
{
Desc = [[
@ -300,18 +331,19 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(),
Inherits = "cBlockEntity",
Functions =
{
UpdateActiveState = { Params = "", Return = "", Notes = "Upate the active flag from the mob spawner. This function will called every 5 seconds from the Tick() function." },
ResetTimer = { Params = "", Return = "", Notes = "Sets the spawn delay to a new random value." },
SpawnEntity = { Params = "", Return = "", Notes = "Spawns the entity. This function automaticly change the spawn delay!" },
GetEntity = { Params = "", Return = "{{Globals#MobType|MobType}}", Notes = "Returns the entity type that will be spawn by this mob spawner." },
SetEntity = { Params = "{{Globals#MobType|MobType}}", Return = "", Notes = "Sets the entity type who will be spawn by this mob spawner." },
GetSpawnDelay = { Params = "", Return = "number", Notes = "Returns the spawn delay. This is the tick delay that is needed to spawn new monsters." },
SetSpawnDelay = { Params = "number", Return = "", Notes = "Sets the spawn delay." },
GetNearbyMonsterNum = { Params = "EntityType", Return = "number", Notes = "Returns the amount of this monster type in a 8-block radius (Y: 4-block radius)." },
GetNearbyPlayersNum = { Params = "", Return = "number", Notes = "Returns the amount of the nearby players in a 16-block radius." },
GetNearbyMonsterNum = { Params = "", Return = "number", Notes = "Returns the amount of this monster type in a 8-block radius (Y: 4-block radius)." },
GetSpawnDelay = { Params = "", Return = "number", Notes = "Returns the spawn delay. This is the tick delay that is needed to spawn new monsters." },
ResetTimer = { Params = "", Return = "", Notes = "Sets the spawn delay to a new random value." },
SetEntity = { Params = "{{Globals#MobType|MobType}}", Return = "", Notes = "Sets the entity type who will be spawn by this mob spawner." },
SetSpawnDelay = { Params = "number", Return = "", Notes = "Sets the spawn delay." },
SpawnEntity = { Params = "", Return = "", Notes = "Spawns the entity. This function automaticly change the spawn delay!" },
UpdateActiveState = { Params = "", Return = "", Notes = "Upate the active flag from the mob spawner. This function will called every 5 seconds from the Tick() function." },
},
}, -- cMobSpawnerEntity
cNoteEntity =
{
Desc = [[

View File

@ -28,6 +28,7 @@ return
{ 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." },
{ Params = "{{Vector3d|Pos}}, CubeSideLength", Return = "{{cBoundingBox}}", Notes = "Creates a new bounding box as a cube with the specified side length centered around the specified point." },
},
CalcLineIntersection =
{
@ -51,6 +52,8 @@ return
{ 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." },
{ Params = "{{Vector3d|Min}}, {{Vector3d|Max}}, {{Vector3d|Point}}", Return = "boolean", IsStatic = true, Notes = "Returns true if the specified point is inside the bounding box specified by its min / max corners" },
{ Params = "{{Vector3d|Min}}, {{Vector3d|Max}}, X, Y, Z", Return = "boolean", IsStatic = true, Notes = "Returns true if the specified point is inside the bounding box specified by its min / max corners" },
},
Move =
{
@ -238,30 +241,52 @@ end
{ 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_div =
{
{ Params = "{{Vector3d}}", Return = "{{Vector3d}}", Notes = "Returns a new Vector3d object with each coord divided by the corresponding coord from the given vector." },
{ Params = "number", Return = "Vector3d", Notes = "Returns a new Vector3d object with each coord divided by the specified number." },
},
operator_mul =
{
{ Params = "{{Vector3d}}", Return = "{{Vector3d}}", Notes = "Returns a new Vector3d object with each coord multiplied by the corresponding coord from the given vector." },
{ Params = "number", Return = "Vector3d", Notes = "Returns a new Vector3d object with each coord multiplied." },
},
operator_plus = {Params = "Vector3d", Return = "Vector3d", Notes = "Returns a new Vector3d containing the sum of this vector and the specified vector" },
operator_sub =
{
{ Params = "{{Vector3d}}", Return = "{{Vector3d}}", Notes = "Returns a new Vector3d object containing the difference between this object and the specified vector." },
{ Params = "", Return = "{{Vector3d}}", Notes = "Returns a new Vector3d object that is a negative of this vector (all coords multiplied by -1)." },
},
abs = { Params = "", Return = "", Notes = "<b>OBSOLETE</b>, use Abs() instead." },
clamp = { Params = "min, max", Return = "", Notes = "<b>OBSOLETE</b>, use Clamp() instead." },
Abs = { Params = "", Return = "", Notes = "Updates each coord to its absolute value." },
Clamp = { Params = "min, max", Return = "", Notes = "Clamps each coord into the specified range." },
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." },
Equals = { Params = "Vector3d", Return = "bool", Notes = "Returns true if this vector is exactly equal to the specified vector. Note that this is subject to (possibly imprecise) floating point math." },
EqualsEps = { Params = "{{Vector3d|Rhs}}, Eps", Return = "boolean", Notes = "Returns true if the differences between each corresponding coords of this vector and the one specified, are less than the specified Eps." },
Floor = { Params = "", Return = "{{Vector3i}}", Notes = "Returns a new {{Vector3i}} object with coords set to math.floor of this vector's coords." },
HasNonZeroLength = { Params = "", Return = "boolean", Notes = "Returns true if the vector has at least one coord non-zero. Note that this is subject to (possibly imprecise) floating point math." },
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." },
Move =
{
{ Params = "X, Y, Z", Return = "", Notes = "Adds the specified offsets to each coord, effectively moving the vector by the specified coord offsets." },
{ Params = "{{Vector3d|Diff}}", Return = "", Notes = "Adds the specified vector to this vector. Is slightly better performant than adding with a \"+\" because this doesn't create a new object for the result." },
},
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." },
NormalizeCopy = { Params = "", Return = "Vector3d", Notes = "Returns a new vector that has the same direction 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. " },
TurnCCW = { Params = "", Return = "", Notes = "Rotates the vector 90 degrees counterclockwise around the vertical axis. Note that this is specific to minecraft's axis ordering, which is X+ left, Z+ down." },
TurnCW = { Params = "", Return = "", Notes = "Rotates the vector 90 degrees clockwise around the vertical axis. Note that this is specific to minecraft's axis ordering, which is X+ left, Z+ down." },
},
Constants =
{
EPS = { Notes = "The max difference between two coords for which the coords are assumed equal (in LineCoeffToXYPlane() et al)." },
NO_INTERSECTION = { Notes = "Special return value for the LineCoeffToXYPlane() et al meaning that there's no intersectino with the plane." },
NO_INTERSECTION = { Notes = "Special return value for the LineCoeffToXYPlane() et al meaning that there's no intersection with the plane." },
},
Variables =
{
@ -289,25 +314,52 @@ end
{ 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_div =
{
{ Params = "{{Vector3f}}", Return = "{{Vector3f}}", Notes = "Returns a new Vector3f object with each coord divided by the corresponding coord from the given vector." },
{ Params = "number", Return = "{{Vector3f}}", Notes = "Returns a new Vector3f object with each coord divided by the specified number." },
},
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." },
{ 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." },
operator_sub =
{
{ Params = "Vector3f", Return = "Vector3f", Notes = "Returns a new Vector3f object that holds the vector differrence between this vector and the specified vector." },
{ Params = "", Return = "{{Vector3f}}", Notes = "Returns a new Vector3f that is a negative of this vector (all coords multiplied by -1)." },
},
abs = { Params = "", Return = "", Notes = "<b>OBSOLETE</b>, use Abs() instead." },
clamp = { Params = "min, max", Return = "", Notes = "<b>OBSOLETE</b>, use Clamp() instead." },
Abs = { Params = "", Return = "", Notes = "Updates each coord to its absolute value." },
Clamp = { Params = "min, max", Return = "", Notes = "Clamps each coord into the specified range." },
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." },
Equals = { Params = "Vector3f", Return = "bool", Notes = "Returns true if the specified vector is exactly equal to this vector. Note that this is subject to (possibly imprecise) floating point math." },
EqualsEps = { Params = "{{Vector3f|Rhs}}, Eps", Return = "boolean", Notes = "Returns true if the differences between each corresponding coords of this vector and the one specified, are less than the specified Eps." },
Floor = { Params = "", Return = "{{Vector3i}}", Notes = "Returns a new {{Vector3i}} object with coords set to math.floor of this vector's coords." },
HasNonZeroLength = { Params = "", Return = "boolean", Notes = "Returns true if the vector has at least one coord non-zero. Note that this is subject to (possibly imprecise) floating point math." },
Length = { Params = "", Return = "number", Notes = "Returns the (euclidean) length of this vector" },
LineCoeffToXYPlane = { Params = "Vector3f, 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 = "Vector3f, 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 = "Vector3f, 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." },
Move =
{
{ Params = "X, Y, Z", Return = "", Notes = "Adds the specified offsets to each coord, effectively moving the vector by the specified coord offsets." },
{ Params = "{{Vector3f|Diff}}", Return = "", Notes = "Adds the specified vector to this vector. Is slightly better performant than adding with a \"+\" because this doesn't create a new object for the result." },
},
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." },
TurnCCW = { Params = "", Return = "", Notes = "Rotates the vector 90 degrees counterclockwise around the vertical axis. Note that this is specific to minecraft's axis ordering, which is X+ left, Z+ down." },
TurnCW = { Params = "", Return = "", Notes = "Rotates the vector 90 degrees clockwise around the vertical axis. Note that this is specific to minecraft's axis ordering, which is X+ left, Z+ down." },
},
Constants =
{
EPS = { Notes = "The max difference between two coords for which the coords are assumed equal (in LineCoeffToXYPlane() et al)." },
NO_INTERSECTION = { Notes = "Special return value for the LineCoeffToXYPlane() et al meaning that there's no intersection with the plane." },
},
Variables =
{
@ -333,6 +385,22 @@ end
{ 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}}." },
},
operator_div =
{
{ Params = "number", Return = "Vector3i", Notes = "Returns a new Vector3i object that has each of its coords divided by the specified number" },
{ Params = "Vector3i", Return = "Vector3i", Notes = "Returns a new Vector3i object that has each of its coords divided by the respective coord of the specified vector." },
},
operator_mul =
{
{ Params = "number", Return = "Vector3i", Notes = "Returns a new Vector3i object that has each of its coords multiplied by the specified number" },
{ Params = "Vector3i", Return = "Vector3i", Notes = "Returns a new Vector3i object that has each of its coords multiplied by the respective coord of the specified vector." },
},
operator_plus = { Params = "Vector3i", Return = "Vector3i", Notes = "Returns a new Vector3f object that holds the vector sum of this vector and the specified vector." },
operator_sub =
{
{ Params = "Vector3i", Return = "Vector3i", Notes = "Returns a new Vector3i object that holds the vector differrence between this vector and the specified vector." },
{ Params = "", Return = "{{Vector3i}}", Notes = "Returns a new Vector3i that is a negative of this vector (all coords multiplied by -1)." },
},
abs = { Params = "", Return = "", Notes = "<b>OBSOLETE</b>, use Abs() instead." },
clamp = { Params = "min, max", Return = "", Notes = "<b>OBSOLETE</b>, use Clamp() instead." },
Abs = { Params = "", Return = "", Notes = "Updates each coord to its absolute value." },
@ -340,10 +408,29 @@ end
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 = "Vector3i", Return = "bool", Notes = "Returns true if this vector is exactly the same as the specified vector." },
EqualsEps = { Params = "{{Vector3i|Rhs}}, Eps", Return = "boolean", Notes = "Returns true if the differences between each corresponding coords of this vector and the one specified, are less than the specified Eps. Normally not too useful for integer-only vectors, but still included for API completeness." },
Floor = { Params = "", Return = "{{Vector3i}}", Notes = "Returns a new {{Vector3i}} object with coords set to math.floor of this vector's coords. Normally not too useful with integer-only vectors, but still included for API completeness." },
HasNonZeroLength = { Params = "", Return = "boolean", Notes = "Returns true if the vector has at least one coord non-zero." },
Length = { Params = "", Return = "number", Notes = "Returns the (euclidean) length of this vector." },
Move = { Params = "x, y, z", Return = "", Notes = "Moves the vector by the specified amount in each axis direction." },
LineCoeffToXYPlane = { Params = "Vector3i, 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 = "Vector3i, 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 = "Vector3i, 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." },
Move =
{
{ Params = "x, y, z", Return = "", Notes = "Moves the vector by the specified amount in each axis direction." },
{ Params = "{{Vector3i|Diff}}", Return = "", Notes = "Adds the specified vector to this vector. Is slightly better performant than adding with a \"+\" because this doesn't create a new object for the result." },
},
Normalize = { Params = "", Return = "", Notes = "Normalizes this vector (makes it 1 unit long while keeping the direction). Quite useless for integer-only vectors, since the normalized vector will almost always truncate to zero vector. 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). Quite useless for integer-only vectors, since the normalized vector will almost always truncate to zero vector. 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." },
TurnCCW = { Params = "", Return = "", Notes = "Rotates the vector 90 degrees counterclockwise around the vertical axis. Note that this is specific to minecraft's axis ordering, which is X+ left, Z+ down." },
TurnCW = { Params = "", Return = "", Notes = "Rotates the vector 90 degrees clockwise around the vertical axis. Note that this is specific to minecraft's axis ordering, which is X+ left, Z+ down." },
},
Constants =
{
EPS = { Notes = "The max difference between two coords for which the coords are assumed equal (in LineCoeffToXYPlane() et al). Quite useless with integer-only vector." },
NO_INTERSECTION = { Notes = "Special return value for the LineCoeffToXYPlane() et al meaning that there's no intersection with the plane." },
},
Variables =
{

View File

@ -8,6 +8,7 @@ return
Functions =
{
CanPickup = { Params = "{{cPlayer|Player}}", Return = "bool", Notes = "Returns true if the specified player can pick the arrow when it's on the ground" },
GetBlockHit = { Params = "", Returns = "{{Vector3i}}", Desc = "Gets the block arrow is in" },
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." },
@ -35,6 +36,7 @@ return
Inherits = "cProjectileEntity",
}, -- cArrowEntity
cExpBottleEntity =
{
Desc = [[
@ -46,6 +48,7 @@ return
Inherits = "cProjectileEntity",
}, -- cExpBottleEntity
cFireChargeEntity =
{
Desc = [[
@ -55,7 +58,8 @@ return
Functions = {},
Inherits = "cProjectileEntity",
}, -- cFireChargeEntity
cFireworkEntity =
{
Desc = [[
@ -72,6 +76,7 @@ return
Inherits = "cProjectileEntity",
}, -- cFireworkEntity
cFloater =
{
Desc = "",
@ -79,6 +84,7 @@ return
Inherits = "cProjectileEntity",
}, -- cFloater
cGhastFireballEntity =
{
Desc = "",
@ -86,13 +92,16 @@ return
Inherits = "cProjectileEntity",
}, -- cGhastFireballEntity
cProjectileEntity =
{
Desc = "",
Desc = "Base class for all projectiles, such as arrows and fireballs.",
Functions =
{
GetCreator = { Params = "", Return = "{{cEntity}} descendant", Notes = "Returns the entity who created this projectile. May return nil." },
GetMCAClassName = { Params = "", Return = "string", Notes = "Returns the string that identifies the projectile type (class name) in MCA files" },
GetCreatorName = { Params = "", Return = "string", Notes = "Returns the name of the player that created the projectile. Will be empty for non-player creators" },
GetCreatorUniqueID = { Params = "", Return = "number", Notes = "Returns the unique ID of the entity who created this projectile, or {{cEntity#NO_ID|cEntity.NO_ID}} if the projectile wasn't created by an entity." },
GetMCAClassName = { Params = "", Return = "string", Notes = "Returns the string that identifies the projectile type (class name) in MCA files" },
GetProjectileKind = { Params = "", Return = "ProjectileKind", Notes = "Returns the kind of this projectile (pkXXX constant)" },
IsInGround = { Params = "", Return = "bool", Notes = "Returns true if this projectile has hit the ground." },
},
@ -121,6 +130,7 @@ return
Inherits = "cEntity",
}, -- cProjectileEntity
cSplashPotionEntity =
{
Desc = [[
@ -139,6 +149,7 @@ return
Inherits = "cProjectileEntity",
}, -- cSplashPotionEntity
cThrownEggEntity =
{
Desc = [[
@ -148,13 +159,15 @@ return
Inherits = "cProjectileEntity",
}, -- cThrownEggEntity
cThrownEnderPearlEntity =
{
Desc = "Represents a thrown ender pearl.",
Functions = {},
Inherits = "cProjectileEntity",
}, -- cThrownEnderPearlEntity
cThrownSnowballEntity =
{
Desc = "Represents a thrown snowball.",
@ -162,6 +175,7 @@ return
Inherits = "cProjectileEntity",
}, -- cThrownSnowballEntity
cWitherSkullEntity =
{
Desc = "Represents a wither skull being shot.",

View File

@ -52,6 +52,17 @@ return
Username = { Type = "string", Notes = "Name of the logged-in user." },
},
}, -- HTTPRequest
HTTPTemplateRequest =
{
Desc = [[This class is used only in the WebAdmin template script as the parameter to the function that provides the template.
]],
Variables =
{
Request = { Type = "HTTPRequest", Notes = "The request for which the template is being built." },
},
}, -- HTTPTemplateRequest
}

View File

@ -25,11 +25,11 @@ public:
// tolua_begin
/** Spawns a projectile of the given kind in front of the dispenser with the specified speed.
Returns the UniqueID of the spawned projectile, or 0 on failure. */
Returns the UniqueID of the spawned projectile, or cEntity::INVALID_ID on failure. */
UInt32 SpawnProjectileFromDispenser(int a_BlockX, int a_BlockY, int a_BlockZ, cProjectileEntity::eKind a_Kind, const Vector3d & a_Speed, const cItem * a_Item = nullptr);
/** Returns a unit vector in the cardinal direction of where the dispenser is facing. */
Vector3d GetShootVector(NIBBLETYPE a_Meta);
/** Returns a unit vector in the cardinal direction of where the dispenser with the specified meta would be facing. */
static Vector3d GetShootVector(NIBBLETYPE a_BlockMeta);
// tolua_end

View File

@ -42,7 +42,7 @@ public:
/** Set the player for mob heads with player type */
void SetOwner(const cPlayer & a_Owner);
/** Sets the player components for the mob heads with player type */
/** Sets the player components for the mob heads with player type. */
void SetOwner(const AString & a_OwnerUUID, const AString & a_OwnerName, const AString & a_OwnerTexture, const AString & a_OwnerTextureSignature);
/** Returns the type of the mob head */

View File

@ -397,7 +397,7 @@ public:
/** Set a meta value, with the option of not informing the client and / or not marking dirty.
Used for setting metas that are of little value for saving to disk and / or for sending to the client,
such as leaf decay flags. */
inline void SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Meta, bool a_ShouldMarkDirty = true, bool a_ShouldInformClient = true)
inline void SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Meta, bool a_ShouldMarkDirty = true, bool a_ShouldInformClients = true)
{
bool hasChanged = m_ChunkData.SetMeta(a_RelX, a_RelY, a_RelZ, a_Meta);
if (hasChanged)
@ -406,7 +406,7 @@ public:
{
MarkDirty();
}
if (a_ShouldInformClient)
if (a_ShouldInformClients)
{
m_PendingSendBlocks.push_back(sSetBlock(m_PosX, m_PosZ, a_RelX, a_RelY, a_RelZ, GetBlock(a_RelX, a_RelY, a_RelZ), a_Meta));
}

View File

@ -1228,7 +1228,7 @@ NIBBLETYPE cChunkMap::GetBlockBlockLight(int a_BlockX, int a_BlockY, int a_Block
void cChunkMap::SetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockMeta, bool a_ShouldMarkDirty, bool a_ShouldInformClient)
void cChunkMap::SetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockMeta, bool a_ShouldMarkDirty, bool a_ShouldInformClients)
{
int ChunkX, ChunkZ;
cChunkDef::AbsoluteToRelative(a_BlockX, a_BlockY, a_BlockZ, ChunkX, ChunkZ);
@ -1238,7 +1238,7 @@ void cChunkMap::SetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYP
cChunkPtr Chunk = GetChunk(ChunkX, ChunkZ);
if ((Chunk != nullptr) && Chunk->IsValid())
{
Chunk->SetMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockMeta, a_ShouldMarkDirty, a_ShouldInformClient);
Chunk->SetMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockMeta, a_ShouldMarkDirty, a_ShouldInformClients);
}
}

View File

@ -158,7 +158,7 @@ public:
NIBBLETYPE GetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ);
NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ);
NIBBLETYPE GetBlockBlockLight(int a_BlockX, int a_BlockY, int a_BlockZ);
void SetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockMeta, bool a_ShouldMarkDirty, bool a_ShouldInformClient);
void SetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockMeta, bool a_ShouldMarkDirty, bool a_ShouldInformClients);
void SetBlock (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, bool a_SendToClients = true);
bool GetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta);
bool GetBlockInfo (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_Meta, NIBBLETYPE & a_SkyLight, NIBBLETYPE & a_BlockLight);

View File

@ -79,7 +79,7 @@ public:
cEnchantments(const AString & a_StringSpec);
/** Adds the enchantments contained in a_Other into this object.
Existing enchantments are preserved, unless a_Other specifies a different level, in which case the level is changed. */
Existing enchantments are preserved, unless a_Other specifies a different level, in which case the level is changed to the a_Other's one. */
void Add(const cEnchantments & a_Other);
/** Adds enchantments in the stringspec; if a specified enchantment already exists, overwrites it */

View File

@ -305,7 +305,7 @@ public:
/** Returns the hitpoints that this pawn can deal to a_Receiver using its equipped items */
virtual int GetRawDamageAgainst(const cEntity & a_Receiver);
/** Returns whether armor will protect against the passed damage type */
/** Returns whether armor will protect against the specified damage type */
virtual bool ArmorCoversAgainst(eDamageType a_DamageType);
/** Returns the hitpoints out of a_RawDamage that the currently equipped armor would cover */
@ -329,9 +329,13 @@ public:
/** Returns the currently equipped boots; empty item if none */
virtual cItem GetEquippedBoots(void) const { return cItem(); }
/** Called when the health drops below zero. a_Killer may be nullptr (environmental damage) */
// tolua_end
/** Called when the health drops below zero. a_TDI's Attacker may be nullptr (environmental damage) */
virtual void KilledBy(TakeDamageInfo & a_TDI);
// tolua_begin
/** Called when the entity kills another entity */
virtual void Killed(cEntity * a_Victim) {}
@ -404,7 +408,7 @@ public:
virtual void TeleportToCoords(double a_PosX, double a_PosY, double a_PosZ);
/** Schedules a MoveToWorld call to occur on the next Tick of the entity */
void ScheduleMoveToWorld(cWorld * a_World, Vector3d a_NewPosition, bool a_SetPortalCooldown = false);
void ScheduleMoveToWorld(cWorld * a_World, Vector3d a_NewPosition, bool a_ShouldSetPortalCooldown = false);
bool MoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn, Vector3d a_NewPosition);

View File

@ -39,23 +39,17 @@ public:
// tolua_begin
/** Applies an entity effect
/** Applies an entity effect.
Checks with plugins if they allow the addition.
@param a_EffectType The entity effect to apply
@param a_EffectDurationTicks The duration of the effect
@param a_EffectIntensity The level of the effect (0 = Potion I, 1 = Potion II, etc)
@param a_DistanceModifier The scalar multiplied to the potion duration, only applies to splash potions)
a_EffectIntensity is the level of the effect (0 = Potion I, 1 = Potion II, etc).
a_DistanceModifier is the scalar multiplied to the potion duration (only applies to splash potions).
*/
void AddEntityEffect(cEntityEffect::eType a_EffectType, int a_EffectDurationTicks, short a_EffectIntensity, double a_DistanceModifier = 1);
/** Removes a currently applied entity effect
@param a_EffectType The entity effect to remove
*/
/** Removes a currently applied entity effect. */
void RemoveEntityEffect(cEntityEffect::eType a_EffectType);
/** Returns true, if the entity effect is currently applied
@param a_EffectType The entity effect to check
*/
/** Returns true, if the entity effect is currently applied. */
bool HasEntityEffect(cEntityEffect::eType a_EffectType) const;
/** Removes all currently applied entity effects (used when drinking milk) */
@ -63,7 +57,7 @@ public:
// tolua_end
/** remove the monster from the list of monsters targeting this pawn. */
/** Remove the monster from the list of monsters targeting this pawn. */
void NoLongerTargetingMe(cMonster * a_Monster);
/** Add the monster to the list of monsters targeting this pawn. (Does not check if already in list!) */

View File

@ -79,7 +79,8 @@ public:
Returns true if successful, false otherwise. */
bool ReadFile(const AString & a_FileName, bool a_AllowExampleRedirect = true);
/** Writes data stored in class to the specified ini file */
/** Writes data stored in class to the specified ini file.
Returns true on success, false on failure. */
bool WriteFile(const AString & a_FileName) const;
virtual bool Flush() override { return WriteFile(m_Filename); }

View File

@ -62,10 +62,10 @@ public:
void Clear(void);
/** Returns number of items out of a_ItemStack that can fit in the storage */
int HowManyCanFit(const cItem & a_ItemStack, bool a_ConsiderEmptySlots);
int HowManyCanFit(const cItem & a_ItemStack, bool a_ConsiderEmptySlots = true);
/** Returns how many items of the specified type would fit into the slot range specified */
int HowManyCanFit(const cItem & a_ItemStack, int a_BeginSlotNum, int a_EndSlotNum, bool a_ConsiderEmptySlots);
int HowManyCanFit(const cItem & a_ItemStack, int a_BeginSlotNum, int a_EndSlotNum, bool a_ConsiderEmptySlots = true);
/** Adds as many items out of a_ItemStack as can fit.
If a_AllowNewStacks is set to false, only existing stacks can be topped up;

View File

@ -78,10 +78,9 @@ public:
/** Adds as many items out of a_ItemStack as can fit.
If a_AllowNewStacks is set to false, only existing stacks can be topped up;
if a_AllowNewStacks is set to true, empty slots can be used for the rest.
If a_PrioritarySlot is set to a positive value, then the corresponding slot will be used in
first (if empty or compatible with added items)
if a_PrioritarySlot is set to -1, regular order apply
If a_AllowNewStacks is set to true, empty slots can be used for the rest.
If a_PrioritarySlot is set to a positive value, then the corresponding slot will be used first (if empty or compatible with added items).
If a_PrioritarySlot is set to -1, regular order applies.
Returns the number of items that fit.
*/
int AddItem(cItem & a_ItemStack, bool a_AllowNewStacks = true, int a_PrioritarySlot = -1);
@ -89,10 +88,9 @@ public:
/** Same as AddItem, but works on an entire list of item stacks.
The a_ItemStackList is modified to reflect the leftover items.
If a_AllowNewStacks is set to false, only existing stacks can be topped up;
if a_AllowNewStacks is set to true, empty slots can be used for the rest.
If a_PrioritarySlot is set to a positive value, then the corresponding slot will be used in
first (if empty or compatible with added items)
if a_PrioritarySlot is set to -1, regular order apply
If a_AllowNewStacks is set to true, empty slots can be used for the rest.
If a_PrioritarySlot is set to a positive value, then the corresponding slot will be used first (if empty or compatible with added items).
If a_PrioritarySlot is set to -1, regular order applies.
Returns the total number of items that fit.
*/
int AddItems(cItems & a_ItemStackList, bool a_AllowNewStacks = true, int a_PrioritarySlot = -1);

View File

@ -77,6 +77,8 @@ public:
char GetWindowID(void) const { return m_WindowID; } // tolua_export
int GetWindowType(void) const { return m_WindowType; } // tolua_export
/** Returns the textual representation of the window's type, such as "minecraft:chest". */
const AString GetWindowTypeName(void) const; // tolua_export
cWindowOwner * GetOwner(void) { return m_Owner; }
@ -136,10 +138,12 @@ public:
const AString & GetWindowTitle() const { return m_WindowTitle; }
void SetWindowTitle(const AString & a_WindowTitle) { m_WindowTitle = a_WindowTitle; }
/** Sends the UpdateWindowProperty (0x69) packet to all clients of the window */
/** Updates a numerical property associated with the window. Typically used for furnace progressbars.
Sends the UpdateWindowProperty packet to all clients of the window */
virtual void SetProperty(short a_Property, short a_Value);
/** Sends the UpdateWindowPropert(0x69) packet to the specified player */
/** Updates a numerical property associated with the window. Typically used for furnace progressbars.
Sends the UpdateWindowProperty packet only to the specified player */
virtual void SetProperty(short a_Property, short a_Value, cPlayer & a_Player);
// tolua_end

View File

@ -2082,9 +2082,9 @@ void cWorld::SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_Bloc
void cWorld::SetBlockMeta(int a_X, int a_Y, int a_Z, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty, bool a_ShouldInformClient)
void cWorld::SetBlockMeta(int a_X, int a_Y, int a_Z, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty, bool a_ShouldInformClients)
{
m_ChunkMap->SetBlockMeta(a_X, a_Y, a_Z, a_MetaData, a_ShouldMarkDirty, a_ShouldInformClient);
m_ChunkMap->SetBlockMeta(a_X, a_Y, a_Z, a_MetaData, a_ShouldMarkDirty, a_ShouldInformClients);
}

View File

@ -402,7 +402,7 @@ public:
return m_ChunkMap->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
}
void SetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty = true, bool a_ShouldInformClient = true);
void SetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty = true, bool a_ShouldInformClients = true);
NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ);
NIBBLETYPE GetBlockBlockLight(int a_BlockX, int a_BlockY, int a_BlockZ);