Creates new material with specified breaking speed multiplier. Some of the materials are already registered:
stone - used for pickaxes
wood - used for axes
dirt - used for shovels
plant - used for all plants (no vanilla tool supports this material)
fibre - used for swords (to break web)
cobweb - currently not used
unbreaking - used for unbreaking blocks, liquids, end portal, etc.
new (or existing) material name
multiplier used to calculate block breaking speed. 1 is a default value for dirt and 3 is a default value for stone
Creates new tool material with specified parameters. Some of the tool materials are already registered:
wood - used for wooden instruments
stone - used for stone instruments
iron - used for iron instruments
golden - used for golden instruments
diamond - used for diamond instruments
new (or existing) material name
parameters describing material properties
Spawns experience orbs on the specified coordinate
amount of experience to spawn
Spawns random amount of experience on the specified block coordinates
block coordinates
minimum amount of orbs to be spawned
maximum amount of orbs to be spawned
additional experiences, usually passed from ToolAPI.EnchantData.experience field
Applies fortune drop modifier to the drop array
drop array containing number of the arrays
enchantment level
numeric tile id
object containing ToolAPI block data or undefined if no block data was specified for this block
numeric tile id
destroy level of the block with specified id or 0, if no block data was specified for this block
numeric tile id
object containing block material information or null, if no block data was specified for this block
numeric tile id
carried tool information stored in slightly modified ToolAPI.ToolParams object or null if no tool data was specified
carried tool's breaking level or 0 if no tool data was provided
Calculates destroy time for the block that is being broken with specified tool at the specified coords. Used mostly by Core Engine to apply break time
if block and item are native items, and this parameter is set to true, all the calculations will still be performed
item extra instance, if not specified, method uses carried item's extra
enchant data object, containing enchants used for blocks destroy speed calculations
numeric item id
tool information stored in slightly modified ToolAPI.ToolParams object or null if no tool data was specified
numeric item id
tool's breaking level or 0 if no tool data was provided
numeric item id
numeric tile id
digging level if specified tool can mine specified block, 0 if data for the tool or for the block was not specified or if specified tool cannot mine specified block
Sets digging level for block. If digging level of tool is higher then block's one, the block is dropped
numeric tile id
block's digging level
Registers material and digging level for the specified block
numeric tile id
material name
block's digging level
used to mark vanilla blocks data. Generally used within Core Engine code and should not be used within mods until you really know what you're doing
Registers material and digging level for the specified blocks
material name
an array of numeric tiles ids
used to mark vanilla blocks data. Generally used within Core Engine code and should not be used within mods until you really know what you're doing
Registers item as a sword
numeric item id
registered tool material name or tool material object used to register the sword
additional tool parameters
Registers item as a tool
numeric item id
registered tool material name or tool material object used to register the tool
block material names that can be broken by this instrument. For example, you can use ["stone"] for the pickaxes
additional tool parameters
Resets ToolAPI engine state
Generated using TypeDoc
Module used to manage block and tools material and create tools with all required properties