summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-10 22:05:11 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-04-10 22:05:11 +0200
commit4d89d1b3b1ff285db03ea244be5c66391d1b82df (patch)
tree7f7d56b2d241476401300b2aed288d3aa3d0fc71 /src/main/java/at/hannibal2/skyhanni/features
parentd1f1465b8ef122085dd78ef5794f31ea359b7cb4 (diff)
downloadskyhanni-4d89d1b3b1ff285db03ea244be5c66391d1b82df.tar.gz
skyhanni-4d89d1b3b1ff285db03ea244be5c66391d1b82df.tar.bz2
skyhanni-4d89d1b3b1ff285db03ea244be5c66391d1b82df.zip
Created RenderItemTooltipEvent and used it in EstimatedItemValue as a workaround for a bug caused in ct or hu3
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/EstimatedItemValue.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/EstimatedItemValue.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/EstimatedItemValue.kt
index 50dd686aa..36e385d25 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/EstimatedItemValue.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/EstimatedItemValue.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
+import at.hannibal2.skyhanni.events.RenderItemTooltipEvent
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
@@ -38,7 +39,6 @@ import io.github.moulberry.moulconfig.internal.KeybindHelper
import io.github.moulberry.notenoughupdates.util.Constants
import net.minecraft.init.Items
import net.minecraft.item.ItemStack
-import net.minecraftforge.event.entity.player.ItemTooltipEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class EstimatedItemValue {
@@ -63,11 +63,11 @@ class EstimatedItemValue {
}
@SubscribeEvent
- fun onItemTooltipLow(event: ItemTooltipEvent) {
+ fun onRenderitemTooltip(event: RenderItemTooltipEvent) {
if (!LorenzUtils.inSkyBlock) return
if (!config.estimatedIemValueEnabled) return
- val item = event.itemStack
+ val item = event.stack
val oldData = cache[item]
if (oldData != null) {
display = oldData