This may seem like a silly PR, but this provides more binary compatibility with vanilla and any mods that modify enchantment properties via ASM or Mixins. I work on a mod called JustEnoughIDs that extends the ID limits of Minecraft and recently (past few days), I released a new update that expanded potion IDs and enchantment IDs to Integer.MAX_VALUE - 1 and just happened to notice that you use some methods that still use the vanilla format and would cause issues if JEID and SimplyJetpacks 2 were put together with enchantment IDs going above the current ID limit. So I took the liberty of deciphering the two methods you currently use and adapted them to use the Vanilla methods more so and improve compatibility with other mods that could possibly do the same as what JEID does.
If you would like something changed or want to nitpick something about what I have changed here, let me know. Otherwise, my changes work exactly the same as it did before and I will leave pictures below to prove that.
P.S. Sorry for not using Imgur or the such, I figured it would be easier to see the results here rather than going to a different site for the same thing.
This may seem like a silly PR, but this provides more binary compatibility with vanilla and any mods that modify enchantment properties via ASM or Mixins. I work on a mod called JustEnoughIDs that extends the ID limits of Minecraft and recently (past few days), I released a new update that expanded potion IDs and enchantment IDs to
Integer.MAX_VALUE - 1
and just happened to notice that you use some methods that still use the vanilla format and would cause issues if JEID and SimplyJetpacks 2 were put together with enchantment IDs going above the current ID limit. So I took the liberty of deciphering the two methods you currently use and adapted them to use the Vanilla methods more so and improve compatibility with other mods that could possibly do the same as what JEID does.If you would like something changed or want to nitpick something about what I have changed here, let me know. Otherwise, my changes work exactly the same as it did before and I will leave pictures below to prove that.
P.S. Sorry for not using Imgur or the such, I figured it would be easier to see the results here rather than going to a different site for the same thing.