1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-07-06 20:12:52 +00:00

Don't (metaphorically) explode on null explosions

Closes #1423.
This commit is contained in:
Jonathan Coates 2023-05-03 23:38:12 +01:00
parent c0f982dc97
commit db2616d1c0
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -172,9 +172,9 @@ public class BlockTurtle extends BlockComputerBase<TileTurtle> implements IWater
}
@Override
public float getExplosionResistance( BlockState state, IBlockReader world, BlockPos pos, Explosion explosion )
public float getExplosionResistance( BlockState state, IBlockReader world, BlockPos pos, @Nullable Explosion explosion )
{
Entity exploder = explosion.getExploder();
Entity exploder = explosion == null ? null : explosion.getExploder();
if( getFamily() == ComputerFamily.ADVANCED || exploder instanceof LivingEntity || exploder instanceof DamagingProjectileEntity )
{
return 2000;