diff --git a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt index fcf756f..df96082 100644 --- a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt +++ b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt @@ -52,10 +52,10 @@ private val okZoomerPairs by lazy { } catch (e: ClassNotFoundException) { with(Class.forName("io.github.ennuil.okzoomer.utils.ZoomUtils").getDeclaredField("zoomerZoom")) { get(null).javaClass.run { - (getField("zoomDivisor") to this@with) to (getField("zoom") to this@with) + (getDeclaredField("zoomDivisor") to this@with.get(null)) to (getDeclaredField("zoom") to this@with.get(null)) } } - } + }.apply { first.first.isAccessible = true; second.first.isAccessible = true; } } fun fabricZoom() {