Wireless Terminal Gui Works, dose not support range, or WAPs

This commit is contained in:
AlgorithmX2
2014-02-02 23:02:54 -06:00
parent b7d90b989d
commit 8b81545abf
8 changed files with 121 additions and 36 deletions
@@ -40,24 +40,29 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IMEMonito
if ( Platform.isServer() )
{
monitor = montiorable.getItemInventory();
monitor.addListener( this, null );
cellInv = monitor;
if ( montiorable instanceof IPortableCell )
powerSrc = (IPortableCell) montiorable;
else if ( montiorable instanceof IMEChest )
powerSrc = (IMEChest) montiorable;
else if ( montiorable instanceof IGridHost )
if ( monitor != null )
{
IGridNode node = ((IGridHost) montiorable).getGridNode( ForgeDirection.UNKNOWN );
if ( node != null )
monitor.addListener( this, null );
cellInv = monitor;
if ( montiorable instanceof IPortableCell )
powerSrc = (IPortableCell) montiorable;
else if ( montiorable instanceof IMEChest )
powerSrc = (IMEChest) montiorable;
else if ( montiorable instanceof IGridHost )
{
IGrid g = node.getGrid();
if ( g != null )
powerSrc = g.getCache( IEnergyGrid.class );
IGridNode node = ((IGridHost) montiorable).getGridNode( ForgeDirection.UNKNOWN );
if ( node != null )
{
IGrid g = node.getGrid();
if ( g != null )
powerSrc = g.getCache( IEnergyGrid.class );
}
}
}
else
ip.player.closeScreen();
}
else
monitor = null;
@@ -122,7 +127,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IMEMonito
{
super.addCraftingToCrafters( c );
if ( Platform.isServer() && c instanceof Player )
if ( Platform.isServer() && c instanceof Player && monitor != null )
{
try
{
@@ -168,7 +173,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IMEMonito
{
super.removeCraftingFromCrafters( c );
if ( this.crafters.isEmpty() )
if ( this.crafters.isEmpty() && monitor != null )
monitor.removeListener( this );
}