Interface Equippable.Builder

All Superinterfaces:
DataComponentBuilder<Equippable>
Enclosing interface:
Equippable

@Experimental @NonExtendable public static interface Equippable.Builder extends DataComponentBuilder<Equippable>
Builder for Equippable.
  • Method Details

    • equipSound

      @Contract(value="_ -> this", mutates="this") Equippable.Builder equipSound(Key sound)
      Sets the equip sound key for this item.
      Parameters:
      sound - the equip sound key
      Returns:
      the builder for chaining
    • assetId

      @Contract(value="_ -> this", mutates="this") Equippable.Builder assetId(@Nullable Key assetId)
      Sets the asset id for this item.
      Parameters:
      assetId - the asset id, nullable
      Returns:
      the builder for chaining
    • cameraOverlay

      @Contract(value="_ -> this", mutates="this") Equippable.Builder cameraOverlay(@Nullable Key cameraOverlay)
      Sets the camera overlay key for this item.
      Parameters:
      cameraOverlay - the camera overlay key, nullable
      Returns:
      the builder for chaining
    • allowedEntities

      @Contract(value="_ -> this", mutates="this") Equippable.Builder allowedEntities(@Nullable RegistryKeySet<EntityType> allowedEntities)
      Sets the allowed entities that can equip this item.
      Parameters:
      allowedEntities - the set of allowed entity types, or null if any
      Returns:
      the builder for chaining
    • dispensable

      @Contract(value="_ -> this", mutates="this") Equippable.Builder dispensable(boolean dispensable)
      Sets whether the item is dispensable.
      Parameters:
      dispensable - true if dispensable
      Returns:
      the builder for chaining
    • swappable

      @Contract(value="_ -> this", mutates="this") Equippable.Builder swappable(boolean swappable)
      Sets whether the item is swappable.
      Parameters:
      swappable - true if swappable
      Returns:
      the builder for chaining
    • damageOnHurt

      @Contract(value="_ -> this", mutates="this") Equippable.Builder damageOnHurt(boolean damageOnHurt)
      Sets whether the item takes damage when the wearer is hurt.
      Parameters:
      damageOnHurt - true if it damages on hurt
      Returns:
      the builder for chaining