ME Tunnel + Network Tool

This commit is contained in:
AlgorithmX2
2014-01-23 10:28:12 -06:00
parent 1b77755dd6
commit dfbc8a6c79
46 changed files with 929 additions and 128 deletions
+17
View File
@@ -7,6 +7,7 @@ import java.io.DataOutputStream;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -31,6 +32,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile
{
private final EnumMap<TileEventType, List<AETileEventHandler>> handlers = new EnumMap<TileEventType, List<AETileEventHandler>>( TileEventType.class );
private final static HashMap<Class, ItemStack> myItem = new HashMap();
private ForgeDirection forward = ForgeDirection.UNKNOWN;
private ForgeDirection up = ForgeDirection.UNKNOWN;
@@ -38,6 +40,21 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile
public boolean dropItems = true;
public int renderFragment = 0;
public TileEntity getTile()
{
return this;
}
static public void registerTileItem(Class c, ItemStack wat)
{
myItem.put( c, wat );
}
protected ItemStack getItemFromTile(Object obj)
{
return myItem.get( obj.getClass() );
}
/**
* isRedstonePowerd has already changed.
*/
+1 -1
View File
@@ -10,7 +10,7 @@ import appeng.tile.AEBaseInvTile;
public abstract class AENetworkInvTile extends AEBaseInvTile implements IGridHost, IGridProxyable
{
protected AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", true );
protected AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", getItemFromTile( this ), true );
@Override
public IGridNode getGridNode(ForgeDirection dir)
+1 -1
View File
@@ -12,7 +12,7 @@ import appeng.tile.powersink.AEBasePoweredTile;
public abstract class AENetworkPowerTile extends AEBasePoweredTile implements IGridHost, IGridProxyable
{
protected AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", true );
protected AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", getItemFromTile( this ), true );
@Override
public AECableType getCableConnectionType(ForgeDirection dir)
+1 -1
View File
@@ -16,7 +16,7 @@ public class AENetworkTile extends AEBaseTile implements IGridHost, IGridProxyab
protected AENetworkProxy createProxy()
{
return new AENetworkProxy( this, "proxy", true );
return new AENetworkProxy( this, "proxy", getItemFromTile( this ), true );
}
@Override
+6
View File
@@ -291,4 +291,10 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
{
// never called!
}
@Override
public boolean isEmpty()
{
return cb.isEmpty();
}
}
+1
View File
@@ -404,4 +404,5 @@ public class TileIOPort extends AENetworkInvTile implements IBusCommon, IConfigM
return false;
}
}