Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #priority 1000
- import crafttweaker.enchantments.IEnchantmentDefinition;
- import crafttweaker.enchantments.IEnchantment;
- function getUnbreakingLevel (enchantments as IEnchantment []) as int
- {
- val unbreaking as IEnchantmentDefinition [] = [<enchantment:minecraft:unbreaking>] as IEnchantmentDefinition [];
- for enchant in enchantments
- {
- if (unbreaking has enchant.definition) { return enchant.level; }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment