aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/MC.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-13 13:40:50 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-13 13:40:50 +0100
commitd267913e206f5f7bfc16607c0dc058290e6b556f (patch)
treeae586ff39bb970f51b84f89c7e0b96130e9f4e3b /src/main/kotlin/util/MC.kt
parentdb87e5293846e27dc684dd141744390ae6e8bc67 (diff)
downloadFirmament-d267913e206f5f7bfc16607c0dc058290e6b556f.tar.gz
Firmament-d267913e206f5f7bfc16607c0dc058290e6b556f.tar.bz2
Firmament-d267913e206f5f7bfc16607c0dc058290e6b556f.zip
test: Add sack util test
Diffstat (limited to 'src/main/kotlin/util/MC.kt')
-rw-r--r--src/main/kotlin/util/MC.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/util/MC.kt b/src/main/kotlin/util/MC.kt
index cbcd8ae..3f5d633 100644
--- a/src/main/kotlin/util/MC.kt
+++ b/src/main/kotlin/util/MC.kt
@@ -102,7 +102,7 @@ object MC {
inline val handledScreen: HandledScreen<*>? get() = instance.currentScreen as? HandledScreen<*>
inline val window get() = instance.window
inline val currentRegistries: RegistryWrapper.WrapperLookup? get() = world?.registryManager
- val defaultRegistries: RegistryWrapper.WrapperLookup = BuiltinRegistries.createWrapperLookup()
+ val defaultRegistries: RegistryWrapper.WrapperLookup by lazy { BuiltinRegistries.createWrapperLookup() }
inline val currentOrDefaultRegistries get() = currentRegistries ?: defaultRegistries
val defaultItems: RegistryWrapper.Impl<Item> = defaultRegistries.getOrThrow(RegistryKeys.ITEM)
var lastWorld: World? = null