Enchantable

fun Enchantable(enchantmentValue: Int? = null, primaryEnchantments: Provider<Set<Enchantment>>? = null, supportedEnchantments: Provider<Set<Enchantment>>? = null): ItemBehaviorFactory<Enchantable>

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

Parameters

enchantmentValue

The enchantment value of the item. A higher enchantment value brings more secondary and higher-level enchantments in the enchanting table. Vanilla enchantment values: wood: 15, stone: 5, iron: 14, diamond: 10, gold: 22, netherite: 15 Used when enchantment_value is not specified in the item's config, or null to require the presence of a config entry.

primaryEnchantments

The enchantments that appear in the enchanting table. Used when primary_enchantments is not specified in the item's config. Falls back to supportedEnchantments if unspecified.

supportedEnchantments

The enchantments that can be applied to the item, i.e. via an anvil or commands. Used when supported_enchantments is not specified in the item's config, or null to require the presence of a config entry.