diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-01-07 07:12:36 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-01-07 07:12:36 +0100 |
| commit | e7f3e850c9cf5ddf0f4d93a25c92d3e45a279bf6 (patch) | |
| tree | c5d8cbff44428f97276eb7bd22568c3f9b02bba3 /src/main/java/at/hannibal2/skyhanni/data | |
| parent | 6b253a8ac2cdb03a67f111725c263dd84532f989 (diff) | |
| download | skyhanni-e7f3e850c9cf5ddf0f4d93a25c92d3e45a279bf6.tar.gz skyhanni-e7f3e850c9cf5ddf0f4d93a25c92d3e45a279bf6.tar.bz2 skyhanni-e7f3e850c9cf5ddf0f4d93a25c92d3e45a279bf6.zip | |
Add Brewing Stand Overlay.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt index 30b9ad03f..7937ab2ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt @@ -5,10 +5,12 @@ import at.hannibal2.skyhanni.events.GuiRenderItemEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.mixins.transformers.gui.AccessorGuiContainer +import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.client.renderer.GlStateManager +import net.minecraft.inventory.ContainerChest import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -55,6 +57,8 @@ class ItemTipHelper { val gui = Minecraft.getMinecraft().currentScreen if (gui !is GuiChest) return + val chest = gui.inventorySlots as ContainerChest + var inventoryName = chest.getInventoryName() val guiLeft = (gui as AccessorGuiContainer).guiLeft val guiTop = (gui as AccessorGuiContainer).guiTop @@ -65,9 +69,8 @@ class ItemTipHelper { GlStateManager.disableBlend() for (slot in gui.inventorySlots.inventorySlots) { val stack = slot.stack ?: continue - if (stack.stackSize != 1) continue - val itemTipEvent = RenderInventoryItemTipEvent(stack) + val itemTipEvent = RenderInventoryItemTipEvent(inventoryName, slot, stack) itemTipEvent.postAndCatch() val stackTip = itemTipEvent.stackTip if (stackTip.isEmpty()) continue |
