The Material class describes the physical behaviour of a Block.
The Material class is a subtype of the Object class and inherits all its properties and functions.
Here is an overview of the Material properties:
Property | Type | read / write |
---|---|---|
blocksLight | boolean | r |
blocksMovement | boolean | r |
canBurn | boolean | r |
liquid | boolean | r |
mobility | string | r |
name | string | r |
opaque | boolean | r |
replaceable | boolean | r |
requiresNoTool | boolean | r |
solid | boolean | r |
Below you find short descriptions about each of the properties and some examples about how to use them in your spells.
This is The true if light can not pass this material. If so it will prevent grass from growing on dirt underneath and kill any grass below it.
This is true if entites can not pass this material.
This is true if this material can catch fire.
This is true if this material is liquid and can flow.
This defines, if this material can be pushed, e.g. by a piston. The value is one of ‘NORMAL’, ‘DESTROY’, ‘BLOCK’, ‘IGNORE’.
This property contains the name of this material, if known, or nil, if not. This is something like ‘GRASS’, ‘WOOD’, ‘IRON’, and many others.
Please note that you must not confuse this with the block name.
For example, ‘IRON’ is the material not only of ‘iron_bars’, ‘iron_block’, ‘iron_door’, ‘iron_trapdoor’, ‘light_weighted_pressure_plate’, and ‘heavy_weighted_pressure_plate’, but also of ‘gold_block’, ‘lapis_block’, ‘diamond_block’, ‘emerald_block’, and ‘redstone_block’.
This is true if this material blocks the sight of entities.
This is true if this material can be replaced by other blocks, eg. snow, vines, and tall grass.
This is true if this material can be harvested just by hands.
This is true if this material is solid.