Files
MinecraftForge/patches/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java.patch
T

34 lines
1.8 KiB
Diff

--- ../src-base/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/InventoryEffectRenderer.java
@@ -27,7 +27,12 @@
protected void func_175378_g()
{
- if (!this.field_146297_k.field_71439_g.func_70651_bq().isEmpty())
+ boolean hasVisibleEffect = false;
+ for(PotionEffect potioneffect : this.field_146297_k.field_71439_g.func_70651_bq()) {
+ Potion potion = Potion.field_76425_a[potioneffect.func_76456_a()];
+ if(potion.shouldRender(potioneffect)) { hasVisibleEffect = true; break; }
+ }
+ if (!this.field_146297_k.field_71439_g.func_70651_bq().isEmpty() && hasVisibleEffect)
{
this.field_147003_i = 160 + (this.field_146294_l - this.field_146999_f - 200) / 2;
this.field_147045_u = true;
@@ -70,6 +75,7 @@
for (PotionEffect potioneffect : this.field_146297_k.field_71439_g.func_70651_bq())
{
Potion potion = Potion.field_76425_a[potioneffect.func_76456_a()];
+ if(!potion.shouldRender(potioneffect)) continue;
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
this.field_146297_k.func_110434_K().func_110577_a(field_147001_a);
this.func_73729_b(i, j, 0, 166, 140, 32);
@@ -80,6 +86,8 @@
this.func_73729_b(i + 6, j + 7, 0 + i1 % 8 * 18, 198 + i1 / 8 * 18, 18, 18);
}
+ potion.renderInventoryEffect(i, j, potioneffect, field_146297_k);
+ if (!potion.shouldRenderInvText(potioneffect)) continue;
String s1 = I18n.func_135052_a(potion.func_76393_a(), new Object[0]);
if (potioneffect.func_76458_c() == 1)