mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 10:06:11 +03:00
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/particle/ParticleManager.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/particle/ParticleManager.java
|
|
@@ -153,6 +153,7 @@
|
|
|
|
public void addEffect(Particle effect)
|
|
{
|
|
+ if (effect == null) return; //Forge: Prevent modders from being bad and adding nulls causing untraceable NPEs.
|
|
this.queue.add(effect);
|
|
}
|
|
|
|
@@ -409,7 +410,7 @@
|
|
|
|
public void addBlockDestroyEffects(BlockPos pos, IBlockState state)
|
|
{
|
|
- if (state.getMaterial() != Material.AIR)
|
|
+ if (!state.getBlock().isAir(state, this.world, pos) && !state.getBlock().addDestroyEffects(world, pos, this))
|
|
{
|
|
state = state.getActualState(this.world, pos);
|
|
int i = 4;
|
|
@@ -493,4 +494,13 @@
|
|
|
|
return "" + i;
|
|
}
|
|
+
|
|
+ public void addBlockHitEffects(BlockPos pos, net.minecraft.util.math.RayTraceResult target)
|
|
+ {
|
|
+ IBlockState state = world.getBlockState(pos);
|
|
+ if (state != null && !state.getBlock().addHitEffects(state, world, target, this))
|
|
+ {
|
|
+ addBlockHitEffects(pos, target.sideHit);
|
|
+ }
|
|
+ }
|
|
}
|