aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/MC.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-24 02:29:20 +0200
committernea <nea@nea.moe>2023-05-24 02:29:20 +0200
commit5984383d2c48b4ae84bac1827bc6ca1891af8cf0 (patch)
tree90aaae93147ce7aad48777be488039626b70512a /src/main/kotlin/moe/nea/firmament/util/MC.kt
parent5ff50799b6c8baf6dd87ecbf44860d19a4acceab (diff)
downloadfirmament-5984383d2c48b4ae84bac1827bc6ca1891af8cf0.tar.gz
firmament-5984383d2c48b4ae84bac1827bc6ca1891af8cf0.tar.bz2
firmament-5984383d2c48b4ae84bac1827bc6ca1891af8cf0.zip
Common config gui
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/MC.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/MC.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/MC.kt b/src/main/kotlin/moe/nea/firmament/util/MC.kt
index 8fc15b5..ae5f9a6 100644
--- a/src/main/kotlin/moe/nea/firmament/util/MC.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/MC.kt
@@ -4,13 +4,14 @@ import io.github.moulberry.repo.data.Coordinate
import net.minecraft.client.MinecraftClient
import net.minecraft.client.gui.screen.ingame.HandledScreen
import net.minecraft.util.math.BlockPos
-import moe.nea.firmament.mixins.accessor.AccessorHandledScreen
object MC {
inline val soundManager get() = MinecraftClient.getInstance().soundManager
inline val player get() = MinecraftClient.getInstance().player
inline val world get() = MinecraftClient.getInstance().world
- inline val screen get() = MinecraftClient.getInstance().currentScreen
+ inline var screen
+ get() = MinecraftClient.getInstance().currentScreen
+ set(value) = MinecraftClient.getInstance().setScreen(value)
inline val handledScreen: HandledScreen<*>? get() = MinecraftClient.getInstance().currentScreen as? HandledScreen<*>
}