Files
MinecraftForge/patches/minecraft/net/minecraft/client/particle/EffectRenderer.java.patch
T

75 lines
2.8 KiB
Diff

--- ../src-base/minecraft/net/minecraft/client/particle/EffectRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/particle/EffectRenderer.java
@@ -16,9 +16,11 @@
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ReportedException;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
+
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
@@ -70,7 +72,10 @@
try
{
- entityfx.func_70071_h_();
+ if (entityfx != null)
+ {
+ entityfx.func_70071_h_();
+ }
}
catch (Throwable throwable)
{
@@ -95,7 +100,7 @@
throw new ReportedException(crashreport);
}
- if (entityfx.field_70128_L)
+ if (entityfx == null || entityfx.field_70128_L)
{
this.field_78876_b[i].remove(j--);
}
@@ -144,6 +149,7 @@
for (int j = 0; j < this.field_78876_b[i].size(); ++j)
{
final EntityFX entityfx = (EntityFX)this.field_78876_b[i].get(j);
+ if (entityfx == null) continue;
tessellator.func_78380_c(entityfx.func_70070_b(p_78874_2_));
try
@@ -200,6 +206,7 @@
for (int i = 0; i < list.size(); ++i)
{
EntityFX entityfx = (EntityFX)list.get(i);
+ if (entityfx == null) continue;
tessellator.func_78380_c(entityfx.func_70070_b(p_78872_2_));
entityfx.func_70539_a(tessellator, p_78872_2_, f2, f6, f3, f4, f5);
}
@@ -218,7 +225,7 @@
public void func_147215_a(int p_147215_1_, int p_147215_2_, int p_147215_3_, Block p_147215_4_, int p_147215_5_)
{
- if (p_147215_4_.func_149688_o() != Material.field_151579_a)
+ if (!p_147215_4_.isAir(field_78878_a, p_147215_1_, p_147215_2_, p_147215_3_) && !p_147215_4_.addDestroyEffects(field_78878_a, p_147215_1_, p_147215_2_, p_147215_3_, p_147215_5_, this))
{
byte b0 = 4;
@@ -287,4 +294,13 @@
{
return "" + (this.field_78876_b[0].size() + this.field_78876_b[1].size() + this.field_78876_b[2].size());
}
+
+ public void addBlockHitEffects(int x, int y, int z, MovingObjectPosition target)
+ {
+ Block block = field_78878_a.func_147439_a(x, y, z);
+ if (block != null && !block.addHitEffects(field_78878_a, target, this))
+ {
+ func_78867_a(x, y, z, target.field_72310_e);
+ }
+ }
}