aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-05-14 19:35:39 +0200
committerLinnea Gräf <nea@nea.moe>2024-05-14 19:35:39 +0200
commit21e84ba59f253a78fcf0ba6187ba27ba52114ee6 (patch)
tree504d3ffc62b59728675657e15cf689348a994b1a /src/main/kotlin/moe/nea/firmament/util
parent7682534f6fd139b75f24c79b76098fe05f0fa0fe (diff)
downloadfirmament-21e84ba59f253a78fcf0ba6187ba27ba52114ee6.tar.gz
firmament-21e84ba59f253a78fcf0ba6187ba27ba52114ee6.tar.bz2
firmament-21e84ba59f253a78fcf0ba6187ba27ba52114ee6.zip
Add item predicate
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/MC.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/MC.kt b/src/main/kotlin/moe/nea/firmament/util/MC.kt
index 2fb1c75..830934f 100644
--- a/src/main/kotlin/moe/nea/firmament/util/MC.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/MC.kt
@@ -13,6 +13,7 @@ import net.minecraft.client.MinecraftClient
import net.minecraft.client.gui.screen.ingame.HandledScreen
import net.minecraft.network.packet.c2s.play.CommandExecutionC2SPacket
import net.minecraft.registry.BuiltinRegistries
+import net.minecraft.registry.RegistryKeys
import net.minecraft.registry.RegistryWrapper
import net.minecraft.resource.ReloadableResourceManagerImpl
import net.minecraft.text.Text
@@ -74,6 +75,7 @@ object MC {
inline val window get() = MinecraftClient.getInstance().window
inline val currentRegistries: RegistryWrapper.WrapperLookup? get() = world?.registryManager
val defaultRegistries: RegistryWrapper.WrapperLookup = BuiltinRegistries.createWrapperLookup()
+ val defaultItems = defaultRegistries.getWrapperOrThrow(RegistryKeys.ITEM)
}