Fuel/Oil should explode when placed in the nether
This commit is contained in:
parent
3438566406
commit
8e92d0494c
1 changed files with 19 additions and 8 deletions
|
@ -52,6 +52,15 @@ public class BlockBuildcraftFluid extends BlockFluidClassic {
|
|||
this.theIcon = new Icon[] { iconRegister.registerIcon("buildcraft:" + fluidName + "_still"), iconRegister.registerIcon("buildcraft:" + fluidName + "_flow") };
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, int blockId) {
|
||||
super.onNeighborBlockChange(world, x, y, z, blockId);
|
||||
if (flammable && world.provider.dimensionId == -1) {
|
||||
world.newExplosion(null, x, y, z, 4F, true, true);
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
public BlockBuildcraftFluid setFlammable(boolean flammable) {
|
||||
this.flammable = flammable;
|
||||
return this;
|
||||
|
@ -106,13 +115,15 @@ public class BlockBuildcraftFluid extends BlockFluidClassic {
|
|||
|
||||
@Override
|
||||
public boolean canDisplace(IBlockAccess world, int x, int y, int z) {
|
||||
if (world.getBlockMaterial(x, y, z).isLiquid()) return false;
|
||||
if (world.getBlockMaterial(x, y, z).isLiquid())
|
||||
return false;
|
||||
return super.canDisplace(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean displaceIfPossible(World world, int x, int y, int z) {
|
||||
if (world.getBlockMaterial(x, y, z).isLiquid()) return false;
|
||||
if (world.getBlockMaterial(x, y, z).isLiquid())
|
||||
return false;
|
||||
return super.displaceIfPossible(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue