tr7zw / ItemSwapper

Tweaks to the inventory system based on Xisumavoid's video.
Other
100 stars 30 forks source link

[BUG] Crash when installed `MidnightControls` at same time #231

Open T2PeNBiX99wcoxKv3A4g opened 1 month ago

T2PeNBiX99wcoxKv3A4g commented 1 month ago

Version information

itemswapper-fabric-0.7.1-mc1.21

Other relevant installed mods

midnightcontrols-fabric-1.10.0-beta.1

Expected Behavior

Successful started

Actual Behavior

Crash on starting when also installed MidnightControls

Reproduction Steps

  1. Launch game

Render engine

Additional information

---- Minecraft Crash Report ----
// You're mean.
Time: 2024-10-05 12:33:00
Description: Initializing game
java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors, provided by 'itemswapper' at 'dev.tr7zw.itemswapper.ItemSwapperMod'!
at app//net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:403)
at app//net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at app//net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:401)
at app//net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:53)
at MC//net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:477)
at net.minecraft.client.main.Main.main(Main.java:239)
at app//net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
at app//net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at app//net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.IllegalAccessError: class dev.tr7zw.itemswapper.ItemSwapperMod tried to access private field eu.midnightdust.midnightcontrols.client.compat.MidnightControlsCompat.HANDLERS (dev.tr7zw.itemswapper.ItemSwapperMod and eu.midnightdust.midnightcontrols.client.compat.MidnightControlsCompat are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @4c70fda8)
at dev.tr7zw.itemswapper.ItemSwapperMod.lambda$initModloader$3(ItemSwapperMod.java:54)
at java.base@22.0.2/java.util.Optional.ifPresent(Optional.java:178)
at dev.tr7zw.itemswapper.ItemSwapperMod.initModloader(ItemSwapperMod.java:52)
at dev.tr7zw.itemswapper.ItemSwapperSharedMod.init(ItemSwapperSharedMod.java:68)
at dev.tr7zw.itemswapper.ItemSwapperMod.onInitializeClient(ItemSwapperMod.java:110)
at app//net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399)
... 6 more