This is how you make Oil Burn

@viliml seriously test your PRs, BlockFluid intercepts the fire methods

I also made Oil burn forever like Netherrack.
This commit is contained in:
CovertJaguar 2013-05-13 18:54:04 -07:00
parent 232494a662
commit 8721cb9719
2 changed files with 46 additions and 16 deletions

View file

@ -20,6 +20,8 @@ import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftEnergy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.ForgeDirection;
public class BlockOilFlowing extends BlockFlowing implements ILiquid {
@ -285,8 +287,22 @@ public class BlockOilFlowing extends BlockFlowing implements ILiquid {
}
@Override
public void initializeBlock()
{
setBurnProperties(blockID, 100, 100);
public int getFireSpreadSpeed(World world, int x, int y, int z, int metadata, ForgeDirection face) {
return 300;
}
@Override
public int getFlammability(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) {
return 1;
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) {
return true;
}
@Override
public boolean isFireSource(World world, int x, int y, int z, int metadata, ForgeDirection side) {
return true;
}
}

View file

@ -1,12 +1,10 @@
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
* Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* BuildCraft is distributed under the terms of the Minecraft Mod Public License
* 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.energy;
import net.minecraft.block.BlockStationary;
@ -19,6 +17,8 @@ import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftEnergy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.ForgeDirection;
public class BlockOilStill extends BlockStationary implements ILiquid {
@ -61,8 +61,22 @@ public class BlockOilStill extends BlockStationary implements ILiquid {
}
@Override
public void initializeBlock()
{
setBurnProperties(blockID, 100, 100);
public int getFireSpreadSpeed(World world, int x, int y, int z, int metadata, ForgeDirection face) {
return 300;
}
@Override
public int getFlammability(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) {
return 1;
}
@Override
public boolean isFlammable(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) {
return true;
}
@Override
public boolean isFireSource(World world, int x, int y, int z, int metadata, ForgeDirection side) {
return true;
}
}