FMP Interface Fix.
This commit is contained in:
@@ -113,6 +113,9 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
|
|
||||||
assert (accountedFor.length == patterns.getSizeInventory());
|
assert (accountedFor.length == patterns.getSizeInventory());
|
||||||
|
|
||||||
|
if (! gridProxy.isReady() )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( craftingList != null )
|
if ( craftingList != null )
|
||||||
{
|
{
|
||||||
Iterator<ICraftingPatternDetails> i = craftingList.iterator();
|
Iterator<ICraftingPatternDetails> i = craftingList.iterator();
|
||||||
@@ -156,7 +159,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
if ( is == null )
|
if ( is == null )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( is.getItem() instanceof ICraftingPatternItem )
|
if ( is.getItem() instanceof ICraftingPatternItem )
|
||||||
{
|
{
|
||||||
ICraftingPatternItem cpi = (ICraftingPatternItem) is.getItem();
|
ICraftingPatternItem cpi = (ICraftingPatternItem) is.getItem();
|
||||||
ICraftingPatternDetails details = cpi.getPatternForItem( is, iHost.getTileEntity().getWorldObj() );
|
ICraftingPatternDetails details = cpi.getPatternForItem( is, iHost.getTileEntity().getWorldObj() );
|
||||||
@@ -1050,4 +1053,9 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
TileEntity te = iHost.getTileEntity();
|
TileEntity te = iHost.getTileEntity();
|
||||||
return (te.zCoord << 24) ^ (te.xCoord << 8) ^ te.yCoord;
|
return (te.zCoord << 24) ^ (te.xCoord << 8) ^ te.yCoord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initalize()
|
||||||
|
{
|
||||||
|
updateCraftingList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,12 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
|
|||||||
public PartInterface(ItemStack is) {
|
public PartInterface(ItemStack is) {
|
||||||
super( PartInterface.class, is );
|
super( PartInterface.class, is );
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public void addToWorld()
|
||||||
|
{
|
||||||
|
super.addToWorld();
|
||||||
|
duality.initalize();
|
||||||
|
}
|
||||||
|
|
||||||
@MENetworkEventSubscribe
|
@MENetworkEventSubscribe
|
||||||
public void stateChange(MENetworkChannelsChanged c)
|
public void stateChange(MENetworkChannelsChanged c)
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IS
|
|||||||
ForgeDirection pointAt = ForgeDirection.UNKNOWN;
|
ForgeDirection pointAt = ForgeDirection.UNKNOWN;
|
||||||
DualityInterface duality = new DualityInterface( gridProxy, this );
|
DualityInterface duality = new DualityInterface( gridProxy, this );
|
||||||
|
|
||||||
|
|
||||||
@MENetworkEventSubscribe
|
@MENetworkEventSubscribe
|
||||||
public void stateChange(MENetworkChannelsChanged c)
|
public void stateChange(MENetworkChannelsChanged c)
|
||||||
{
|
{
|
||||||
@@ -136,6 +137,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IS
|
|||||||
{
|
{
|
||||||
gridProxy.setValidSides( EnumSet.complementOf( EnumSet.of( pointAt ) ) );
|
gridProxy.setValidSides( EnumSet.complementOf( EnumSet.of( pointAt ) ) );
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
duality.initalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user