aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/utils
diff options
context:
space:
mode:
authoringle <inglettronald@gmail.com>2022-10-28 12:17:26 -0500
committeringle <inglettronald@gmail.com>2022-10-28 12:17:26 -0500
commitbfa2b37155711e2a907f15d6e56d18378ae4f723 (patch)
treeffae5faade666c6ed631f8f8c438def680c9fc27 /src/main/kotlin/dulkirmod/utils
parentfba8ecf8f06c03c36c8d4823fe5e5928bad98d32 (diff)
downloadDulkirMod-bfa2b37155711e2a907f15d6e56d18378ae4f723.tar.gz
DulkirMod-bfa2b37155711e2a907f15d6e56d18378ae4f723.tar.bz2
DulkirMod-bfa2b37155711e2a907f15d6e56d18378ae4f723.zip
+ Efficiency improvements
+ command for setting leap highlight + (I THINK) abiphone dnd (on by default)
Diffstat (limited to 'src/main/kotlin/dulkirmod/utils')
-rw-r--r--src/main/kotlin/dulkirmod/utils/ContainerNameUtil.kt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/utils/ContainerNameUtil.kt b/src/main/kotlin/dulkirmod/utils/ContainerNameUtil.kt
new file mode 100644
index 0000000..706bcea
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/utils/ContainerNameUtil.kt
@@ -0,0 +1,21 @@
+package dulkirmod.utils
+
+import dulkirmod.DulkirMod.Companion.mc
+import net.minecraft.client.gui.inventory.GuiChest
+import net.minecraft.inventory.ContainerChest
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import net.minecraftforge.fml.common.gameevent.TickEvent
+
+class ContainerNameUtil {
+ @SubscribeEvent
+ fun onTick(event: TickEvent.ClientTickEvent) {
+ if (mc.currentScreen !is GuiChest) return
+ val chest = mc.currentScreen as GuiChest
+ val container = chest.inventorySlots as ContainerChest
+ currentGuiChestName = container.lowerChestInventory.displayName.unformattedText
+ }
+
+ companion object {
+ var currentGuiChestName = ""
+ }
+} \ No newline at end of file