Converts tile id to the block id
numeric tile id
numeric block id corresponding to the given tile id
Converts block id to the tile id
numeric tile id
numeric tile id corresponding to the given block id
Creates new block using specified params
string id of the block. You should register it via IDRegistry.genBlockID call first
array containing all variations of the block. Each variation corresponds to block data value, data values are assigned according to variations order
SpecialType object, either java-object returned by Block.createSpecialType or js-object with the required properties, you can also pass special type name, if the type was previously registered
Creates new block using specified params, creating four variations for each of the specified variations to be able to place it facing flayer with the front side and defines the appropriate behavior. Useful for different machines and mechanisms
string id of the block. You should register it via IDRegistry.genBlockID call first
array containing all variations of the block. Each variation corresponds to four block data values, data values are assigned according to variations order
SpecialType object, either java-object returned by Block.createSpecialType or js-object with the required properties, you can also pass special type name, if the type was previously registered
Creates a new special type using specified params and registers it by name
special type properties
string name to register the special type
Gets drop for the specified block. Used mostly by Core Engine's ToolAPI, though, can be useful in the mods, too
block info
item that was (or is going to be) used to break the block
coordinates where the block was (or is going to be) broken
block drop, the array of arrays, each containing three values: id, count and data respectively
numeric block id
destroy time of the block, in ticks
numeric block id
explostion resistance of the block
numeric block id
friction of the block
numeric block id
light level, emmited by block, from 0 to 15
numeric block id
light opacity of the block, from 0 to 15
numeric block id
the color specified block is displayed on the vanilla maps
string id of the block
block numeric id by its string id or just returns its numeric id if input was a numeric id
numeric block id
render layer of the block
numeric block id
render type of the block
numeric block id
translucency of the block
numeric block id
true, if the specified block id is a vanilla block
numeric block id
true, if block is solid, false otherwise
Registers function used by Core Engine to determine block drop for the specified block id
function to be called to determine what will be dropped when the block is broken
if level is specified and is not 0, digging level of the block is additionally set
true, if specified string or numeric id exists and the function was registered correctly, false otherwise
Same as Block.registerDropFunction but accepts only numeric tile id as the first param
Registers function to be called when the block is placed in the world
block numeric or string id
function to be called when the block is placed in the world
Same as Block.registerPlaceFunction but accepts only numeric tile id as the first param
Registeres function used by Core Engine to determine block drop for the specified block id
tile string or numeric id
function to be called when a block in the world is broken by environment (explosions, pistons, etc.)
true, if specified string or numeric id exists and the function was registered correctly, false otherwise
Same as Block.registerPopResourcesFunction but accepts only numeric tile id as the first param
Makes block invoke callback randomly depending on game speed. Occurs more often then Block.setRandomTickCallback and only if the block is not far away from player
block id to register
function to be called
Registers material and digging level for the specified block
block numeric or string id
material name
block's digging level
Registers a default destroy function for the specified block, considering its digging level
tile string id
digging level of the block
if true, the block is dropped with data equals to 0
Same as Block.setDestroyLevel but accepts only numeric tile id as the first param
Sets destroy time for the block with specified id
string or numeric block id
destroy time for the block, in ticks
Makes block invoke callback randomly depending on game speed
block id to register for random ticks
function to be called on random block tick
Makes block accept redstone signal
block numeric or string id
block data, currently not used
if true, the redstone changes at the block will notify the "RedstoneSignal" callback
Same as Block.setBlockShape, but accepts coordinates as scalar params, not objects
block numeric id
block data
Temporarily sets destroy time for block, saving the old value for the further usage
numeric block id
new destroy time in ticks
Removes all the redstone functionality from the block
block numeric or string id
Makes block emit redstone signal
block numeric or string id
if true, redstone wires will connect to the block
Makes block receive redstone signals via "RedstoneSignal" callback
block numeric or string id
if true, redstone wires will connect to the block
Generated using TypeDoc
Module used to create and manipulate blocks. The difference between terms "block" and "tile" is in its usage: blocks are used in the inventory, tiles are placed in the world and have different ids for some vanilla blocks. Use Block.convertBlockToItemId and Block.convertItemToBlockId