Make item name rendering and status bar rendering respect additional gui overlays being rendered by mods (#9648)

This commit is contained in:
Sara Freimer authored and GitHub committed 2023-07-14 10:17:43 -07:00
1 parent b7131824f0
commit 5271ef79fe
4 files changed
+18 -4

No files matched your search

@@ -485,8 +485,12 @@ public class ForgeGui extends Gui
if (opacity > 8)
{
//Include a shift based on the bar height plus the difference between the height that renderSelectedItemName
// renders at (59) and the height that the overlay/status bar renders at (68) by default
int yShift = Math.max(leftHeight, rightHeight) + (68 - 59);
guiGraphics.pose().pushPose();
guiGraphics.pose().translate(width / 2D, height - 68, 0.0D);
//If y shift is smaller less than the default y level, just render it at the base y level
guiGraphics.pose().translate(width / 2D, height - Math.max(yShift, 68), 0.0D);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
int color = (animateOverlayMessageColor ? Mth.hsvToRgb(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
@@ -144,7 +144,7 @@ public enum VanillaGuiOverlay
gui.setupOverlayRenderState(true, false);
if (gui.getMinecraft().gameMode.getPlayerMode() != GameType.SPECTATOR)
{
gui.renderSelectedItemName(guiGraphics);
gui.renderSelectedItemName(guiGraphics, Math.max(gui.leftHeight, gui.rightHeight));
}
else if (gui.getMinecraft().player.isSpectator())
{
+1
View File
@@ -1,6 +1,7 @@
com/mojang/blaze3d/vertex/VertexConsumer.putBulkData(Lcom/mojang/blaze3d/vertex/PoseStack$Pose;Lnet/minecraft/client/renderer/block/model/BakedQuad;[FFFFF[IIZ)V=|p_85996_,p_85997_,p_85998_,p_85999_,p_86000_,p_86001_,alpha,p_86002_,p_86003_,p_86004_
net/minecraft/advancements/Advancement$Builder.fromJson(Lcom/google/gson/JsonObject;Lnet/minecraft/advancements/critereon/DeserializationContext;Lnet/minecraftforge/common/crafting/conditions/ICondition$IContext;)Lnet/minecraft/advancements/Advancement$Builder;=|p_138381_,p_138382_,context
net/minecraft/client/Options.processOptionsForge(Lnet/minecraft/client/Options$FieldAccess;)V=|p_168428_
net/minecraft/client/gui/Gui.renderSelectedItemName(Lnet/minecraft/client/gui/GuiGraphics;I)V=|p_283501_,yShift
net/minecraft/client/gui/GuiGraphics.blitRepeating(Lnet/minecraft/resources/ResourceLocation;IIIIIIIIII)V=|p_283059_,p_283575_,p_283192_,p_281790_,p_283642_,p_282691_,p_281912_,p_281728_,p_282324_,textureWidth,textureHeight
net/minecraft/client/gui/screens/MenuScreens.getScreenFactory(Lnet/minecraft/world/inventory/MenuType;Lnet/minecraft/client/Minecraft;ILnet/minecraft/network/chat/Component;)Ljava/util/Optional;=|p_96202_,p_96203_,p_96204_,p_96205_
net/minecraft/client/gui/screens/inventory/InventoryScreen.renderEntityInInventoryFollowsAngle(Lnet/minecraft/client/gui/GuiGraphics;IIIFFLnet/minecraft/world/entity/LivingEntity;)V=|p_282802_,p_275688_,p_275245_,p_275535_,angleXComponent,angleYComponent,p_275689_