OpenInv

4M Downloads

Update to 1.20.6

Jikoo opened this issue ยท 10 comments

commented

1.20.6 is largely functional with the exception of inventory saving, which seems to reset for reasons I haven't yet managed to track down.
Paper support requires a slight change to version detection logic that has already been done in development, but with offline saving not working correctly I am not comfortable pushing a release.

commented

For anyone who is running Spigot and wants to update OI in the meantime, builds can be downloaded from runs of the CI action: https://github.com/Jikoo/OpenInv/actions/workflows/ci.yml?query=branch%3Amaster

commented

A status update: I had started working on using ASM to remap all Craftbukkit usages, only to find out that now Paper has unbent a little more on their stance and now remaps plugins. Now all that needs to be done to is load the correct internals for the unversioned package, which I did a couple days ago.

I also noticed that player data is not saving correctly when doing offline edits (I swear I checked that and it was working on Spigot before, but rolling back to the previous Spigot build yields the same problem), so that is the current release blocker.

commented

How ro download

commented

You cannot currently download a fully functional build because of the bug I mentioned in my previous post. You can download one of the buggy builds from the corresponding actions run, the dist artifact.

commented

PaperMC currently automatically remaps spigot-mapped jars to paper-mapped jars before a plugin loads automatically. The only thing that it doesn't work for is reflection. If I'm not mistaken, OpenInv uses modules and not reflection to use NMS internals. Wouldn't it just work on its own?

commented

OI uses reflection to load the correct corresponding classes. 170ebaa will update this to handle Paper's changes.

commented

I see, though I was mainly referring to the part where you mention the need to use ASM to rewrite classes at runtime on Paper on your own.

commented

Ah, sorry for not reading carefully. My bad.

commented

#194 (comment)

Guess I should update OP.

commented

Finally found the problem after going in circles for hours, one little change. PlayerDataStorage#load(Player) now also tries to load the data into the player. The most painful part about it is that's the first place I had looked for changes, and somehow overlooked it.