Merge branch 'mc16' into builder

This commit is contained in:
CovertJaguar 2013-07-12 18:46:10 -07:00
commit d607eaae9b
7 changed files with 42 additions and 38 deletions

View file

@ -105,8 +105,6 @@
<!-- Setup mcp and forge -->
<target name="setup" depends="download-files" if="out-of-date">
<delete dir="${forge.dir}" failonerror="false"/>
<unzip dest="${forge.dir}/.." src="${download.dir}/${forge.name}"/>
<!-- Fix executable permissions -->

View file

@ -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);

View file

@ -43,5 +43,5 @@ public interface IPowerReceptor {
*/
public void doWork(PowerHandler workProvider);
public World getWorldObj();
public World getWorld();
}

View file

@ -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) {

View file

@ -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;
}
}

View file

@ -726,7 +726,7 @@ public abstract class Pipe implements IPipe, IDropControlInventory {
}
public World getWorldObj(){
public World getWorld(){
return worldObj;
}

View file

@ -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;
}
}