From d71cccdeb1f8b99a3b5cc9c7c893a5975ee849af Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 17 Apr 2023 23:20:31 +0200 Subject: Added internal name display to debug mode --- .../java/at/hannibal2/skyhanni/test/LorenzTest.kt | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt index 917f33f1d..8abe8e474 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorColorNames import at.hannibal2.skyhanni.utils.* +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import net.minecraft.nbt.NBTTagCompound @@ -162,19 +163,12 @@ class LorenzTest { @SubscribeEvent fun onItemTooltipLow(event: ItemTooltipEvent) { -// val itemStack = event.itemStack -// if (itemStack != null) { -// val internalName = itemStack.getInternalName() -// event.toolTip.add("internal name: $internalName") -// val data = BazaarApi.getBazaarDataByInternalName(internalName) -// if (data == null) { -// event.toolTip.add("SkyHanni Price: null") -// } else { -// val buyPrice = data.buyPrice -// val sellPrice = data.sellPrice -// event.toolTip.add("SkyHanni Price: $buyPrice / $sellPrice") -// } -// } + if (!SkyHanniMod.feature.dev.debugEnabled) return + val itemStack = event.itemStack + if (itemStack != null) { + val internalName = itemStack.getInternalName() + event.toolTip.add("Internal Name: '$internalName'") + } } @SubscribeEvent -- cgit