mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 10:06:11 +03:00
36 lines
1.7 KiB
Diff
36 lines
1.7 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngame.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngame.java
|
|
@@ -379,7 +379,8 @@
|
|
|
|
BlockPos blockpos = raytraceresult.getBlockPos();
|
|
|
|
- if (!this.mc.world.getBlockState(blockpos).getBlock().hasTileEntity() || !(this.mc.world.getTileEntity(blockpos) instanceof IInventory))
|
|
+ net.minecraft.block.state.IBlockState state = this.mc.world.getBlockState(blockpos);
|
|
+ if (!state.getBlock().hasTileEntity(state) || !(this.mc.world.getTileEntity(blockpos) instanceof IInventory))
|
|
{
|
|
return;
|
|
}
|
|
@@ -449,7 +450,10 @@
|
|
{
|
|
Potion potion = potioneffect.getPotion();
|
|
|
|
- if (potion.hasStatusIcon() && potioneffect.doesShowParticles())
|
|
+ if (!potion.shouldRenderHUD(potioneffect)) continue;
|
|
+ // Rebind in case previous renderHUDEffect changed texture
|
|
+ this.mc.getTextureManager().bindTexture(GuiContainer.INVENTORY_BACKGROUND);
|
|
+ if (potioneffect.doesShowParticles())
|
|
{
|
|
int k = resolution.getScaledWidth();
|
|
int l = 1;
|
|
@@ -492,7 +496,10 @@
|
|
}
|
|
|
|
GlStateManager.color(1.0F, 1.0F, 1.0F, f);
|
|
+ // FORGE - Move status icon check down from above so renderHUDEffect will still be called without a status icon
|
|
+ if (potion.hasStatusIcon())
|
|
this.drawTexturedModalRect(k + 3, l + 3, i1 % 8 * 18, 198 + i1 / 8 * 18, 18, 18);
|
|
+ potion.renderHUDEffect(k, l, potioneffect, mc, f);
|
|
}
|
|
}
|
|
}
|