Interface JavaTool.Builder

All Superinterfaces:
GenericBuilder<JavaTool>
Enclosing interface:
JavaTool

public static interface JavaTool.Builder extends GenericBuilder<JavaTool>
Builder for the tool component.
Since:
2.9.3
  • Method Details

    • rule

      JavaTool.Builder rule(@NonNull JavaTool.Rule 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

      JavaTool.Builder canDestroyBlocksInCreative(boolean 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:
      build in interface GenericBuilder<JavaTool>
      Returns:
      the new component
      Since:
      2.9.3