fix #2253, add missing Charging Table recipe
This commit is contained in:
parent
5dcbf56c16
commit
6a198ae374
4 changed files with 16 additions and 20 deletions
|
@ -249,6 +249,15 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
||||||
'C', new ItemStack(redstoneChipset, 1, 0),
|
'C', new ItemStack(redstoneChipset, 1, 0),
|
||||||
'G', "gearDiamond");
|
'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
|
// COMMANDER BLOCKS
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(zonePlanBlock, 1, 0),
|
CoreProxy.proxy.addCraftingRecipe(new ItemStack(zonePlanBlock, 1, 0),
|
||||||
"IRI",
|
"IRI",
|
||||||
|
|
|
@ -70,14 +70,14 @@ public class TriggerFluidContainer extends BCStatement implements ITriggerExtern
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case Empty:
|
case Empty:
|
||||||
for (FluidTankInfo c : liquids) {
|
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 false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case Contains:
|
case Contains:
|
||||||
for (FluidTankInfo c : liquids) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ public class TriggerFluidContainer extends BCStatement implements ITriggerExtern
|
||||||
case Space:
|
case Space:
|
||||||
if (searchedFluid == null) {
|
if (searchedFluid == null) {
|
||||||
for (FluidTankInfo c : liquids) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ public class TriggerFluidContainer extends BCStatement implements ITriggerExtern
|
||||||
case Full:
|
case Full:
|
||||||
if (searchedFluid == null) {
|
if (searchedFluid == null) {
|
||||||
for (FluidTankInfo c : liquids) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,9 @@ public class TriggerFluidContainerLevel extends BCStatement implements ITriggerE
|
||||||
}
|
}
|
||||||
|
|
||||||
for (FluidTankInfo c : liquids) {
|
for (FluidTankInfo c : liquids) {
|
||||||
|
if (c == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (c.fluid == null) {
|
if (c.fluid == null) {
|
||||||
if (searchedFluid == null) {
|
if (searchedFluid == null) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -127,22 +127,6 @@ public class PipePowerWood extends Pipe<PipeTransportPower> implements IPipeTran
|
||||||
requestedEnergy = 0;
|
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
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound data) {
|
public void writeToNBT(NBTTagCompound data) {
|
||||||
super.writeToNBT(data);
|
super.writeToNBT(data);
|
||||||
|
|
Loading…
Reference in a new issue