aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt b/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt
new file mode 100644
index 000000000..511c26119
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt
@@ -0,0 +1,20 @@
+package at.hannibal2.skyhanni.test
+
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getItemUuid
+import net.minecraftforge.event.entity.player.ItemTooltipEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+class ShowItemUuid {
+
+ @SubscribeEvent
+ fun onItemTooltipLow(event: ItemTooltipEvent) {
+ if (!SkyHanniMod.feature.dev.showItemUuid) return
+ val itemStack = event.itemStack
+ if (itemStack != null) {
+ itemStack.getItemUuid()?.let {
+ event.toolTip.add("ยง7Item UUID: '$it'")
+ }
+ }
+ }
+}