From fe625428273cf9bba1c5e3ed1327600ee63ef0ff Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Thu, 30 May 2024 03:51:53 +1000 Subject: Fix OneConfig crashing on the mining settings (#1187) --- .../notenoughupdates/miscfeatures/GlaciteTunnelWaypoints.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/GlaciteTunnelWaypoints.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/GlaciteTunnelWaypoints.kt index cb4c8377..3c19f396 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/GlaciteTunnelWaypoints.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/GlaciteTunnelWaypoints.kt @@ -70,7 +70,7 @@ object GlaciteTunnelWaypoints { @SubscribeEvent fun onRender(event: RenderWorldLastEvent) { - if (NotEnoughUpdates.INSTANCE.config.mining.tunnelWaypoints == Mining.GlaciteTunnelWaypointBehaviour.NONE) + if (NotEnoughUpdates.INSTANCE.config.mining.tunnelWaypoints.get() == Mining.GlaciteTunnelWaypointBehaviour.NONE) return if (SBInfo.getInstance().scoreboardLocation !in glaciteTunnelLocations) @@ -83,7 +83,7 @@ object GlaciteTunnelWaypoints { val player = Minecraft.getMinecraft().thePlayer?.position ?: return for (entry in wantedGemstones) { val waypoints = waypointsForQuest[entry] ?: continue - val waypointLocations = when (NotEnoughUpdates.INSTANCE.config.mining.tunnelWaypoints) { + val waypointLocations = when (NotEnoughUpdates.INSTANCE.config.mining.tunnelWaypoints.get()) { Mining.GlaciteTunnelWaypointBehaviour.SHOW_ALL -> { waypoints.waypoints } @@ -92,7 +92,7 @@ object GlaciteTunnelWaypoints { listOf(waypoints.waypoints.minByOrNull { it.distanceSq(player) }) } - Mining.GlaciteTunnelWaypointBehaviour.NONE -> break + else -> break } for (waypoint in waypointLocations) { if (waypoint == null) continue -- cgit