mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 05:02:30 +00:00
Global safety checks for blockstates while chunks are unloading
This commit is contained in:
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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user