Obsidian tank is not actually explosion proof
Indemnity83 opened this issue ยท 0 comments
A TNT or Creeper blast near an obsidian tank will still cause the tank to be destroyed. Need to implement explosion proofing.
Should be able to refactor this code from Iron Chest:
// BlockIronChest.java
@Override
public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion)
{
TileEntity te = world.getTileEntity(pos);
if (te instanceof TileEntityIronChest)
{
TileEntityIronChest teic = (TileEntityIronChest) te;
if (teic.getType().isExplosionResistant())
{
return 10000F;
}
}
return super.getExplosionResistance(world, pos, exploder, explosion);
}
// IronChestType.java
public boolean isExplosionResistant()
{
return this == OBSIDIAN;
}