aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-09 14:55:06 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-09 14:55:06 +0200
commit0efd1b797bbca2eb144b3ec795217ee2e9077c23 (patch)
tree00ac1262c6b7e3e676794c75ce3dfb86873f4f7b /src/main/java/at/hannibal2/skyhanni/data
parent5607930d95e526c529dac318d8e958b7b4de052b (diff)
downloadskyhanni-0efd1b797bbca2eb144b3ec795217ee2e9077c23.tar.gz
skyhanni-0efd1b797bbca2eb144b3ec795217ee2e9077c23.tar.bz2
skyhanni-0efd1b797bbca2eb144b3ec795217ee2e9077c23.zip
Using NEUInternalName in even more classes
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
index d7371cfa6..bc626a156 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt
@@ -2,9 +2,10 @@ package at.hannibal2.skyhanni.data
import at.hannibal2.skyhanni.events.*
import at.hannibal2.skyhanni.utils.InventoryUtils
-import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old
+import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
+import at.hannibal2.skyhanni.utils.NEUInternalName
import net.minecraft.client.Minecraft
import net.minecraft.network.play.server.S29PacketSoundEffect
import net.minecraft.network.play.server.S2APacketParticles
@@ -71,12 +72,12 @@ class MinecraftData {
fun onTick(event: LorenzTickEvent) {
if (!LorenzUtils.inSkyBlock) return
val hand = InventoryUtils.getItemInHand()
- val newItem = hand?.getInternalName_old() ?: ""
+ val newItem = hand?.getInternalName() ?: NEUInternalName.NONE
if (newItem != InventoryUtils.itemInHandId) {
ItemInHandChangeEvent(newItem, hand).postAndCatch()
InventoryUtils.recentItemsInHand.keys.removeIf { it + 30_000 > System.currentTimeMillis() }
- if (newItem != "") {
+ if (newItem != NEUInternalName.NONE) {
InventoryUtils.recentItemsInHand[System.currentTimeMillis()] = newItem
}
InventoryUtils.itemInHandId = newItem
@@ -86,7 +87,7 @@ class MinecraftData {
@SubscribeEvent
fun onWorldChange(event: LorenzWorldChangeEvent) {
- InventoryUtils.itemInHandId = ""
+ InventoryUtils.itemInHandId = NEUInternalName.NONE
InventoryUtils.recentItemsInHand.clear()
}
} \ No newline at end of file