From f15561c4dc2f4ae18a5b271f3a9cd070ead2105c Mon Sep 17 00:00:00 2001 From: yueh Date: Fri, 1 May 2015 12:48:08 +0200 Subject: [PATCH] Added missing check to detect missing cell workbenches Fixes #1360 --- .../container/implementations/ContainerCellWorkbench.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java b/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java index 0fb4cd2db..8df3db239 100644 --- a/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java +++ b/src/main/java/appeng/container/implementations/ContainerCellWorkbench.java @@ -122,10 +122,8 @@ public class ContainerCellWorkbench extends ContainerUpgradeable /* * if ( supportCapacity() ) { for (int w = 0; w < 2; w++) for (int z = 0; z < 9; z++) addSlotToContainer( new * OptionalSlotFakeTypeOnly( inv, this, offset++, x, y, z, w, 1 ) ); - * * for (int w = 0; w < 2; w++) for (int z = 0; z < 9; z++) addSlotToContainer( new OptionalSlotFakeTypeOnly( * inv, this, offset++, x, y, z, w + 2, 2 ) ); - * * for (int w = 0; w < 2; w++) for (int z = 0; z < 9; z++) addSlotToContainer( new OptionalSlotFakeTypeOnly( * inv, this, offset++, x, y, z, w + 4, 3 ) ); } */ @@ -149,6 +147,11 @@ public class ContainerCellWorkbench extends ContainerUpgradeable ItemStack is = this.workBench.getInventoryByName( "cell" ).getStackInSlot( 0 ); if( Platform.isServer() ) { + if( workBench.getWorldObj().getTileEntity( workBench.xCoord, workBench.yCoord, workBench.zCoord ) != workBench ) + { + this.isContainerValid = false; + } + for( Object crafter : this.crafters ) { ICrafting icrafting = (ICrafting) crafter;