CountNonAirBlocks={Params="",Return="number",Notes="Returns the count of blocks that are not air. Returns 0 if blocktypes not available. Block metas are ignored (if present, air with any meta is still considered air)."},
{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."},
Crop={Params="AddMinX, SubMaxX, AddMinY, SubMaxY, AddMinZ, SubMaxZ",Return="",Notes="Crops the specified number of blocks from each border. Modifies the size of this blockarea object."},
DumpToRawFile={Params="FileName",Return="",Notes="Dumps the raw data into a file. For debugging purposes only."},
Expand={Params="SubMinX, AddMaxX, SubMinY, AddMaxY, SubMinZ, AddMaxZ",Return="",Notes="Expands the specified number of blocks from each border. Modifies the size of this blockarea object. New blocks created with this operation are filled with zeroes."},
Fill={Params="DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Fills the entire block area with the same values, specified. Uses the DataTypes param to determine which content types are modified."},
{Params="{{cCuboid|RelCuboid}}, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Fills the specified cuboid (in relative coords) with the same values (like Fill() )."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Fills the specified cuboid with the same values (like Fill() )."},
GetBlockLight={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the blocklight at the specified absolute coords"},
GetBlockMeta={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the block meta at the specified absolute coords"},
GetBlockSkyLight={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the skylight at the specified absolute coords"},
GetBlockType={Params="BlockX, BlockY, BlockZ",Return="BLOCKTYPE",Notes="Returns the block type at the specified absolute coords"},
GetBlockTypeMeta={Params="BlockX, BlockY, BlockZ",Return="BLOCKTYPE, NIBBLETYPE",Notes="Returns the block type and meta at the specified absolute coords"},
GetNonAirCropRelCoords={Params="[IgnoreBlockType]",Return="MinRelX, MinRelY, MinRelZ, MaxRelX, MaxRelY, MaxRelZ",Notes="Returns the minimum and maximum coords in each direction for the first non-ignored block in each direction. If there are no non-ignored blocks within the area, or blocktypes are not present, the returned values are reverse-ranges (MinX <- m_RangeX, MaxX <- 0 etc.). IgnoreBlockType defaults to air."},
GetRelBlockTypeMeta={Params="RelBlockX, RelBlockY, RelBlockZ",Return="BLOCKTYPE, NIBBLETYPE",Notes="Returns the block type and meta at the specified relative coords"},
GetWEOffset={Params="",Return="{{Vector3i}}",Notes="Returns the WE offset, a data value sometimes stored in the schematic files. Cuberite doesn't use this value, but provides access to it using this method. The default is {0, 0, 0}."},
HasBlockLights={Params="",Return="bool",Notes="Returns true if current datatypes include blocklight"},
HasBlockMetas={Params="",Return="bool",Notes="Returns true if current datatypes include block metas"},
HasBlockSkyLights={Params="",Return="bool",Notes="Returns true if current datatypes include skylight"},
HasBlockTypes={Params="",Return="bool",Notes="Returns true if current datatypes include block types"},
LoadFromSchematicFile={Params="FileName",Return="",Notes="Clears current content and loads new content from the specified schematic file. Returns true if successful. Returns false and logs error if unsuccessful, old content is preserved in such a case."},
LoadFromSchematicString={Params="SchematicData",Return="",Notes="Clears current content and loads new content from the specified string (assumed to contain .schematic data). Returns true if successful. Returns false and logs error if unsuccessful, old content is preserved in such a case."},
{Params="BlockAreaSrc, {{Vector3i|RelMinCoords}}, Strategy",Return="",Notes="Merges BlockAreaSrc into this object at the specified relative coords, using the specified strategy"},
{Params="BlockAreaSrc, RelX, RelY, RelZ, Strategy",Return="",Notes="Merges BlockAreaSrc into this object at the specified relative coords, using the specified strategy"},
MirrorXY={Params="",Return="",Notes="Mirrors this block area around the XY plane. Modifies blocks' metas (if present) to match (i. e. furnaces facing the opposite direction)."},
MirrorXYNoMeta={Params="",Return="",Notes="Mirrors this block area around the XY plane. Doesn't modify blocks' metas."},
MirrorXZ={Params="",Return="",Notes="Mirrors this block area around the XZ plane. Modifies blocks' metas (if present)"},
MirrorXZNoMeta={Params="",Return="",Notes="Mirrors this block area around the XZ plane. Doesn't modify blocks' metas."},
MirrorYZ={Params="",Return="",Notes="Mirrors this block area around the YZ plane. Modifies blocks' metas (if present)"},
MirrorYZNoMeta={Params="",Return="",Notes="Mirrors this block area around the YZ plane. Doesn't modify blocks' metas."},
{Params="World, {{cCuboid|Cuboid}}, DataTypes",Return="bool",Notes="Reads the area from World, returns true if successful"},
{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"},
},
RelLine=
{
{Params="{{Vector3i|RelPoint1}}, {{Vector3i|RelPoint2}}, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Draws a line between the two specified points. Sets only datatypes specified by DataTypes (baXXX constants)."},
{Params="RelX1, RelY1, RelZ1, RelX2, RelY2, RelZ2, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Draws a line between the two specified points. Sets only datatypes specified by DataTypes (baXXX constants)."},
RotateCCW={Params="",Return="",Notes="Rotates the block area around the Y axis, counter-clockwise (east -> north). Modifies blocks' metas (if present) to match."},
RotateCCWNoMeta={Params="",Return="",Notes="Rotates the block area around the Y axis, counter-clockwise (east -> north). Doesn't modify blocks' metas."},
RotateCW={Params="",Return="",Notes="Rotates the block area around the Y axis, clockwise (north -> east). Modifies blocks' metas (if present) to match."},
RotateCWNoMeta={Params="",Return="",Notes="Rotates the block area around the Y axis, clockwise (north -> east). Doesn't modify blocks' metas."},
SaveToSchematicFile={Params="FileName",Return="",Notes="Saves the current contents to a schematic file. Returns true if successful."},
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."},
SetBlockTypeMeta={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block type and meta at the specified absolute coords"},
{Params="{{Vector3i|Origin}}",Return="",Notes="Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords."},
{Params="OriginX, OriginY, OriginZ",Return="",Notes="Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords."},
SetRelBlockTypeMeta={Params="RelBlockX, RelBlockY, RelBlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block type and meta at the specified relative coords"},
{Params="{{Vector3i|Offset}}",Return="",Notes="Sets the WE offset, a data value sometimes stored in the schematic files. Mostly used for WorldEdit. Cuberite doesn't use this value, but provides access to it using this method."},
{Params="OffsetX, OffsetY, OffsetZ",Return="",Notes="Sets the WE offset, a data value sometimes stored in the schematic files. Mostly used for WorldEdit. Cuberite doesn't use this value, but provides access to it using this method."},
{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, DataTypes",Return="bool",Notes="Writes the area into World at the specified coords, returns true if successful"},
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta",Return="",Notes="Fills the cuboid, specified in relative coords, by the specified block type and block meta. The cuboid may reach outside of the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta",Return="",Notes="Fills the cuboid, specified in relative coords, by the specified block type and block meta. The cuboid may reach outside of the chunk, only the part intersecting with this chunk is filled."},
},
FloorRelCuboid=
{
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta",Return="",Notes="Fills those blocks of the cuboid (specified in relative coords) that are considered non-floor (air, water) with the specified block type and meta. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta",Return="",Notes="Fills those blocks of the cuboid (specified in relative coords) that are considered non-floor (air, water) with the specified block type and meta. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
GetBlockEntity={Params="RelX, RelY, RelZ",Return="{{cBlockEntity}} descendant",Notes="Returns the block entity for the block at the specified coords. Creates it if it doesn't exist. Returns nil if the block has no block entity capability."},
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta, RandomSeed, ChanceOutOf10k",Return="",Notes="Fills the specified relative cuboid with block type and meta in random locations. RandomSeed is used for the random number genertion (same seed produces same results); ChanceOutOf10k specifies the density (how many out of every 10000 blocks should be filled). Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta, RandomSeed, ChanceOutOf10k",Return="",Notes="Fills the specified relative cuboid with block type and meta in random locations. RandomSeed is used for the random number genertion (same seed produces same results); ChanceOutOf10k specifies the density (how many out of every 10000 blocks should be filled). Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
},
ReadBlockArea={Params="{{cBlockArea|BlockArea}}, MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ",Return="",Notes="Reads data from the chunk into the block area object. Block types and metas are processed."},
ReplaceRelCuboid=
{
{Params="{{cCuboid|RelCuboid}}, SrcType, SrcMeta, DstType, DstMeta",Return="",Notes="Replaces all SrcType+SrcMeta blocks in the cuboid (specified in relative coords) with DstType+DstMeta blocks. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, SrcType, SrcMeta, DstType, DstMeta",Return="",Notes="Replaces all SrcType+SrcMeta blocks in the cuboid (specified in relative coords) with DstType+DstMeta blocks. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
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."},
GenerateOfflineUUID={Params="Username",Return="string",Notes="(STATIC) Generates an UUID based on the player name provided. This is used for the offline (non-auth) mode, when there's no UUID source. Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same. Returns a 32-char UUID (no dashes)."},
GetIPString={Params="",Return="string",Notes="Returns the IP address of the connection, as a string. Only the address part is returned, without the port number."},
GetLocale={Params="",Return="Locale",Notes="Returns the locale string that the client sends as part of the protocol handshake. Can be used to provide localized strings."},
GetPlayer={Params="",Return="{{cPlayer|cPlayer}}",Notes="Returns the player object connected to this client. Note that this may be nil, for example if the player object is not yet spawned."},
GetProtocolVersion={Params="",Return="number",Notes="Returns the protocol version number of the protocol that the client is talking. Returns zero if the protocol version is not (yet) known."},
GetUUID={Params="",Return="string",Notes="Returns the authentication-based UUID of the client. This UUID should be used to identify the player when persisting any player-related data. Returns a 32-char UUID (no dashes)"},
HasPluginChannel={Params="ChannelName",Return="bool",Notes="Returns true if the client has registered to receive messages on the specified plugin channel."},
IsUUIDOnline={Params="UUID",Return="bool",Notes="(STATIC) Returns true if the UUID is generated by online auth, false if it is an offline-generated UUID. We use Version-3 UUIDs for offline UUIDs, online UUIDs are Version-4, thus we can tell them apart. Accepts both 32-char and 36-char UUIDs (with and without dashes). If the string given is not a valid UUID, returns false."},
SetClientBrand={Params="ClientBrand",Return="",Notes="Sets the value of the client's brand. Normally this value is received from the client by a MC|Brand plugin message, this function lets plugins overwrite the value."},
SetLocale={Params="Locale",Return="",Notes="Sets the locale that Cuberite keeps on record. Initially the locale is initialized in protocol handshake, this function allows plugins to override the stored value (but only server-side and only until the user disconnects)."},
SendBlockChange={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sends a BlockChange packet to the client. This can be used to create fake blocks only for that player."},
SendEntityAnimation={Params="{{cEntity|Entity}}, AnimationNumber",Return="",Notes="Sends the specified animation of the specified entity to the client. The AnimationNumber is protocol-specific."},
SendSoundEffect={Params="SoundName, X, Y, Z, Volume, Pitch",Return="",Notes="Sends a sound effect request to the client. The sound is played at the specified coords, with the specified volume (a float, 1.0 is full volume, can be more) and pitch (0-255, 63 is 100%)"},
SendTimeUpdate={Params="WorldAge, TimeOfDay, DoDaylightCycle",Return="",Notes="Sends the specified time update to the client. WorldAge is the total age of the world, in ticks. TimeOfDay is the current day's time, in ticks (0 - 24000). DoDaylightCycle is a bool that specifies whether the client should automatically move the sun (true) or keep it in the same place (false)."},
{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."},
},
AddRunCommandPart={Params="Text, Command, [Style]",Return="self",Notes="Adds a text which, when clicked, runs the specified command. Chaining."},
AddSuggestCommandPart={Params="Text, Command, [Style]",Return="self",Notes="Adds a text which, when clicked, puts the specified command into the player's chat input area. Chaining."},
AddTextPart={Params="Text, [Style]",Return="self",Notes="Adds a regular text. Chaining."},
AddUrlPart={Params="Text, Url, [Style]",Return="self",Notes="Adds a text which, when clicked, opens up a browser at the specified URL. Chaining."},
Clear={Params="",Return="",Notes="Removes all parts from this object"},
CreateJsonString={Params="[AddPrefixes]",Return="string",Notes="Returns the entire object serialized into JSON, as it would be sent to a client. AddPrefixes specifies whether the chat prefixes should be prepended to the message, true by default."},
ExtractText={Params="",Return="string",Notes="Returns the text from the parts that comprises the human-readable data. Used for older protocols that don't support composite chat and for console-logging."},
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."},