ToolRule

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.item.component.ToolRule;

Members

Getter
script.zs
// Rule.blocks as List<Block>
myRule.blocks

Return Type: List<Block>

Getter
script.zs
// Rule.correctToolForDrops as bool
myRule.correctToolForDrops

Return Type: bool

static deniesDrops(tag as KnownTag<Block>) as Rule
script.zs
// Rule.deniesDrops(tag as KnownTag<Block>) as ToolRule;
ToolRule.deniesDrops(myKnownTag);

Parameters:

tag Type: KnownTag<Block>

Return Type: ToolRule

Getter
script.zs
// Rule.hasCorrectToolForDrops as bool
myRule.hasCorrectToolForDrops

Return Type: bool

static minesAndDrops(tag as KnownTag<Block>, speed as float) as Rule
script.zs
// Rule.minesAndDrops(tag as KnownTag<Block>, speed as float) as ToolRule;
ToolRule.minesAndDrops(myKnownTag, myFloat);

Parameters:

tag Type: KnownTag<Block>
speed Type: float

Return Type: ToolRule

static minesAndDrops(blocks as List<Block>, speed as float) as Rule
script.zs
// Rule.minesAndDrops(blocks as List<Block>, speed as float) as ToolRule;
ToolRule.minesAndDrops(myList, myFloat);

Parameters:

blocks Type: List<Block>
speed Type: float

Return Type: ToolRule

static overrideSpeed(blocks as List<Block>, speed as float) as Rule
script.zs
// Rule.overrideSpeed(blocks as List<Block>, speed as float) as ToolRule;
ToolRule.overrideSpeed(myList, myFloat);

Parameters:

blocks Type: List<Block>
speed Type: float

Return Type: ToolRule

static overrideSpeed(tag as KnownTag<Block>, speed as float) as Rule
script.zs
// Rule.overrideSpeed(tag as KnownTag<Block>, speed as float) as ToolRule;
ToolRule.overrideSpeed(myKnownTag, myFloat);

Parameters:

tag Type: KnownTag<Block>
speed Type: float

Return Type: ToolRule

Getter
script.zs
// Rule.speed as Float
myRule.speed

Return Type: Float