Ayfri
09/15/2024, 1:36 PMenchantment("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 ! ⭐