Fabric API

Fabric API

152M Downloads

EnchantmentEvents.MODIFY does not synchronize changes with the client unlike in vanilla

maityyy opened this issue ยท 8 comments

commented

Even though the effects list seems to be entirely server-side (only uses ServerWorld), it still synchronizes with the client if you overwrite it via data pack. EnchantmentEvents.MODIFY on the other hand desynchronizes this list, potentially causing problems.

This problem is similar to #3897 and its fix is exactly the same: cc02f1c

commented

Could I fix this? thanks!

commented

For this I think we need to track if any of the methods in Enchantment.Builder were called so we dont end up resetting the known pack info if nothing changed.

commented

I have a a PR up to fix this, have you got a mod I can test with?

commented

No, but I do the same thing in my closed mod and it worked

commented

Ok not a problem, I will get a basic test mod for it. I was just being lazy hoping you had something. ๐Ÿ˜‚ I'm 90% confident in it, but I should test it.

commented

Maybe the test is unnecessary, you can just test with IDEA breakpoints, that's what I did :p :p :p

commented

Maybe the test is unnecessary

Is there such a test for the Biome Modification API?

commented

There is a test that covers this code path, but I need one where I can get a vanilla client to join. Its easy enough to do.