MCMaterial
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.block.material.MCMaterial;
Methods
Returns if this material is considered solid or not
Return Type: boolean
MCMaterial.blocksMovement() as boolean
myMCMaterial.blocksMovement();
Retrieves the color index of the block. This is is the same color used by vanilla maps to represent this block.
Return Type: MCMaterialColor
MCMaterial.getColor() as MCMaterialColor
myMCMaterial.getColor();
Returns if the block can burn or not.
Return Type: boolean
MCMaterial.isFlammable() as boolean
myMCMaterial.isFlammable();
Returns if blocks of these materials are liquids.
Return Type: boolean
MCMaterial.isLiquid() as boolean
myMCMaterial.isLiquid();
Indicate if the material is opaque
Return Type: boolean
MCMaterial.isOpaque() as boolean
myMCMaterial.isOpaque();
Returns whether the material can be replaced by other blocks when placed - eg snow, vines and tall grass.
Return Type: boolean
MCMaterial.isReplaceable() as boolean
myMCMaterial.isReplaceable();
Returns true if the block is a considered solid. This is true by default.
Return Type: boolean
MCMaterial.isSolid() as boolean
myMCMaterial.isSolid();
Properties
Name | Type | Has Getter | Has Setter |
---|
color | MCMaterialColor | true | false |
commandString | string | true | false |