Chocohead / OptiFabric

OptiFabric venturing out into the 1.16+ world
https://www.curseforge.com/minecraft/mc-mods/optifabric
Mozilla Public License 2.0
378 stars 105 forks source link

[MIXIN ISSUE?] Replay Mod + Optifabric 1.20.1 crashing #1112

Open MegaMinerDL opened 1 year ago

MegaMinerDL commented 1 year ago

Crash does NOT occur when either OptiFabric or Replay Mod is taken out

OptiFine_1.20.1_HD_U_I5 replaymod-1.20.1-2.6.13 optifabric-1.13.25 fabric-loader-0.14.21-1.20.1 Windows 10

MIRRORED ISSUES: https://github.com/Chocohead/OptiFabric/issues/1113 https://github.com/Chocohead/OptiFabric/issues/1125 https://github.com/Chocohead/OptiFabric/issues/1145

Goddessa39 commented 1 year ago

Optifabric 1.13.25: Crashes when Puzzles Lib/trading Post are in mods folder. Tried to load it up again and it just freezes on loading screen. Not crashes, freezes.

TheUnknownCod3r commented 1 year ago

Its a Mixin issue, ReplayMod has needed support added to Optifabric for a while now. Its just a case of someone adding support.

MegaMinerDL commented 1 year ago

Its a Mixin issue, ReplayMod has needed support added to Optifabric for a while now. Its just a case of someone adding support.

It worked just fine on Fabric 1.19 (Replay mod + Optifine + Optifabric)

TheUnknownCod3r commented 1 year ago

Its a Mixin issue, ReplayMod has needed support added to Optifabric for a while now. Its just a case of someone adding support.

It worked just fine on Fabric 1.19 (Replay mod + Optifine + Optifabric)

It worked fine on 1.19 because support was updated with the changes made by Minecraft / ReplayMod. theres changes in between versions that broke those support changes, which need updated. Its a common problem with Optifine, which is the main issue here.

MegaMinerDL commented 1 year ago

Its a Mixin issue, ReplayMod has needed support added to Optifabric for a while now. Its just a case of someone adding support.

It worked just fine on Fabric 1.19 (Replay mod + Optifine + Optifabric)

It worked fine on 1.19 because support was updated with the changes made by Minecraft / ReplayMod. theres changes in between versions that broke those support changes, which need updated. Its a common problem with Optifine, which is the main issue here.

So which mod is causing the current compatibility issue?

TheUnknownCod3r commented 1 year ago

Its a Mixin issue, ReplayMod has needed support added to Optifabric for a while now. Its just a case of someone adding support.

It worked just fine on Fabric 1.19 (Replay mod + Optifine + Optifabric)

It worked fine on 1.19 because support was updated with the changes made by Minecraft / ReplayMod. theres changes in between versions that broke those support changes, which need updated. Its a common problem with Optifine, which is the main issue here.

So which mod is causing the current compatibility issue?

Optifabric, I think. Im not really familiar with the replayMod codebase, but I don't see what changed in the file in question for 1.20, tbh.

This is the file thats causing the issue, if someone wants to look at it. https://github.com/ReplayMod/jGui/blob/master/src/main/java/de/johni0702/minecraft/gui/versions/mixin/MixinKeyboardListener.java

bluedragon-cairo commented 1 year ago

I just tried to remove that problematic class and changed the mixin JSON file, and ReplayMod & OptiFine 1.20.1 works without big issues

unzip ReplayMod JAR with 7-Zip, go to com/replaymod/lib/de/john0702/minecraft/gui/versions/mixin and delete MixinKeyboardListener.class, go to the root, edit mixins.jgui.json and remove line 18 ("MixinKeyboardListener",). Re-zip the unzipped replaymod jar file using 7-Zip (as zip, compression level to STORE, change the extension to JAR). Now open optifabric with 7-Zip and edit optifabric.compat.replaymod.newer-mixins.json and delete line 6 and put the modified json file to the JAR file again.

(EDIT - attaching the modified JARs) the source code is unchanged exact same so refer to the originak github repositories (notice GPL 3.0). I am using Fabric 0.14.21 & Fabric API 0.83.0 (or maybe 0.85 i don't remember)

[mods.zip]

MegaMinerDL commented 1 year ago

Interesting, I did these steps exactly and Minecraft turned on (so there's compatibility), however Replay Mod shows no trace of it's existence in the game. I hope official updates solve this - what does MixinKeyboardListener do here?

bluedragon-cairo commented 1 year ago

what. For me, replaymod menu showed up too with optifine, will send you the modified jar files, the source code is unchanged exact same so refer to the originak github repositories (notice GPL 3.0). I am using Fabric 0.14.21 & Fabric API 0.83.0 (or maybe 0.85 i don't remember)

[mods.zip]

bluedragon-cairo commented 1 year ago

KakaoTalk_20230727_195017538 KakaoTalk_20230727_195023004

TheUnknownCod3r commented 1 year ago

Interesting, I did these steps exactly and Minecraft turned on (so there's compatibility), however Replay Mod shows no trace of it's existence in the game. I hope official updates solve this - what does MixinKeyboardListener do here?

From the code I’d assume it logs the keybinds for triggering record, stop etc, but I’m not sure. Removing it should most likely stop it from working altogether

bluedragon-cairo commented 1 year ago

Play/Pause keybind worked (didn't test other keybinds) and watching the replay with moving/spectating worked also fine, not sure what that does tho

TheUnknownCod3r commented 1 year ago

Play/Pause keybind worked (didn't test other keybinds) and watching the replay with moving/spectating worked also fine, not sure what that does tho

Huh. Then honestly, I’m not sure. JGui is apparently some sort of gui lib, idk.

MegaMinerDL commented 1 year ago

Well, your files worked, maybe I zipped wrong? Anyway thank you this will do, I tested and all keybinds/settings/recording work

TheUnknownCod3r commented 1 year ago

Well, your files worked, maybe I zipped wrong? Anyway thank you this will do, I tested and all keybinds/settings/recording work

If it’s working fine, maybe something to ask the dev of replayMod, as it might be possible to just remove it anyway, and fix the incompatibility all in one. I’ve checked back seems the fix is the same inject point across all versions.

MegaMinerDL commented 1 year ago

Opened mirror issue on ReplayMod https://github.com/ReplayMod/ReplayMod/issues/883

NotCremon commented 1 year ago

Interesting, I did these steps exactly and Minecraft turned on (so there's compatibility), however Replay Mod shows no trace of it's existence in the game. I hope official updates solve this - what does MixinKeyboardListener do here?

That's weird because when I did it, it just crashed as usual with the "error code 1" again.

MegaMinerDL commented 1 year ago

Interesting, I did these steps exactly and Minecraft turned on (so there's compatibility), however Replay Mod shows no trace of it's existence in the game. I hope official updates solve this - what does MixinKeyboardListener do here?

That's weird because when I did it, it just crashed as usual with the "error code 1" again.

Yeah idk, use the files bluedragon sent

TraderTheWolf commented 1 year ago

what. For me, replaymod menu showed up too with optifine, will send you the modified jar files, the source code is unchanged exact same so refer to the originak github repositories (notice GPL 3.0). I am using Fabric 0.14.21 & Fabric API 0.83.0 (or maybe 0.85 i don't remember)

[mods.zip]

what. For me, replaymod menu showed up too with optifine, will send you the modified jar files, the source code is unchanged exact same so refer to the originak github repositories (notice GPL 3.0). I am using Fabric 0.14.21 & Fabric API 0.83.0 (or maybe 0.85 i don't remember)

[mods.zip]

YO CHECK my issue in my dashboard i need ur help @bluedragon-cairo

Hatbuilder commented 8 months ago

I just tried to remove that problematic class and changed the mixin JSON file, and ReplayMod & OptiFine 1.20.1 works without big issues

unzip ReplayMod JAR with 7-Zip, go to com/replaymod/lib/de/john0702/minecraft/gui/versions/mixin and delete MixinKeyboardListener.class, go to the root, edit mixins.jgui.json and remove line 18 ("MixinKeyboardListener",). Re-zip the unzipped replaymod jar file using 7-Zip (as zip, compression level to STORE, change the extension to JAR). Now open optifabric with 7-Zip and edit optifabric.compat.replaymod.newer-mixins.json and delete line 6 and put the modified json file to the JAR file again.

(EDIT - attaching the modified JARs) the source code is unchanged exact same so refer to the originak github repositories (notice GPL 3.0). I am using Fabric 0.14.21 & Fabric API 0.83.0 (or maybe 0.85 i don't remember)

[mods.zip]

Thank you!! It finally worked!!

bluedragon-cairo commented 8 months ago

No problem

KJU51003042 commented 4 months ago

@bluedragon-cairo Hey! Please for version 1.20.4+ and fabric

bluedragon-cairo commented 4 months ago

I haven't played Minecraft recently but will try to make it soon.

Xleby4ek commented 3 months ago

@bluedragon-cairo pleas make for optifabric-1.14.3

bluedragon-cairo commented 3 months ago

I'd prefer using 1.12.2 with ViaForge or 1.17+ with ViaFabric though

Xleby4ek commented 3 months ago

I'd prefer using 1.12.2 with ViaForge or 1.17+ with ViaFabric though

You misunderstand me 1.14.3 is a version of Optifabric, not minecraft image

TheUnknownCod3r commented 3 months ago

mods.zip

1.20.4 Release with the same edits supplied by BlueDragonCairo, should work fine.

KJU51003042 commented 3 months ago

@TheUnknownCod3r unfortunately, these files didn't work, optifabric said the error was more precisely mixing error

TheUnknownCod3r commented 3 months ago

@TheUnknownCod3r unfortunately, these files didn't work, optifabric said the error was more precisely mixing error

I uploaded the exact version that worked in my local instance, and only applied the fixes which @bluedragon-cairo posted above. If you want to check the fixes, make sure that you deleted your old Optifabric, Optifine, and ReplayMod jars, then paste mine. Also post your log.

image Just a screenshot, showing the mod saving a screenshot on 1.20.4, with Optifine 1.20.4 displayed

MegaMinerDL commented 3 months ago

Rip this issue