Merge branch 'mc16' into builder
This commit is contained in:
commit
d607eaae9b
7 changed files with 42 additions and 38 deletions
|
@ -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 -->
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -43,5 +43,5 @@ public interface IPowerReceptor {
|
|||
*/
|
||||
public void doWork(PowerHandler workProvider);
|
||||
|
||||
public World getWorldObj();
|
||||
public World getWorld();
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -726,7 +726,7 @@ public abstract class Pipe implements IPipe, IDropControlInventory {
|
|||
|
||||
}
|
||||
|
||||
public World getWorldObj(){
|
||||
public World getWorld(){
|
||||
return worldObj;
|
||||
}
|
||||
|
||||
|
|
|
@ -531,8 +531,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain)
|
||||
{
|
||||
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
|
||||
|
@ -540,8 +539,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid)
|
||||
{
|
||||
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
|
||||
|
@ -549,8 +547,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid)
|
||||
{
|
||||
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
|
||||
|
@ -558,8 +555,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from)
|
||||
{
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -714,4 +710,9 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorld() {
|
||||
return worldObj;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue