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 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 block material information or null
, if no
block data was specified for this block.
Carried tool information stored in slightly modified ToolAPI.ToolParams object or null if no tool data was specified.
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
Optional
ignoreNative: booleanif block and item are native items, and this parameter is set to true, all the calculations will still be performed
Optional
extra: ItemExtraDataitem 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.
Registers material and digging level for the specified block.
numeric tile ID
material name
Optional
level: numberblock's digging level
Optional
isNative: booleanused 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
Optional
params: ToolParamsadditional 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
Optional
params: ToolParamsadditional tool parameters
Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.
Module used to manage block and tools material and create tools with all required properties.