aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt')
-rw-r--r--src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt b/src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt
new file mode 100644
index 0000000..7f6193e
--- /dev/null
+++ b/src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt
@@ -0,0 +1,13 @@
+package com.dulkirfabric.util.render
+
+import com.dulkirfabric.events.TooltipRenderChangeEvent
+
+object ItemChangeHandler {
+ var prevName = ""
+ fun handle(name: String) {
+ if (name != prevName) {
+ prevName = name
+ TooltipRenderChangeEvent.post()
+ }
+ }
+} \ No newline at end of file