supersaiyansubtlety

player_interact_statics.zs

Feb 13th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #priority 1000
  2.  
  3. import crafttweaker.enchantments.IEnchantmentDefinition;
  4. import crafttweaker.enchantments.IEnchantment;
  5.  
  6. function getUnbreakingLevel (enchantments as IEnchantment []) as int
  7. {
  8. val unbreaking as IEnchantmentDefinition [] = [<enchantment:minecraft:unbreaking>] as IEnchantmentDefinition [];
  9. for enchant in enchantments
  10. {
  11. if (unbreaking has enchant.definition) { return enchant.level; }
  12. }
  13. return 0;
  14. }
Add Comment
Please, Sign In to add comment