mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 12:42:26 +00:00
57 lines
2.3 KiB
Diff
57 lines
2.3 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngame.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngame.java
|
|
@@ -40,6 +40,8 @@
|
|
import org.lwjgl.opengl.GL11;
|
|
import org.lwjgl.opengl.GL12;
|
|
|
|
+import net.minecraftforge.common.ForgeHooks;
|
|
+
|
|
@SideOnly(Side.CLIENT)
|
|
public class GuiIngame extends Gui
|
|
{
|
|
@@ -99,9 +101,16 @@
|
|
|
|
ItemStack itemstack = this.mc.thePlayer.inventory.armorItemInSlot(3);
|
|
|
|
- if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.itemID == Block.pumpkin.blockID)
|
|
+ if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.getItem() != null)
|
|
{
|
|
- this.renderPumpkinBlur(k, l);
|
|
+ if (itemstack.itemID == Block.pumpkin.blockID)
|
|
+ {
|
|
+ this.renderPumpkinBlur(k, l);
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ itemstack.getItem().renderHelmetOverlay(itemstack, mc.thePlayer, scaledresolution, par1, par2, par3, par4);
|
|
+ }
|
|
}
|
|
|
|
if (!this.mc.thePlayer.isPotionActive(Potion.confusion))
|
|
@@ -275,6 +284,16 @@
|
|
GL11.glEnable(GL11.GL_BLEND);
|
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
|
fontrenderer.drawStringWithShadow(s1, k1, i2, 16777215 + (j2 << 24));
|
|
+ FontRenderer font = highlightingItemStack.getItem().getFontRenderer(highlightingItemStack);
|
|
+ if (font != null)
|
|
+ {
|
|
+ k1 = (k - font.getStringWidth(s1)) / 2;
|
|
+ font.drawStringWithShadow(s1, k1, i2, 16777215 + (j2 << 24));
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ fontrenderer.drawStringWithShadow(s1, k1, i2, 16777215 + (j2 << 24));
|
|
+ }
|
|
GL11.glDisable(GL11.GL_BLEND);
|
|
GL11.glPopMatrix();
|
|
}
|
|
@@ -563,7 +582,7 @@
|
|
int k2 = Math.max(10 - (j2 - 2), 3);
|
|
int l2 = i2 - (j2 - 1) * k2 - 10;
|
|
float f2 = f1;
|
|
- int i3 = this.mc.thePlayer.getTotalArmorValue();
|
|
+ int i3 = ForgeHooks.getTotalArmorValue(mc.thePlayer);
|
|
int j3 = -1;
|
|
|
|
if (this.mc.thePlayer.isPotionActive(Potion.regeneration))
|