@Override
public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof TileSlab) {
EnumBlockMaterial top = ((TileSlab) tile).getTopSlab();
EnumBlockMaterial bottom = ((TileSlab) tile).getBottomSlab();
float resist = 0;
if (top != null)
resist += top.getExplosionResistance(entity);
if (bottom != null)
resist += bottom.getExplosionResistance(entity);
if (top != null && bottom != null)
resist = resist / 2.0F;
return resist;
}
return super.getExplosionResistance(entity, world, x, y, z, explosionX, explosionY, explosionZ);