mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 12:42:26 +00:00
Fix a couple more ItemStack null checks (#3586)
This commit is contained in:
1 parent
43f3b3ec65
commit
c4dea9fc66
2 files changed
+5
-4
No files matched your search
@@ -253,15 +253,16 @@ public class GuiIngameForge extends GuiIngame
|
||||
|
||||
ItemStack itemstack = this.mc.player.inventory.armorItemInSlot(3);
|
||||
|
||||
if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.getItem() != null)
|
||||
if (this.mc.gameSettings.thirdPersonView == 0 && !itemstack.isEmpty())
|
||||
{
|
||||
if (itemstack.getItem() == Item.getItemFromBlock(Blocks.PUMPKIN))
|
||||
Item item = itemstack.getItem();
|
||||
if (item == Item.getItemFromBlock(Blocks.PUMPKIN))
|
||||
{
|
||||
renderPumpkinOverlay(res);
|
||||
}
|
||||
else
|
||||
{
|
||||
itemstack.getItem().renderHelmetOverlay(itemstack, mc.player, res, partialTicks);
|
||||
item.renderHelmetOverlay(itemstack, mc.player, res, partialTicks);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user