whether the block of given id can be an extra block (it's the block that can be set inside of another blocks, for ex. water and other liquids)
whether the block of given id can contain liquid inside
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 new liquid block using specified params
string id of the block. You should register it via IDRegistry.genBlockID call first
object containing all needed params to describe your custom liquid block. There you can specify custom name IDs for static and dynamic liquid blocks separately, and if you do this, you have to register those name IDs via IDRegistry.genBlockID before using them
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
special type name
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
drop function of the block with given numeric id
numeric block id
explosion resistance of the block
numeric block id
friction of the block
numeric block id
light level, emitted 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
given block's material numeric id
string id of the block
block numeric id by its string id or just returns its numeric id if input was a numeric id
place function of the block with given numeric id, or undefined if it was not specified
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
Defines custom behavior when the player clicks on the block with definite id
block's numeric or string id
function that will be called when the player clicks the block with given id
Same as Block.registerClickFunction, but only numeric block id can be passed
Registers function used by Core Engine to determine block drop for the specified block id
tile string or numeric 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 on entity being inside the block. Can be used to create portals.
function to be called when entity is inside the block
true, if the function was registered correctly, false otherwise
Same as Block.registerEntityInsideFunction but accepts only numeric tile id as the first param
Registers function on entity step on the block.
function to be called when entity step on the block
true, if the function was registered correctly, false otherwise
Same as Block.registerEntityStepOnFunction but accepts only numeric tile id as the first param
Registers function on neighbour blocks updates
function to be called when neighbour block updates
true, if the function was registered correctly, false otherwise
Same as Block.registerNeighbourChangeFunction 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
Registered 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
true if specified string or numeric id exists, false otherwise
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