Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

Material

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.

script.zs
import crafttweaker.api.block.material.Material;

Methods

Return Type: boolean

script.zs
// Material.blocksMotion() as boolean
myMaterial.blocksMotion();

Return Type: MaterialColor

script.zs
// Material.getColor() as MaterialColor
myMaterial.getColor();

Gets the bracket syntax for this Material

Returns: The <material> Bracket Syntax for this material
Return Type: string

script.zs
// Material.getCommandString() as string
myMaterial.getCommandString();

Return Type: PushReaction

script.zs
// Material.getPushReaction() as PushReaction
myMaterial.getPushReaction();

Return Type: boolean

script.zs
// Material.isFlammable() as boolean
myMaterial.isFlammable();

Return Type: boolean

script.zs
// Material.isLiquid() as boolean
myMaterial.isLiquid();

Return Type: boolean

script.zs
// Material.isReplaceable() as boolean
myMaterial.isReplaceable();

Return Type: boolean

script.zs
// Material.isSolid() as boolean
myMaterial.isSolid();

Return Type: boolean

script.zs
// Material.isSolidBlocking() as boolean
myMaterial.isSolidBlocking();

Properties

NameTypeHas GetterHas SetterDescription
Name
blocksMotion
Type
boolean
Has Getter
true
Has Setter
false
Description
Name
color
Type
MaterialColor
Has Getter
true
Has Setter
false
Description
Name
commandString
Type
string
Has Getter
true
Has Setter
false
Description
Gets the bracket syntax for this Material
Name
isFlammable
Type
boolean
Has Getter
true
Has Setter
false
Description
Name
isLiquid
Type
boolean
Has Getter
true
Has Setter
false
Description
Name
isReplaceable
Type
boolean
Has Getter
true
Has Setter
false
Description
Name
isSolid
Type
boolean
Has Getter
true
Has Setter
false
Description
Name
isSolidBlocking
Type
boolean
Has Getter
true
Has Setter
false
Description
Name
pushReaction
Type
PushReaction
Has Getter
true
Has Setter
false
Description