Class ArmorPieceType.Builder

java.lang.Object
net.xun.armory.api.item.armor.ArmorPieceType.Builder
Enclosing class:
ArmorPieceType

public static final class ArmorPieceType.Builder extends Object
  • Method Details

    • vanillaType

      public ArmorPieceType.Builder vanillaType(net.minecraft.world.item.ArmorItem.Type type)
      Sets the vanilla armor type for this piece.
      Parameters:
      type - the ArmorItem.Type (must not be null)
      Returns:
      this builder
      Throws:
      NullPointerException - if type is null
    • customizer

      public ArmorPieceType.Builder customizer(ArmorCustomizer customizer)
      Sets a customizer override for this specific piece.

      If set, this customizer will be used instead of the set-level customizer when creating this piece.

      Parameters:
      customizer - the customizer (may be null to use the set-level one)
      Returns:
      this builder
    • propertiesModifier

      public ArmorPieceType.Builder propertiesModifier(UnaryOperator<net.minecraft.world.item.Item.Properties> propertiesModifier)
      Sets a per‑piece modifier for item properties.
      Parameters:
      propertiesModifier - the modifier (must not be null)
      Returns:
      this builder
      Throws:
      NullPointerException - if propertiesModifier is null
    • additionalAttributes

      public ArmorPieceType.Builder additionalAttributes(Consumer<net.minecraft.world.item.component.ItemAttributeModifiers.Builder> additionalAttributes)
      Sets a per‑piece consumer for additional attribute modifiers.
      Parameters:
      additionalAttributes - the consumer (must not be null)
      Returns:
      this builder
      Throws:
      NullPointerException - if additionalAttributes is null
    • build

      public ArmorPieceType build()
      Builds and returns the ArmorPieceType instance.
      Returns:
      the configured piece type
      Throws:
      IllegalStateException - if the vanilla type has not been set (it is required)