FMP Interface Fix.
This commit is contained in:
parent
137549f8fa
commit
9c9598c6fb
3 changed files with 18 additions and 2 deletions
|
@ -113,6 +113,9 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||
|
||||
assert (accountedFor.length == patterns.getSizeInventory());
|
||||
|
||||
if (! gridProxy.isReady() )
|
||||
return;
|
||||
|
||||
if ( craftingList != null )
|
||||
{
|
||||
Iterator<ICraftingPatternDetails> 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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue