Interface Tool.Builder
- All Superinterfaces:
- DataComponentBuilder<Tool>
- Enclosing interface:
- Tool
@Experimental
@NonExtendable
public static interface Tool.Builder
extends DataComponentBuilder<Tool>
Builder for 
Tool.- 
Method SummaryModifier and TypeMethodDescriptionAdds a rule to the tool that controls the breaking speed / damage per block if matched.addRules(Collection<Tool.Rule> rules) Adds rules to the tool that control the breaking speed / damage per block if matched.canDestroyBlocksInCreative(boolean canDestroyBlocksInCreative) Controls whether this tool can destroy blocks in creative mode.damagePerBlock(@org.checkerframework.checker.index.qual.NonNegative int damage) Controls the amount of durability to remove each time a block is mined with this tool.defaultMiningSpeed(float miningSpeed) Controls mining speed to use if no rules match and don't override mining speed.Methods inherited from interface io.papermc.paper.datacomponent.DataComponentBuilderbuild
- 
Method Details- 
damagePerBlock@Contract(value="_ -> this", mutates="this") Tool.Builder damagePerBlock(@org.checkerframework.checker.index.qual.NonNegative int damage) Controls the amount of durability to remove each time a block is mined with this tool.- Parameters:
- damage- durability to remove
- Returns:
- the builder for chaining
- See Also:
 
- 
defaultMiningSpeedControls mining speed to use if no rules match and don't override mining speed.- Parameters:
- miningSpeed- mining speed
- Returns:
- the builder for chaining
- See Also:
 
- 
addRuleAdds a rule to the tool that controls the breaking speed / damage per block if matched.- Parameters:
- rule- rule
- Returns:
- the builder for chaining
- See Also:
 
- 
canDestroyBlocksInCreative@Contract(value="_ -> this", mutates="this") Tool.Builder canDestroyBlocksInCreative(boolean canDestroyBlocksInCreative) Controls whether this tool can destroy blocks in creative mode.- Parameters:
- canDestroyBlocksInCreative- whether this tool can destroy blocks in creative mode
- Returns:
- the builder for chaining
- See Also:
 
- 
addRulesAdds rules to the tool that control the breaking speed / damage per block if matched.- Parameters:
- rules- rules
- Returns:
- the builder for chaining
- See Also:
 
 
-