GravityChanger icon indicating copy to clipboard operation
GravityChanger copied to clipboard

Incompatability with Charm on 1.19.2

Open Talia-12 opened this issue 1 year ago • 1 comments

There's a mixin incompatability with Charm resulting from both GravityChanger and Charm having mixins targeting the Level.addParticle method in LivingEntity.tickEffects. Charm mixins to redirect the method to one of its own, meaning the method signature of the method that replaced addParticle is now (Level, ParticleStatus, double, double, double, double, double, double). Your mixin then tries to alter the arguments about to be passed into this, attempts to read the 1st argument as a double since that's what it would have been before Charm's mixin, and crashes hard.

I don't really know what a great fix for this would be, other than maybe something like get the 0th thing from the Args, if its a Level access the doubles at 2, 3, and 4 instead.

Relevant Code: https://github.com/Gaider10/GravityChanger/blob/master/src/main/java/me/andrew/gravitychanger/mixin/LivingEntityMixin.java#LL457C38-L457C38 https://github.com/svenhjol/Charm/blob/ class_1309.txt 1.19.x/src/main/java/svenhjol/charm/mixin/gentle_potion_particles/RenderTranslucentParticleMixin.java

The class file that resulted from applying both mixins (plus a bunch of others from other mods, but those are the only two that area): class_1309.txt

Talia-12 avatar May 19 '23 13:05 Talia-12

here's a pastebin for that last class file, decompiled with intellij: https://pastebin.com/nCLXhgZS

Talia-12 avatar May 19 '23 13:05 Talia-12