fix #2253, add missing Charging Table recipe

This commit is contained in:
asiekierka 2014-12-01 12:44:17 +01:00
parent 5dcbf56c16
commit 6a198ae374
4 changed files with 16 additions and 20 deletions

View file

@ -249,6 +249,15 @@ public class BuildCraftSilicon extends BuildCraftMod {
'C', new ItemStack(redstoneChipset, 1, 0),
'G', "gearDiamond");
CoreProxy.proxy.addCraftingRecipe(new ItemStack(assemblyTableBlock, 1, 3),
"ORO",
"OCO",
"OGO",
'O', Blocks.obsidian,
'R', "dustRedstone",
'C', new ItemStack(redstoneChipset, 1, 0),
'G', "gearGold");
// COMMANDER BLOCKS
CoreProxy.proxy.addCraftingRecipe(new ItemStack(zonePlanBlock, 1, 0),
"IRI",

View file

@ -70,14 +70,14 @@ public class TriggerFluidContainer extends BCStatement implements ITriggerExtern
switch (state) {
case Empty:
for (FluidTankInfo c : liquids) {
if (c.fluid != null && c.fluid.amount > 0 && (searchedFluid == null || searchedFluid.isFluidEqual(c.fluid))) {
if (c != null && c.fluid != null && c.fluid.amount > 0 && (searchedFluid == null || searchedFluid.isFluidEqual(c.fluid))) {
return false;
}
}
return true;
case Contains:
for (FluidTankInfo c : liquids) {
if (c.fluid != null && c.fluid.amount > 0 && (searchedFluid == null || searchedFluid.isFluidEqual(c.fluid))) {
if (c != null && c.fluid != null && c.fluid.amount > 0 && (searchedFluid == null || searchedFluid.isFluidEqual(c.fluid))) {
return true;
}
}
@ -85,7 +85,7 @@ public class TriggerFluidContainer extends BCStatement implements ITriggerExtern
case Space:
if (searchedFluid == null) {
for (FluidTankInfo c : liquids) {
if (c.fluid == null || c.fluid.amount < c.capacity) {
if (c != null && (c.fluid == null || c.fluid.amount < c.capacity)) {
return true;
}
}
@ -95,7 +95,7 @@ public class TriggerFluidContainer extends BCStatement implements ITriggerExtern
case Full:
if (searchedFluid == null) {
for (FluidTankInfo c : liquids) {
if (c.fluid == null || c.fluid.amount < c.capacity) {
if (c != null && (c.fluid == null || c.fluid.amount < c.capacity)) {
return false;
}
}

View file

@ -74,6 +74,9 @@ public class TriggerFluidContainerLevel extends BCStatement implements ITriggerE
}
for (FluidTankInfo c : liquids) {
if (c == null) {
continue;
}
if (c.fluid == null) {
if (searchedFluid == null) {
return true;

View file

@ -127,22 +127,6 @@ public class PipePowerWood extends Pipe<PipeTransportPower> implements IPipeTran
requestedEnergy = 0;
}
public boolean requestsPower() {
if (full) {
boolean request = battery.getEnergyStored() < battery.getMaxEnergyStored() / 2;
if (request) {
full = false;
}
return request;
}
full = battery.getEnergyStored() >= battery.getMaxEnergyStored() - 100;
return !full;
}
@Override
public void writeToNBT(NBTTagCompound data) {
super.writeToNBT(data);