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
|
@ -49,7 +49,16 @@ public class BlockBuildcraftFluid extends BlockFluidClassic {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
this.theIcon = new Icon[]{iconRegister.registerIcon("buildcraft:" + fluidName + "_still"), iconRegister.registerIcon("buildcraft:" + fluidName + "_flow")};
|
||||
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) {
|
||||
|
@ -82,7 +91,7 @@ public class BlockBuildcraftFluid extends BlockFluidClassic {
|
|||
return flammable && flammability == 0;
|
||||
}
|
||||
|
||||
public BlockBuildcraftFluid setParticleColor(float particleRed, float particleGreen, float particleBlue){
|
||||
public BlockBuildcraftFluid setParticleColor(float particleRed, float particleGreen, float particleBlue) {
|
||||
this.particleRed = particleRed;
|
||||
this.particleGreen = particleGreen;
|
||||
this.particleBlue = particleBlue;
|
||||
|
@ -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