Global safety checks for blockstates while chunks are unloading

This commit is contained in:
Vincent Lee committed 2016-01-10 22:53:21 -06:00
1 parent 84204db587
commit f3cce3d24e
54 files changed
+163 -114

No files matched your search

@@ -74,9 +74,11 @@ public class EntityFallingStar extends EntityThrowableCopy {
else pos.entityHit.attackEntityFrom(DamageSource.generic, 10);
}
Block block = worldObj.getBlockState(pos.getBlockPos()).getBlock();
if(ConfigHandler.blockBreakParticles && !block.isAir(worldObj, pos.getBlockPos()))
worldObj.playAuxSFX(2001, pos.getBlockPos(), Block.getStateId(worldObj.getBlockState(pos.getBlockPos())));
if (pos.getBlockPos() != null) {
Block block = worldObj.getBlockState(pos.getBlockPos()).getBlock();
if(ConfigHandler.blockBreakParticles && !block.isAir(worldObj, pos.getBlockPos()))
worldObj.playAuxSFX(2001, pos.getBlockPos(), Block.getStateId(worldObj.getBlockState(pos.getBlockPos())));
}
setDead();
}