Basic reformat, hit once, hope never again
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.tile.grid;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -29,23 +30,24 @@ import appeng.tile.AEBaseInvTile;
|
||||
import appeng.tile.TileEvent;
|
||||
import appeng.tile.events.TileEventType;
|
||||
|
||||
|
||||
public abstract class AENetworkInvTile extends AEBaseInvTile implements IActionHost, IGridProxyable
|
||||
{
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_READ)
|
||||
public void readFromNBT_AENetwork(NBTTagCompound data)
|
||||
protected final AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", this.getItemFromTile( this ), true );
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_READ )
|
||||
public void readFromNBT_AENetwork( NBTTagCompound data )
|
||||
{
|
||||
this.gridProxy.readFromNBT( data );
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_WRITE)
|
||||
public void writeToNBT_AENetwork(NBTTagCompound data)
|
||||
@TileEvent( TileEventType.WORLD_NBT_WRITE )
|
||||
public void writeToNBT_AENetwork( NBTTagCompound data )
|
||||
{
|
||||
this.gridProxy.writeToNBT( data );
|
||||
}
|
||||
|
||||
protected final AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", this.getItemFromTile( this ), true );
|
||||
|
||||
@Override
|
||||
public AENetworkProxy getProxy()
|
||||
{
|
||||
@@ -53,16 +55,15 @@ public abstract class AENetworkInvTile extends AEBaseInvTile implements IActionH
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getGridNode(ForgeDirection dir)
|
||||
public void gridChanged()
|
||||
{
|
||||
return this.gridProxy.getNode();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReady()
|
||||
public IGridNode getGridNode( ForgeDirection dir )
|
||||
{
|
||||
super.onReady();
|
||||
this.gridProxy.onReady();
|
||||
return this.gridProxy.getNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,10 +74,10 @@ public abstract class AENetworkInvTile extends AEBaseInvTile implements IActionH
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate()
|
||||
public void onReady()
|
||||
{
|
||||
super.validate();
|
||||
this.gridProxy.validate();
|
||||
super.onReady();
|
||||
this.gridProxy.onReady();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -87,9 +88,10 @@ public abstract class AENetworkInvTile extends AEBaseInvTile implements IActionH
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gridChanged()
|
||||
public void validate()
|
||||
{
|
||||
|
||||
super.validate();
|
||||
this.gridProxy.validate();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.tile.grid;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -31,35 +32,30 @@ import appeng.tile.TileEvent;
|
||||
import appeng.tile.events.TileEventType;
|
||||
import appeng.tile.powersink.AEBasePoweredTile;
|
||||
|
||||
|
||||
public abstract class AENetworkPowerTile extends AEBasePoweredTile implements IActionHost, IGridProxyable
|
||||
{
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_READ)
|
||||
public void readFromNBT_AENetwork(NBTTagCompound data)
|
||||
protected final AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", this.getItemFromTile( this ), true );
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_READ )
|
||||
public void readFromNBT_AENetwork( NBTTagCompound data )
|
||||
{
|
||||
this.gridProxy.readFromNBT( data );
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_WRITE)
|
||||
public void writeToNBT_AENetwork(NBTTagCompound data)
|
||||
@TileEvent( TileEventType.WORLD_NBT_WRITE )
|
||||
public void writeToNBT_AENetwork( NBTTagCompound data )
|
||||
{
|
||||
this.gridProxy.writeToNBT( data );
|
||||
}
|
||||
|
||||
protected final AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", this.getItemFromTile( this ), true );
|
||||
|
||||
@Override
|
||||
public AENetworkProxy getProxy()
|
||||
{
|
||||
return this.gridProxy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AECableType getCableConnectionType(ForgeDirection dir)
|
||||
{
|
||||
return AECableType.SMART;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DimensionalCoord getLocation()
|
||||
{
|
||||
@@ -67,23 +63,21 @@ public abstract class AENetworkPowerTile extends AEBasePoweredTile implements IA
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getGridNode(ForgeDirection dir)
|
||||
public void gridChanged()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getGridNode( ForgeDirection dir )
|
||||
{
|
||||
return this.gridProxy.getNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReady()
|
||||
public AECableType getCableConnectionType( ForgeDirection dir )
|
||||
{
|
||||
super.onReady();
|
||||
this.gridProxy.onReady();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload()
|
||||
{
|
||||
super.onChunkUnload();
|
||||
this.gridProxy.onChunkUnload();
|
||||
return AECableType.SMART;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,9 +95,17 @@ public abstract class AENetworkPowerTile extends AEBasePoweredTile implements IA
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gridChanged()
|
||||
public void onChunkUnload()
|
||||
{
|
||||
super.onChunkUnload();
|
||||
this.gridProxy.onChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReady()
|
||||
{
|
||||
super.onReady();
|
||||
this.gridProxy.onReady();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.tile.grid;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -31,39 +32,39 @@ import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.TileEvent;
|
||||
import appeng.tile.events.TileEventType;
|
||||
|
||||
|
||||
public class AENetworkTile extends AEBaseTile implements IActionHost, IGridProxyable
|
||||
{
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_READ)
|
||||
public void readFromNBT_AENetwork(NBTTagCompound data)
|
||||
final protected AENetworkProxy gridProxy = this.createProxy();
|
||||
|
||||
@TileEvent( TileEventType.WORLD_NBT_READ )
|
||||
public void readFromNBT_AENetwork( NBTTagCompound data )
|
||||
{
|
||||
this.gridProxy.readFromNBT( data );
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_WRITE)
|
||||
public void writeToNBT_AENetwork(NBTTagCompound data)
|
||||
@TileEvent( TileEventType.WORLD_NBT_WRITE )
|
||||
public void writeToNBT_AENetwork( NBTTagCompound data )
|
||||
{
|
||||
this.gridProxy.writeToNBT( data );
|
||||
}
|
||||
|
||||
final protected AENetworkProxy gridProxy = this.createProxy();
|
||||
|
||||
protected AENetworkProxy createProxy()
|
||||
{
|
||||
return new AENetworkProxy( this, "proxy", this.getItemFromTile( this ), true );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getGridNode(ForgeDirection dir)
|
||||
public IGridNode getGridNode( ForgeDirection dir )
|
||||
{
|
||||
return this.gridProxy.getNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReady()
|
||||
public AECableType getCableConnectionType( ForgeDirection dir )
|
||||
{
|
||||
super.onReady();
|
||||
this.gridProxy.onReady();
|
||||
return AECableType.SMART;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,10 +75,10 @@ public class AENetworkTile extends AEBaseTile implements IActionHost, IGridProxy
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate()
|
||||
public void onReady()
|
||||
{
|
||||
super.validate();
|
||||
this.gridProxy.validate();
|
||||
super.onReady();
|
||||
this.gridProxy.onReady();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,21 +89,10 @@ public class AENetworkTile extends AEBaseTile implements IActionHost, IGridProxy
|
||||
}
|
||||
|
||||
@Override
|
||||
public DimensionalCoord getLocation()
|
||||
public void validate()
|
||||
{
|
||||
return new DimensionalCoord( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public AECableType getCableConnectionType(ForgeDirection dir)
|
||||
{
|
||||
return AECableType.SMART;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gridChanged()
|
||||
{
|
||||
|
||||
super.validate();
|
||||
this.gridProxy.validate();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -111,6 +101,18 @@ public class AENetworkTile extends AEBaseTile implements IActionHost, IGridProxy
|
||||
return this.gridProxy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DimensionalCoord getLocation()
|
||||
{
|
||||
return new DimensionalCoord( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gridChanged()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getActionableNode()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user