Add a block definition to the list. The Block ID is a numeric index thats used in the world array. If you're doing custom ones probably best to start at 100. Right now theres only 255 allowed.
The ID of the block to add. If it already exists it'll be replaced.
The definition of the new block.
Block for more details.
Add a set of particulars at a particular world location
The ID of the image in the cache to use as the particle
The x coordinate of the world position to add the particles at
The y coordinate of the world position to add the particles at
The number of particles to add
Add a set of particulars at a particular tile location
The ID of the image in the cache to use as the particle
The x coordinate of the tile position to add the particles at
The y coordinate of the tile position to add the particles at
The number of particles to add
Add a recipe to the game
The name of the recipe
The recipe to be added
Add a skin definition
The name to use for this skin
The definition of the skin as a structure
Add a tool into the default inventory of all players.
The ID of the image in the cache to show for this tool.
The ID of the block to place for this tool (or zero for none)
An ID to assign for this tool so that callbacks can identify particular calls being used
True if this tool can target empty spaces
True if this tool can target spaces with a block in
Optional
delayOnOperation: numberTime before operation takes place on a full block
Optional
breakable: booleanTrue if this tool has a condition - i.e. some of it used but not a whole item
Optional
amountUsed: numberThe number of items to use up for each use of the tool (note this can be partial for items that wear out over time)
An identifier that can be used to make the tool into a found item
Get the number of an item a mob has
The mob to check
The type of item to count as returned from
The number of the item the mob has
addTool
Create new item floating in the world for a play to pick up
The x coordinate in blocks to place the item at
The y coordinate in blocks to place the item at
The number of the item in the stack
The type of the item to create as returned from
The type of the uniquely created item
addTool
Create a mob in the world
The name to give the mod (or "" to not display a name)
The ID of the skin of the mob to create (@see SKINS)
The x coordinate in the world to create the mob in world coordinates (* BLOCK_SIZE)
The y coordinate in the world to create the mob in world coordinates (* BLOCK_SIZE)
Optional
thinkFunction: MobThinkFunctionThe callback for the mob to think each frame
Get the block at a particular location
The x coordinate of the block to be retrieved in tiles.
The y coordinate of the block to be retrieved in tiles.
The layer on which the block should be set (0 = foreground, 1 = background).
The block ID at the given location or 0 for none.
Layer
Get the value of a property
The name of the property whose value is retrieved
The value of the property
Get a handle to the local player's mob. This is kinda weird right now since mods only run on the server.
The local player to be manipulated.
Get a list of the mobs in the world at the moment.
The list of mobs in the world
Give a mob an item
The mob to give the item
The number of the item to give
The type of item to give as returned from
addTool
Remove a previously created mob
The mob to be removed
Set a block in the game world.
The x coordinate of the block to be set in tiles.
The y coordinate of the block to be set in tiles.
The layer on which the block should be set (0 = foreground, 1 = background).
The ID of the block to be placed
Layer
Set a game property
The name of the property to set
The value to apply to the property
GameProperty
Set the meta data blob associated with the current map for this mod. Note this should be called sparingly since it'll results in the meta data being transmitted to the clients (theres no real use for that yet)
The blob to store for this mod
Equivalent to Javascript setTimeout but fired in the context of the mod
The callback name to call back with
The timeout in game ticks
Optional
tileX: numberThe x coordinate of the optional tile location this time was associated with
Optional
tileY: numberThe y coordinate of the optional tile location this time was associated with
Optional
layer: numberThe layer of optional tile location this time was associated with
Take an item from a mob
The mob to take the item from
The number of the item to take
The type of item to take as returned from
addTool
Generated using TypeDoc
A representation of the Game from the Mod's point of view. While the actual game object is exposed to the mod, this interface describes the agreed contract between the mod and the game. Anything outside of this might break between versions.