Slimefun-Addon-Community / LiteXpansion

GNU General Public License v3.0
11 stars 26 forks source link

1.20.4 Functionality #91

Closed petulikan1 closed 1 month ago

petulikan1 commented 7 months ago

Short Description

I've updated the plugin to work with 1.20.4 and ensured that custom glow enchantment remains working on the latest version.

Additions/Changes/Removals

Due to hard spigot Enchantment class changes, I've had to use NMS (net.minecraft.server) to make the glowing enchant work properly. As of that, I had to separate the Core part of the plugin and the NMS part in the projetct so the dependencies wouldn't mix alltogether and possibly even prevent compilation.

Related Issues

Resolves #90

Checklist

petulikan1 commented 7 months ago

I'd like to also mention that merging this will result breaking the auto-artifact-building system as the Spigot's NMS aren't available online anywhere and can only be built locally.

I've also tried to remove all the NMS parts and change them into reflections, but because we're overriding methods from a class unobtainable during compilation that's sadly not possible without much complex reflection logic and dynamic class creation which would make it more unreadable and hard to read.

//EDIT

I tried making it with Javassist but without a chance... https://pastebin.com/WwPrMsjG