diff options
author | inglettronald <inglettronald@gmail.com> | 2023-07-23 09:02:00 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-07-23 09:02:00 -0500 |
commit | c2f12fc024ed726b9b4479decfcb90ddefc6f52a (patch) | |
tree | 548ee416de6a655470cd2b096cbb29238c974c30 /src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt | |
parent | 362f71b14f864c6d86e7c805e51cd64a8194d9fb (diff) | |
download | DulkirMod-Fabric-c2f12fc024ed726b9b4479decfcb90ddefc6f52a.tar.gz DulkirMod-Fabric-c2f12fc024ed726b9b4479decfcb90ddefc6f52a.tar.bz2 DulkirMod-Fabric-c2f12fc024ed726b9b4479decfcb90ddefc6f52a.zip |
organization
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/util/render/ItemChangeHandler.kt | 13 |
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 |