Hello everyone, <#C066G9BF66A|> is finally availab...
# feed
a
Hello everyone, #C066G9BF66A is finally available for Minecraft 1.21.1 ! ⛏️ You can now create complete Minecraft Datapacks with custom enchantments using only Kotlin 🔥 Exemple:
Copy code
enchantment("more_xp") {
    description = textComponent("More Experience") // Name of enchantment in game
    maxLevel = 3
    supportedItems(Tags.Enchentable.WEAPON)
    weight = 3 // The probability of the enchant to be displayed in enchantment table

    minCost(15, 5) // Minimum cost of the enchantment of level 1, with 5 more levels required to have the next level available
    maxCost(20, 5) // Maximum cost of the enchantment of last level
    anvilCost = 2 // The cost to add the enchantment to an item by combining with another item having the enchant in an anvil
    slots(EquipmentSlot.MAINHAND)

    effects {
        mobExperience {
            add(2) // Add 2 xp points per level when killing a mob
        }
    }
}
Do not forget to star the GitHub repo !
gratitude thank you 3
⛏️ 4
👍 6