aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/inventory/WardrobeKeybinds.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-11-24 23:42:00 +0100
committerLinnea Gräf <nea@nea.moe>2025-11-24 23:42:00 +0100
commit6dd14e7225ff60361fe9f87020c424c0eb89a68b (patch)
tree6977d5a71850924becc71b1ac53f1865a1c8330a /src/main/kotlin/features/inventory/WardrobeKeybinds.kt
parent3f33928c8fefe4816af9d538fa3fce48d5e76f7c (diff)
downloadFirmament-6dd14e7225ff60361fe9f87020c424c0eb89a68b.tar.gz
Firmament-6dd14e7225ff60361fe9f87020c424c0eb89a68b.tar.bz2
Firmament-6dd14e7225ff60361fe9f87020c424c0eb89a68b.zip
feat: firmament api
Diffstat (limited to 'src/main/kotlin/features/inventory/WardrobeKeybinds.kt')
-rw-r--r--src/main/kotlin/features/inventory/WardrobeKeybinds.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/features/inventory/WardrobeKeybinds.kt b/src/main/kotlin/features/inventory/WardrobeKeybinds.kt
index b3d4bfd..8d4760b 100644
--- a/src/main/kotlin/features/inventory/WardrobeKeybinds.kt
+++ b/src/main/kotlin/features/inventory/WardrobeKeybinds.kt
@@ -1,6 +1,7 @@
package moe.nea.firmament.features.inventory
import org.lwjgl.glfw.GLFW
+import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
import net.minecraft.world.item.Items
import moe.nea.firmament.annotations.Subscribe
import moe.nea.firmament.events.HandledScreenKeyPressedEvent
@@ -29,6 +30,7 @@ object WardrobeKeybinds {
@Subscribe
fun switchSlot(event: HandledScreenKeyPressedEvent) {
if (MC.player == null || MC.world == null || MC.interactionManager == null) return
+ if (event.screen !is AbstractContainerScreen<*>) return
val regex = Regex("Wardrobe \\([12]/2\\)")
if (!regex.matches(event.screen.title.string)) return