diff --git a/helpers/DualityInterface.java b/helpers/DualityInterface.java index fd2fd714..23475514 100644 --- a/helpers/DualityInterface.java +++ b/helpers/DualityInterface.java @@ -113,6 +113,9 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt assert (accountedFor.length == patterns.getSizeInventory()); + if (! gridProxy.isReady() ) + return; + if ( craftingList != null ) { Iterator i = craftingList.iterator(); @@ -156,7 +159,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt if ( is == null ) return; - if ( is.getItem() instanceof ICraftingPatternItem ) + if ( is.getItem() instanceof ICraftingPatternItem ) { ICraftingPatternItem cpi = (ICraftingPatternItem) is.getItem(); ICraftingPatternDetails details = cpi.getPatternForItem( is, iHost.getTileEntity().getWorldObj() ); @@ -1050,4 +1053,9 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt TileEntity te = iHost.getTileEntity(); return (te.zCoord << 24) ^ (te.xCoord << 8) ^ te.yCoord; } + + public void initalize() + { + updateCraftingList(); + } } diff --git a/parts/misc/PartInterface.java b/parts/misc/PartInterface.java index 06920814..7e78ae0b 100644 --- a/parts/misc/PartInterface.java +++ b/parts/misc/PartInterface.java @@ -60,7 +60,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg public PartInterface(ItemStack is) { super( PartInterface.class, is ); } - + @Override + public void addToWorld() + { + super.addToWorld(); + duality.initalize(); + } + @MENetworkEventSubscribe public void stateChange(MENetworkChannelsChanged c) { diff --git a/tile/misc/TileInterface.java b/tile/misc/TileInterface.java index f9731da6..55b3f025 100644 --- a/tile/misc/TileInterface.java +++ b/tile/misc/TileInterface.java @@ -51,6 +51,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IS ForgeDirection pointAt = ForgeDirection.UNKNOWN; DualityInterface duality = new DualityInterface( gridProxy, this ); + @MENetworkEventSubscribe public void stateChange(MENetworkChannelsChanged c) { @@ -136,6 +137,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IS { gridProxy.setValidSides( EnumSet.complementOf( EnumSet.of( pointAt ) ) ); super.onReady(); + duality.initalize(); } @Override