Equippable

fun Equippable(equipment: Equipment, slot: EquipmentSlot, armor: Double = 0.0, armorToughness: Double = 0.0, knockbackResistance: Double = 0.0, equipSound: Key, allowedEntities: Set<EntityType>? = null, dispensable: Boolean = true, swappable: Boolean = true, damageOnHurt: Boolean = true): ItemBehaviorFactory<Equippable>
fun Equippable(equipment: Equipment?, slot: EquipmentSlot, armor: Double = 0.0, armorToughness: Double = 0.0, knockbackResistance: Double = 0.0, equipSound: Holder<SoundEvent> = SoundEvents.ARMOR_EQUIP_GENERIC, allowedEntities: Set<EntityType>? = null, dispensable: Boolean = true, swappable: Boolean = true, damageOnHurt: Boolean = true): ItemBehaviorFactory<Equippable>

Creates a factory for Equippable behaviors using the given values, if not specified in the item's configuration.

Parameters

equipment

The equipment texture to use, or null for no texture.

slot

The slot in which the item can be worn.

armor

The amount of armor this item provides. Used when armor is not specified in the config.

armorToughness

The amount of armor toughness this item provides. Used when armor_toughness is not specified in the config.

knockbackResistance

The amount of knockback resistance this item provides. Used when knockback_resistance is not specified in the config.

equipSound

The sound that is played when the item is equipped. Used when equip_sound is not specified in the config.

allowedEntities

The entity types that are allowed to wear this item, or null for all entities. Used when allowed_entities is not specified in the config.

dispensable

Whether this item can be dispensed from a dispenser. Used when dispensable is not specified in the config.

swappable

Whether this item can be swapped with other items in the same slot. Used when swappable is not specified in the config.

damageOnHurt

Whether this item will be damaged when the wearing entity is damaged. Used when damage_on_hurt is not specified in the config.