diff --git a/build.xml b/build.xml index 8172a20a..5fa7da70 100644 --- a/build.xml +++ b/build.xml @@ -105,8 +105,6 @@ - - diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 83fcc4ad..dc212f53 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -149,7 +149,7 @@ public class BuildCraftEnergy { if (fluidOil.getBlockID() == -1) { if (blockOilId > 0) { - blockOil = new BlockBuildcraftFluid(blockOilId, fluidOil, Material.water); + blockOil = new BlockBuildcraftFluid(blockOilId, fluidOil, Material.water).setFlammable(canOilBurn).setFlammability(0); blockOil.setUnlocalizedName("blockOil"); CoreProxy.proxy.addName(blockOil, "Oil"); CoreProxy.proxy.registerBlock(blockOil); @@ -168,7 +168,7 @@ public class BuildCraftEnergy { if (fluidFuel.getBlockID() == -1) { if (blockFuelId > 0) { - blockFuel = new BlockBuildcraftFluid(blockFuelId, fluidFuel, Material.water); + blockFuel = new BlockBuildcraftFluid(blockFuelId, fluidFuel, Material.water).setFlammable(true).setFlammability(5); blockFuel.setUnlocalizedName("blockFuel"); CoreProxy.proxy.addName(blockFuel, "Fuel"); CoreProxy.proxy.registerBlock(blockFuel); diff --git a/common/buildcraft/api/power/IPowerReceptor.java b/common/buildcraft/api/power/IPowerReceptor.java index 6c9aae36..a7f6c421 100644 --- a/common/buildcraft/api/power/IPowerReceptor.java +++ b/common/buildcraft/api/power/IPowerReceptor.java @@ -43,5 +43,5 @@ public interface IPowerReceptor { */ public void doWork(PowerHandler workProvider); - public World getWorldObj(); + public World getWorld(); } diff --git a/common/buildcraft/api/power/PowerHandler.java b/common/buildcraft/api/power/PowerHandler.java index fde0902f..9e92859d 100644 --- a/common/buildcraft/api/power/PowerHandler.java +++ b/common/buildcraft/api/power/PowerHandler.java @@ -189,7 +189,7 @@ public final class PowerHandler { } private void applyPerdition() { - if (perditionTracker.markTimeIfDelay(receptor.getWorldObj(), 1) && energyStored > 0) { + if (perditionTracker.markTimeIfDelay(receptor.getWorld(), 1) && energyStored > 0) { float newEnergy = getPerdition().applyPerdition(this, energyStored, perditionTracker.durationOfLastDelay()); if (newEnergy == 0 || newEnergy < energyStored) { energyStored = newEnergy; @@ -202,14 +202,14 @@ public final class PowerHandler { private void applyWork() { if (energyStored >= activationEnergy) { - if (doWorkTracker.markTimeIfDelay(receptor.getWorldObj(), 1)) { + if (doWorkTracker.markTimeIfDelay(receptor.getWorld(), 1)) { receptor.doWork(this); } } } private void updateSources(ForgeDirection source) { - if (sourcesTracker.markTimeIfDelay(receptor.getWorldObj(), 1)) { + if (sourcesTracker.markTimeIfDelay(receptor.getWorld(), 1)) { for (int i = 0; i < 6; ++i) { powerSources[i] -= sourcesTracker.durationOfLastDelay(); if (powerSources[i] < 0) { diff --git a/common/buildcraft/core/TileBuildCraft.java b/common/buildcraft/core/TileBuildCraft.java index 092e6ccf..61ac36b7 100644 --- a/common/buildcraft/core/TileBuildCraft.java +++ b/common/buildcraft/core/TileBuildCraft.java @@ -19,6 +19,7 @@ import java.util.HashMap; import java.util.Map; import net.minecraft.network.packet.Packet; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; public abstract class TileBuildCraft extends TileEntity implements ISynchronizedTile { @@ -109,4 +110,8 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized // TODO Auto-generated method stub return false; } + + public World getWorld() { + return worldObj; + } } diff --git a/common/buildcraft/transport/Pipe.java b/common/buildcraft/transport/Pipe.java index 511692c2..267cda62 100644 --- a/common/buildcraft/transport/Pipe.java +++ b/common/buildcraft/transport/Pipe.java @@ -726,7 +726,7 @@ public abstract class Pipe implements IPipe, IDropControlInventory { } - public World getWorldObj(){ + public World getWorld(){ return worldObj; } diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 6cce71c3..ae13b432 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -531,39 +531,35 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) - { - if (BlockGenericPipe.isValid(pipe) && pipe.transport instanceof IFluidHandler && !hasPlug(from)) - return ((IFluidHandler) pipe.transport).drain(from, resource, doDrain); - else - return null; - } + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { + if (BlockGenericPipe.isValid(pipe) && pipe.transport instanceof IFluidHandler && !hasPlug(from)) + return ((IFluidHandler) pipe.transport).drain(from, resource, doDrain); + else + return null; + } - @Override - public boolean canFill(ForgeDirection from, Fluid fluid) - { - if (BlockGenericPipe.isValid(pipe) && pipe.transport instanceof IFluidHandler && !hasPlug(from)) - return ((IFluidHandler) pipe.transport).canFill(from, fluid); - else - return false; - } + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + if (BlockGenericPipe.isValid(pipe) && pipe.transport instanceof IFluidHandler && !hasPlug(from)) + return ((IFluidHandler) pipe.transport).canFill(from, fluid); + else + return false; + } - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid) - { - if (BlockGenericPipe.isValid(pipe) && pipe.transport instanceof IFluidHandler && !hasPlug(from)) - return ((IFluidHandler) pipe.transport).canDrain(from, fluid); - else - return false; - } + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + if (BlockGenericPipe.isValid(pipe) && pipe.transport instanceof IFluidHandler && !hasPlug(from)) + return ((IFluidHandler) pipe.transport).canDrain(from, fluid); + else + return false; + } - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from) - { - return null; - } + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) { + return null; + } - public void scheduleRenderUpdate() { + public void scheduleRenderUpdate() { refreshRenderState = true; } @@ -714,4 +710,9 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui } return 0; } + + @Override + public World getWorld() { + return worldObj; + } }