Importing the class

Link to 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.

ZenScript
Copy
import crafttweaker.api.block.material.MCMaterial;

Name: blocksMovement

Returns if this material is considered solid or not

Return Type: boolean

ZenScript
Copy
// MCMaterial.blocksMovement() as boolean

myMCMaterial.blocksMovement();

Name: getColor

Retrieves the color index of the block. This is is the same color used by vanilla maps to represent this block.

Return Type: MCMaterialColor

ZenScript
Copy
// MCMaterial.getColor() as MCMaterialColor

myMCMaterial.getColor();

Link to getCommandString

Name: getCommandString

Gets the bracket syntax for this Material

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

ZenScript
Copy
// MCMaterial.getCommandString() as string

myMCMaterial.getCommandString();

Name: getPushReaction

Gets this Material's PushReaction.

Returns: The PushReaction of this Material.
Return Type: PushReaction

ZenScript
Copy
// MCMaterial.getPushReaction() as PushReaction

myMCMaterial.getPushReaction();

Name: isFlammable

Returns if the block can burn or not.

Return Type: boolean

ZenScript
Copy
// MCMaterial.isFlammable() as boolean

myMCMaterial.isFlammable();

Name: isLiquid

Returns if blocks of these materials are liquids.

Return Type: boolean

ZenScript
Copy
// MCMaterial.isLiquid() as boolean

myMCMaterial.isLiquid();

Name: isOpaque

Indicate if the material is opaque

Return Type: boolean

ZenScript
Copy
// MCMaterial.isOpaque() as boolean

myMCMaterial.isOpaque();

Name: isReplaceable

Returns whether the material can be replaced by other blocks when placed - eg snow, vines and tall grass.

Return Type: boolean

ZenScript
Copy
// MCMaterial.isReplaceable() as boolean

myMCMaterial.isReplaceable();

Name: isSolid

Returns true if the block is a considered solid. This is true by default.

Return Type: boolean

ZenScript
Copy
// MCMaterial.isSolid() as boolean

myMCMaterial.isSolid();
名称TypeHas GetterHas SetterDescription
名称
blocksMovement
Type
boolean型
Has Getter
true
Has Setter
false
Description
Returns if this material is considered solid or not
名称
color
Type
MCMaterialColor
Has Getter
true
Has Setter
false
Description
Retrieves the color index of the block. This is is the same color used by vanilla maps to represent this block.
名称
commandString
Type
string
Has Getter
true
Has Setter
false
Description
Gets the bracket syntax for this Material
名称
flammable
Type
boolean型
Has Getter
true
Has Setter
false
Description
Returns if the block can burn or not.
名称
liquid
Type
boolean型
Has Getter
true
Has Setter
false
Description
Returns if blocks of these materials are liquids.
名称
opaque
Type
boolean型
Has Getter
true
Has Setter
false
Description
Indicate if the material is opaque
名称
pushReaction
Type
PushReaction
Has Getter
true
Has Setter
false
Description
Gets this Material's PushReaction.
名称
replaceable
Type
boolean型
Has Getter
true
Has Setter
false
Description
Returns whether the material can be replaced by other blocks when placed - eg snow, vines and tall grass.
名称
solid
Type
boolean型
Has Getter
true
Has Setter
false
Description
Returns true if the block is a considered solid. This is true by default.