From cdc429872af304cd89fc68f1e6f6259b94753075 Mon Sep 17 00:00:00 2001 From: Bart Date: Sun, 22 Jul 2012 14:02:53 +0300 Subject: [PATCH 1/3] Added Work scheduled and Work done triggers to Assembly Table. --- .../buildcraft/factory/TileAssemblyTable.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/common/net/minecraft/src/buildcraft/factory/TileAssemblyTable.java b/common/net/minecraft/src/buildcraft/factory/TileAssemblyTable.java index 604a872d..b28124d6 100644 --- a/common/net/minecraft/src/buildcraft/factory/TileAssemblyTable.java +++ b/common/net/minecraft/src/buildcraft/factory/TileAssemblyTable.java @@ -24,7 +24,7 @@ import net.minecraft.src.buildcraft.core.network.PacketIds; import net.minecraft.src.buildcraft.core.network.PacketUpdate; import net.minecraft.src.buildcraft.core.network.TilePacketWrapper; -public class TileAssemblyTable extends TileEntity implements IInventory, IPipeConnection { +public class TileAssemblyTable extends TileEntity implements IMachine, IInventory, IPipeConnection { ItemStack[] items = new ItemStack[12]; @@ -433,4 +433,24 @@ public class TileAssemblyTable extends TileEntity implements IInventory, IPipeCo iCrafting.updateCraftingInventoryInfo(container, 1, (int) energyStored); } + @Override + public boolean isActive() { + return currentRecipe != null; + } + + @Override + public boolean manageLiquids() { + return false; + } + + @Override + public boolean manageSolids() { + return false; + } + + @Override + public boolean allowActions() { + return false; + } + } From c73f10752eb36e037f224224489df1aeaff2ba0e Mon Sep 17 00:00:00 2001 From: Kyprus Date: Sun, 22 Jul 2012 20:39:40 -0400 Subject: [PATCH 2/3] Fixed missing import. --- .../net/minecraft/src/buildcraft/factory/TileAssemblyTable.java | 1 + 1 file changed, 1 insertion(+) diff --git a/common/net/minecraft/src/buildcraft/factory/TileAssemblyTable.java b/common/net/minecraft/src/buildcraft/factory/TileAssemblyTable.java index b28124d6..8d70cf39 100644 --- a/common/net/minecraft/src/buildcraft/factory/TileAssemblyTable.java +++ b/common/net/minecraft/src/buildcraft/factory/TileAssemblyTable.java @@ -18,6 +18,7 @@ import net.minecraft.src.buildcraft.api.TileNetworkData; import net.minecraft.src.buildcraft.api.recipes.AssemblyRecipe; import net.minecraft.src.buildcraft.core.CoreProxy; import net.minecraft.src.buildcraft.core.DefaultProps; +import net.minecraft.src.buildcraft.core.IMachine; import net.minecraft.src.buildcraft.core.StackUtil; import net.minecraft.src.buildcraft.core.Utils; import net.minecraft.src.buildcraft.core.network.PacketIds; From 60c13e0f70edbd861fb1f2f57f0ea599b5a7f597 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Mon, 23 Jul 2012 16:57:15 +0200 Subject: [PATCH 3/3] Fix NullPointerException on wooden pipes when the inventory is empty --- .../minecraft/src/buildcraft/transport/pipes/PipeItemsWood.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/net/minecraft/src/buildcraft/transport/pipes/PipeItemsWood.java b/common/net/minecraft/src/buildcraft/transport/pipes/PipeItemsWood.java index 00ff41b1..8c1de2f0 100644 --- a/common/net/minecraft/src/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/net/minecraft/src/buildcraft/transport/pipes/PipeItemsWood.java @@ -103,6 +103,8 @@ public class PipeItemsWood extends Pipe implements IPowerReceptor { IInventory inventory = (IInventory) tile; ItemStack[] extracted = checkExtract(inventory, true, pos.orientation.reverse()); + if (extracted == null) + return; for(ItemStack stack : extracted) { if (stack == null || stack.stackSize == 0) {