Cloth Config API (Fabric/Forge/NeoForge)

Cloth Config API (Fabric/Forge/NeoForge)

169M Downloads

Unable to create config screen on 1.17

magneticflux- opened this issue ยท 4 comments

commented

The full release of 1.17 seems to have made children private. As a workaround, I just widened its access, but there are probably better methods for adding children to something.

The stacktrace:

java.lang.IllegalAccessError: class me.shedaniel.clothconfig2.gui.ClothConfigScreen tried to access private field net.minecraft.client.gui.screen.Screen.children (me.shedaniel.clothconfig2.gui.ClothConfigScreen and net.minecraft.client.gui.screen.Screen are in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @4c2bb6e0)
	at me.shedaniel.clothconfig2.gui.ClothConfigScreen.init(ClothConfigScreen.java:132) ~[cloth-config-fabric-5.0.34.jar:?]
	at net.minecraft.client.gui.screen.Screen.init(Screen.java:387) ~[minecraft-1.17-mapped-net.fabricmc.yarn-1.17+build.11-v2.jar:?]
	at net.minecraft.client.MinecraftClient.openScreen(MinecraftClient.java:986) ~[minecraft-1.17-mapped-net.fabricmc.yarn-1.17+build.11-v2.jar:?]
	at com.terraformersmc.modmenu.gui.ModsScreen.lambda$init$1(ModsScreen.java:136) ~[modmenu-2.0.2.jar:?]
	at net.minecraft.client.gui.widget.ButtonWidget.onPress(ButtonWidget.java:40) ~[minecraft-1.17-mapped-net.fabricmc.yarn-1.17+build.11-v2.jar:?]
	at net.minecraft.client.gui.widget.PressableWidget.onClick(PressableWidget.java:16) ~[minecraft-1.17-mapped-net.fabricmc.yarn-1.17+build.11-v2.jar:?]
	at net.minecraft.client.gui.widget.ClickableWidget.mouseClicked(ClickableWidget.java:121) ~[minecraft-1.17-mapped-net.fabricmc.yarn-1.17+build.11-v2.jar:?]
	at net.minecraft.client.gui.ParentElement.mouseClicked(ParentElement.java:27) ~[minecraft-1.17-mapped-net.fabricmc.yarn-1.17+build.11-v2.jar:?]
	at net.minecraft.client.Mouse.method_1611(Mouse.java:94) ~[minecraft-1.17-mapped-net.fabricmc.yarn-1.17+build.11-v2.jar:?]
	at net.minecraft.client.gui.screen.Screen.wrapScreenError(Screen.java:490) ~[minecraft-1.17-mapped-net.fabricmc.yarn-1.17+build.11-v2.jar:?]
	... 20 more
commented

Are you using the 1.17 version of Cloth Config?

commented

Whoops, forgot to include the version. I'm using me/shedaniel/cloth/cloth-config-fabric/5.0.34, which looks like the latest?

commented

That's what I have defined, but the decompiled classes look different... I think something's going wrong dependency-resolution-wise in my build.

commented

Gradle's cloth-config-fabric-5.0.34.jar was different from the one I got when I downloaded it manually. I just deleted my .gradle folder and everything worked again :concern:.