TopchetoEU / animated-chunks

Fabric mod for adding smooth chunk loading animations.
MIT License
14 stars 2 forks source link

Sodium compatibility issue #4

Open Fefedu973 opened 1 year ago

RaptaG commented 1 year ago

1.18.2 and Fabric yes, for Sodium you should try and see.

Fefedu973 commented 1 year ago

Crash with sodium Description: Initializing game

java.lang.RuntimeException: Mixin transformation of net.minecraft.class_761 failed
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:418)
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:322)
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
    at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    at net.minecraft.class_310.<init>(class_310.java:573)
    at net.minecraft.client.main.Main.main(Main.java:197)
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:460)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392)
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
    at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:413)
    ... 9 more
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [smooth-chunks.mixins.json:WorldRendererMixin from mod smooth-chunks] from phase [DEFAULT] in config [smooth-chunks.mixins.json] FAILED during APPLY
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:638)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:589)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:379)
    ... 12 more
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @At("INVOKE") on net/minecraft/class_761::renderChunkBefore with priority 1000 cannot inject into net/minecraft/class_761::method_3251(Lnet/minecraft/class_1921;Lnet/minecraft/class_4587;DDDLnet/minecraft/class_1159;)V merged by me.jellysquid.mods.sodium.mixin.features.chunk_rendering.MixinWorldRenderer with priority 1000 [PREINJECT Applicator Phase -> smooth-chunks.mixins.json:WorldRendererMixin from mod smooth-chunks -> Prepare Injections ->  -> handler$dkg000$renderChunkBefore(Lnet/minecraft/class_1921;Lnet/minecraft/class_4587;DDDLnet/minecraft/class_1159;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;ZLit/unimi/dsi/fastutil/objects/ObjectListIterator;Lnet/minecraft/class_293;Lnet/minecraft/class_5944;Lnet/minecraft/class_284;ZLnet/minecraft/class_761$class_762;Lnet/minecraft/class_846$class_851;)V -> Prepare]
    at org.spongepowered.asm.mixin.injection.code.Injector.findTargetNodes(Injector.java:305)
    at org.spongepowered.asm.mixin.injection.code.Injector.find(Injector.java:240)
    at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.prepare(InjectionInfo.java:421)
    at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1338)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1043)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:393)
    at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325)
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421)
    at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403)
    at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
    ... 12 more
RaptaG commented 1 year ago

Maybe rename this issue to: Sodium compatibility

Fefedu973 commented 1 year ago

Maybe rename this issue to: Sodium compatibility

I tested with my modpack (+200 mods) so I will retest with sodium and phosphorus only to be sure because it could be due to another mod

RaptaG commented 1 year ago

Try with Sodium and Smooth Chunks only then

Fefedu973 commented 1 year ago

Yes same issue not compatible

PLS add iris (sodium) compatiblity sodium is the new optifine even more with fabric. this is really crucial and it would be awesome thanks

RaptaG commented 1 year ago

Sodium is not the new OptiFine, it lacks cosmetic features, but https://github.com/Fabulously-Optimized/fabulously-optimized is. (which includes it)

TopchetoEU commented 1 year ago

this is a planned feature, still i want to bring the mod to a more complete state before taking a look at sodium/iris support.

Fefedu973 commented 1 year ago

this is a planned feature, still i want to bring the mod to a more complete state before taking a look at sodium/iris support.

thank you very much I really hope that this compatibility will come one day

Fefedu973 commented 1 year ago

this is a planned feature, still i want to bring the mod to a more complete state before taking a look at sodium/iris support.

thank you very much I really hope that this compatibility will come one day

mads985 commented 1 year ago

Been waiting over a year now, jaw dropped when I saw this on Modrinth, really hope the Sodium compat can be worked out! This mod is great. - But I haven't been able to use it/alternatives since 1.13.2 D:

TopchetoEU commented 1 year ago

im going to try to work out sodium compatibility some time this week

ghost commented 1 year ago

Hello, I'm really happy to see this mod for newer versions. THANK YOU! Looking forward to the Sodium compatibility 🥰

PinkGoosik commented 1 year ago

sodium compat will be a banger

EysseW commented 1 year ago

Dang I like to see this thread.

TopchetoEU commented 1 year ago

im sorry, but life's being going on and i barely have free time. for now, i won't be able to work on this

ghost commented 1 year ago

Take your time @TopchetoEU, the origin mod was last updated for 1.16 - we can wait 😊

EysseW commented 1 year ago

Is it very complicated? I am starting mod minecraft. Could I help with some easier parts?

EysseW commented 1 year ago

I do have to add, though, there is no pressure at all. We can absolutely wait. I'd just like to offer my help.

TopchetoEU commented 1 year ago

I do have to add, though, there is no pressure at all. We can absolutely wait. I'd just like to offer my help.

If you'd like, try to adapt it to Sodium, just don't do anything stupid with the code. Also TBH, this is complicated, so if you're just starting out, I wouldn't make you go trough this

RaptaG commented 1 year ago

Any progress with this so far?

EysseW commented 1 year ago

Okay, I'm not going to try then. I'll only confused myself.

RaptaG commented 1 year ago

It's been a while.. Any progress?

EysseW commented 1 year ago

Greetings! It's been a while. How are you doing in this? Any progress?

ghost commented 1 year ago

Hello @TopchetoEU, could a little donation for your awesome work, speed up the progress may? 😝 Greetings.

TopchetoEU commented 1 year ago

@mrniddala I don't really want donations, I just really don't know how to approach the problem. What I really need is someone who has experience with development for Sodium

TopchetoEU commented 1 year ago

hey everybody! sorry for keeping you waiting, but as of today, i've started the sodium compatibility development. it should be done by the end of the day, or tomorrow, idk.

EysseW commented 1 year ago

No worries! Good luck and have fun coding!

TopchetoEU commented 1 year ago

i'm trying to fix sodium support, but it seems as if sodium is at best incompatible with this mod. still, i'm going to try my best to port the functionality to sodium. thanks for waiting!

TopchetoEU commented 1 year ago

Sodium compatibility is impossible, because sodium seems to render whole regions at the same time (why does it do that is beyond me), and since chunk animations have to occur before each chunk animation call, sodium compatibility is impossible (almost). i could rewrite how sodium builds its chunks, but 1. this wouldn't be sodium compatibility, but sodium integration, 2. it would be unnecessarily hard for diminishing returns and 3. i could make sodium slower. so, sodium support is not planned. i'm aware that no sodium support is pretty much a deal-breaker for some of you (me included), but i can't do anything about it.

still, if you'd like to try to implement it yourself, go ahead, be my guest, make a PR.

thanks for supporting this mod!

PinkGoosik commented 1 year ago

Sodium users might look into chunks fade in as an alternative

TopchetoEU commented 1 year ago

seems like a good alternative. for now, i'll just keep updating the mod. if i figure out a way to do chunk animations i'll be sure to update the mod

i'm sorry to let you down

TopchetoEU commented 1 year ago

i will have one more shot at this issue, i'll keep you posted on the progress

EysseW commented 1 year ago

I understand the difficulty. Thanks for the great mod, anyway!

TopchetoEU commented 1 year ago

so far, I've made almost no progress, since i'm currently making multiple projects with far higher priority than this. i hope that i can get back to this project, and get it to support sodium and iris, however, the developers of sodium have made sure that my life is as hard as possible

TopchetoEU commented 1 year ago

if anyone wants to give this a shot, i will leave a hint that using shaders is (i think) the way to go.

Fefedu973 commented 1 year ago

Check this mod that is the fork of the same mod as yours and have sodium support if you need help https://github.com/kerudion/chunksfadein