Interface Equippable.Builder
- All Superinterfaces:
DataComponentBuilder<Equippable>
- Enclosing interface:
Equippable
@Experimental
@NonExtendable
public static interface Equippable.Builder
extends DataComponentBuilder<Equippable>
Builder for
Equippable
.-
Method Summary
Modifier and TypeMethodDescriptionallowedEntities
(@Nullable RegistryKeySet<EntityType> allowedEntities) Sets the allowed entities that can equip this item.Sets the asset id for this item.cameraOverlay
(@Nullable Key cameraOverlay) Sets the camera overlay key for this item.damageOnHurt
(boolean damageOnHurt) Sets whether the item takes damage when the wearer is hurt.dispensable
(boolean dispensable) Sets whether the item is dispensable.equipSound
(Key sound) Sets the equip sound key for this item.swappable
(boolean swappable) Sets whether the item is swappable.Methods inherited from interface io.papermc.paper.datacomponent.DataComponentBuilder
build
-
Method Details
-
equipSound
Sets the equip sound key for this item.- Parameters:
sound
- the equip sound key- Returns:
- the builder for chaining
-
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
Sets whether the item is dispensable.- Parameters:
dispensable
- true if dispensable- Returns:
- the builder for chaining
-
swappable
Sets whether the item is swappable.- Parameters:
swappable
- true if swappable- Returns:
- the builder for chaining
-
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
-