Package org.spongepowered.api.data.type
Interface ToolRule
public interface ToolRule
A tool rule that applied via
Keys.TOOL_RULES
to an ItemStack
determines what block types
can be mined at what speed and whether they drop items.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionblocks()
Returns theblock types
this rule applies to.static ToolRule
deniesDrops
(List<BlockType> blocks) static ToolRule
deniesDrops
(Tag<BlockType> blockTypeTag) drops()
Returns the drops override.static ToolRule
static ToolRule
static ToolRule
minesAndDrops
(List<BlockType> blocks, double speed) static ToolRule
minesAndDrops
(Tag<BlockType> blockTypeTag, double speed) static ToolRule
overrideSpeed
(List<BlockType> blocks, double speed) static ToolRule
overrideSpeed
(Tag<BlockType> blockTypeTag, double speed) speed()
Returns the speed override.
-
Method Details
-
minesAndDrops
-
minesAndDrops
-
deniesDrops
-
deniesDrops
-
overrideSpeed
-
overrideSpeed
-
forBlocks
-
forTag
-
blocks
Returns theblock types
this rule applies to.- Returns:
- the affected blocks
-
speed
Returns the speed override.If present overrides the default
mining speed
.- Returns:
- the speed override
-
drops
Returns the drops override.If present determines whether a block mined with this rule drops its item
- Returns:
- the drops override
-