addEnchantment
fun addEnchantment(id: ResourceLocation, enchantment: Enchantment.EnchantmentDefinition): ResourceKey<Enchantment>
Add an enchantment given its Enchantment.EnchantmentDefinition.
Return
a ResourceKey pointing to the created enchantment
Parameters
id
the enchantment identifier
enchantment
the enchantment definition
fun addEnchantment(id: ResourceLocation, enchantment: Enchantment.Builder): ResourceKey<Enchantment>
Add an enchantment given an Enchantment.Builder.
Return
a ResourceKey pointing to the created enchantment
Parameters
id
the enchantment identifier
enchantment
the enchantment builder
Add an enchantment.
Return
a ResourceKey pointing to the created enchantment
Parameters
id
the enchantment identifier
enchantment
the enchantment