Interface GeyserChargeable.Builder

All Superinterfaces:
GenericBuilder<GeyserChargeable>
Enclosing interface:
GeyserChargeable

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

    • maxDrawDuration

      GeyserChargeable.Builder maxDrawDuration(@org.checkerframework.checker.index.qual.NonNegative float maxDrawDuration)
      Sets the maximum draw duration before the item is released.
      Parameters:
      maxDrawDuration - the non-negative maximum charging duration
      Returns:
      this builder
      Since:
      2.9.3
      See Also:
    • chargeOnDraw

      GeyserChargeable.Builder chargeOnDraw(boolean chargeOnDraw)
      Sets whether the item is charged when drawing.
      Parameters:
      chargeOnDraw - whether drawing charges the item
      Returns:
      this builder
      Since:
      2.9.3
      See Also:
    • ammunition

      GeyserChargeable.Builder ammunition(Identifier ammunition)
      Adds an item that can be used as ammunition, such as minecraft:arrow. This will throw when trying to add an item that was already added.
      Parameters:
      ammunition - the Bedrock item identifier of possible ammunition
      Returns:
      this builder
      Since:
      2.9.3
      See Also:
    • build

      Creates the chargeable component.
      Specified by:
      build in interface GenericBuilder<GeyserChargeable>
      Returns:
      the new component
      Since:
      2.9.3