From f3bea96194a8c2b7668bd62a93ae155a5d4e3c43 Mon Sep 17 00:00:00 2001 From: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Date: Sun, 15 Sep 2024 15:14:02 -0400 Subject: [PATCH] Render hover tooltip after creative menu page size rendering (#1544) --- .../CreativeModeInventoryScreen.java.patch | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/patches/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java.patch b/patches/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java.patch index 67ef56cafb..525825a442 100644 --- a/patches/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java.patch +++ b/patches/net/minecraft/client/gui/screens/inventory/CreativeModeInventoryScreen.java.patch @@ -160,16 +160,19 @@ this.refreshSearchResults(); } else { -@@ -665,7 +_,7 @@ +@@ -665,18 +_,27 @@ public void render(GuiGraphics p_283000_, int p_281317_, int p_282770_, float p_281295_) { super.render(p_283000_, p_281317_, p_282770_, p_281295_); - for (CreativeModeTab creativemodetab : CreativeModeTabs.tabs()) { -+ for(CreativeModeTab creativemodetab : currentPage.getVisibleTabs()) { - if (this.checkTabHovering(p_283000_, creativemodetab, p_281317_, p_282770_)) { - break; - } -@@ -677,6 +_,15 @@ +- if (this.checkTabHovering(p_283000_, creativemodetab, p_281317_, p_282770_)) { +- break; +- } +- } +- + if (this.destroyItemSlot != null + && selectedTab.getType() == CreativeModeTab.Type.INVENTORY + && this.isHovering(this.destroyItemSlot.x, this.destroyItemSlot.y, 16, 16, (double)p_281317_, (double)p_282770_)) { p_283000_.renderTooltip(this.font, TRASH_SLOT_TOOLTIP, p_281317_, p_282770_); } @@ -181,6 +184,12 @@ + p_283000_.pose().popPose(); + } + ++ for (CreativeModeTab creativemodetab : currentPage.getVisibleTabs()) { ++ if (this.checkTabHovering(p_283000_, creativemodetab, p_281317_, p_282770_)) { ++ break; ++ } ++ } ++ + com.mojang.blaze3d.systems.RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); this.renderTooltip(p_283000_, p_281317_, p_282770_); }