aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/ScreenUtil.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-08-25 14:18:43 +0200
committernea <nea@nea.moe>2023-08-25 14:18:43 +0200
commit784231941661a3108549a1b5cd499bc5f7de2e46 (patch)
tree1e7c85001aef50af5d0491b2d97ae4fa09bb87d7 /src/main/kotlin/moe/nea/firmament/util/ScreenUtil.kt
parenta79452c25406e17b81dd0ed1209f590d01991c68 (diff)
downloadfirmament-784231941661a3108549a1b5cd499bc5f7de2e46.tar.gz
firmament-784231941661a3108549a1b5cd499bc5f7de2e46.tar.bz2
firmament-784231941661a3108549a1b5cd499bc5f7de2e46.zip
Add better key binding support
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/ScreenUtil.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/ScreenUtil.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/ScreenUtil.kt b/src/main/kotlin/moe/nea/firmament/util/ScreenUtil.kt
index 39d4541..25c603a 100644
--- a/src/main/kotlin/moe/nea/firmament/util/ScreenUtil.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/ScreenUtil.kt
@@ -6,10 +6,10 @@
package moe.nea.firmament.util
-import moe.nea.firmament.Firmament
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
import net.minecraft.client.MinecraftClient
import net.minecraft.client.gui.screen.Screen
+import moe.nea.firmament.Firmament
object ScreenUtil {
init {
@@ -29,10 +29,10 @@ object ScreenUtil {
private var nextOpenedGui: Screen? = null
- fun setScreenLater(nextScreen: Screen) {
+ fun setScreenLater(nextScreen: Screen?) {
val nog = nextOpenedGui
if (nog != null) {
- Firmament.logger.warn("Setting screen ${nextScreen::class.qualifiedName} to be opened later, but ${nog::class.qualifiedName} is already queued.")
+ Firmament.logger.warn("Setting screen ${if (nextScreen == null) "null" else nextScreen::class.qualifiedName} to be opened later, but ${nog::class.qualifiedName} is already queued.")
return
}
nextOpenedGui = nextScreen