Tomson124 / SimplyJetpacks-2

Redstone Flux jetpacks, Fluxpacks and more
http://www.tomson124.de/
MIT License
14 stars 10 forks source link

Make enchantment methods more compatible with other mods #125

Closed ZombieHDGaming closed 6 years ago

ZombieHDGaming commented 6 years ago

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.

2018-10-09_16 26 40 2018-10-09_16 26 51 2018-10-09_16 27 01 2018-10-09_16 27 12 2018-10-09_16 27 22

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.