Package net.xun.armory.api.item.armor
Class ArmorPieceType.Builder
java.lang.Object
net.xun.armory.api.item.armor.ArmorPieceType.Builder
- Enclosing class:
ArmorPieceType
-
Method Summary
Modifier and TypeMethodDescriptionadditionalAttributes(Consumer<net.minecraft.world.item.component.ItemAttributeModifiers.Builder> additionalAttributes) Sets a per‑piece consumer for additional attribute modifiers.build()Builds and returns theArmorPieceTypeinstance.customizer(ArmorCustomizer customizer) Sets a customizer override for this specific piece.propertiesModifier(UnaryOperator<net.minecraft.world.item.Item.Properties> propertiesModifier) Sets a per‑piece modifier for item properties.vanillaType(net.minecraft.world.item.ArmorItem.Type type) Sets the vanilla armor type for this piece.
-
Method Details
-
vanillaType
Sets the vanilla armor type for this piece.- Parameters:
type- theArmorItem.Type(must not benull)- Returns:
- this builder
- Throws:
NullPointerException- iftypeisnull
-
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 benullto 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 benull)- Returns:
- this builder
- Throws:
NullPointerException- ifpropertiesModifierisnull
-
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 benull)- Returns:
- this builder
- Throws:
NullPointerException- ifadditionalAttributesisnull
-
build
Builds and returns theArmorPieceTypeinstance.- Returns:
- the configured piece type
- Throws:
IllegalStateException- if the vanilla type has not been set (it is required)
-