Wizards of Lua

The Art of Spell Crafting


Material - Physical Properties of Blocks

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

Properties

Below you find short descriptions about each of the properties and some examples about how to use them in your spells.


blocksLight : boolean

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.


blocksMovement : boolean

This is true if entites can not pass this material.


canBurn : boolean

This is true if this material can catch fire.


liquid : boolean

This is true if this material is liquid and can flow.


mobility : string

This defines, if this material can be pushed, e.g. by a piston. The value is one of ‘NORMAL’, ‘DESTROY’, ‘BLOCK’, ‘IGNORE’.


name : string

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’.


opaque : boolean

This is true if this material blocks the sight of entities.


replaceable : boolean

This is true if this material can be replaced by other blocks, eg. snow, vines, and tall grass.


requiresNoTool : boolean

This is true if this material can be harvested just by hands.


solid : boolean

This is true if this material is solid.