Template:MC/Materials row
More actions
Template:Lua This template is used to create the rows for the table containing the material properties on Materials.
Usage
The parameter is set to the title to display in the first column.
The parameter Template:P contains three color values separated by commas to display as a colored cell and text. It should be set based on the material's map color. If unset, it defaults to a white color and the text "None"
Properties
The table contains the following properties. They are set to 1 for true, and 0 for false. Template:Pipe escape
Subclasses can also be set using Template:P for to change the defaults based on coded subclasses. Values include:
liquid- defaults Template:P and Template:P to 1
- defaults Template:P and Template:P to 0
- defaults Template:P to "replace"
nonsolid- defaults Template:P and Template:P to 0
transparent- defaults Template:P and Template:P to 0
- defaults Template:P to 1
- defaults Template:P to "replace"
The parameter Template:P can be set to determine the interaction when a piston pushes the block. Options are as follows:
pushed- pushes the block, defaultreplace- breaks the block being pushedblocked- stops the piston from extending
Code
The parameters generally correspond to the actual structure of the code.
- Template:P does not refer to the code, it is instead just a useful tool to mass-define parameters.
- Template:P refers to the
isLiquid()method. - Template:P refers to the
isSolid()method. - Template:P refers to the
blocksMotion()method. - Template:P refers to the
isFlammable()method. - Template:P refers to the
isReplaceable()method. - Template:P refers to the
isSolidBlocking()method. - Template:P refers to the
isAlwaysDestroyable()methods. - Template:P refers to the
getPushReaction()methods.
See also
- {{[[Template::Materials/blocks row|:Materials/blocks row]]}}
If you're done making changes, please refresh the text. (View all subpages of this page.)
ja:材料/properties row ko:Materials/properties row pt:Materials/properties row th:Materials/properties row