Interface JavaTool.Builder
- All Superinterfaces:
GenericBuilder<JavaTool>
- Enclosing interface:
- JavaTool
Builder for the tool component.
- Since:
- 2.9.3
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates the tool component.canDestroyBlocksInCreative(boolean canDestroyBlocksInCreative) Sets whether this item can destroy blocks when trying to break them in creative mode.defaultMiningSpeed(@org.checkerframework.checker.index.qual.Positive float defaultMiningSpeed) Sets the default mining speed of this tool.rule(@NonNull JavaTool.Rule rule) Adds a rule to the tool.
-
Method Details
-
rule
Adds a rule to the tool. Vanilla-item overrides don't need any rules to be set.- Parameters:
rule- the rule to add- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
defaultMiningSpeed
JavaTool.Builder defaultMiningSpeed(@org.checkerframework.checker.index.qual.Positive float defaultMiningSpeed) Sets the default mining speed of this tool. Vanilla-item overrides don't need a speed set.- Parameters:
defaultMiningSpeed- the default mining speed of this tool- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
canDestroyBlocksInCreative
Sets whether this item can destroy blocks when trying to break them in creative mode.- Parameters:
canDestroyBlocksInCreative- determines if the item will break blocks in creative mode- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
build
JavaTool build()Creates the tool component.- Specified by:
buildin interfaceGenericBuilder<JavaTool>- Returns:
- the new component
- Since:
- 2.9.3
-