Damageable

fun Damageable(maxDurability: Int? = null, itemDamageOnAttackEntity: Int = 0, itemDamageOnBreakBlock: Int = 0, repairIngredient: RecipeChoice? = null): ItemBehaviorFactory<Damageable>

Creates a factory for Damageable behaviors using the given values, if not specified otherwise in the item's config.

Parameters

maxDurability

The maximum durability of the item. Used when max_durability is not specified in the item's config, or null to require the presence of a config entry.

itemDamageOnAttackEntity

The amount of damage the item receives when attacking an entity. Used when item_damage_on_attack_entity is not specified in the item's config.

itemDamageOnBreakBlock

The amount of damage the item receives when breaking a block. Used when item_damage_on_break_block is not specified in the item's config.

repairIngredient

The ingredient required to repair the item. Can be null for items that cannot be repaired. Used when repair_ingredient is not specified in the item's config.