Merge pull request #850 from viliml/patch-2

Made oil flammable and prone to explode(like real oil)
This commit is contained in:
Flow86 2013-05-13 12:42:21 -07:00
commit ee7b15ed8f
2 changed files with 32 additions and 0 deletions

View file

@ -284,4 +284,20 @@ public class BlockOilFlowing extends BlockFlowing implements ILiquid {
public void registerIcons(IconRegister iconRegister) {
this.theIcon = new Icon[]{iconRegister.registerIcon("buildcraft:oil"), iconRegister.registerIcon("buildcraft:oil_flow")};
}
@Override
public void initializeBlock()
{
setBurnProperties(blockID, 100, 100);
}
@Override
public void onNeighborBlockChange(World World, int x, int y, int z, int id)
{
if (id == Block.fire.blockID ||
id == Block.lavaStill.blockID || id == Block.lavaMoving.blockID)
{
World.createExplosion(null, x, y, z, 10, true);
}
}
}

View file

@ -60,4 +60,20 @@ public class BlockOilStill extends BlockStationary implements ILiquid {
this.theIcon = new Icon[] { iconRegister.registerIcon("buildcraft:oil"), iconRegister.registerIcon("buildcraft:oil_flow") };
}
@Override
public void initializeBlock()
{
setBurnProperties(blockID, 100, 100);
}
@Override
public void onNeighborBlockChange(World World, int x, int y, int z, int id)
{
if (id == Block.fire.blockID ||
id == Block.lavaStill.blockID || id == Block.lavaMoving.blockID)
{
World.createExplosion(null, x, y, z, 10, true);
}
}
}