The Great Renamening of 2020
This commit is contained in:
+6
-6
@@ -83,8 +83,8 @@ import appeng.crafting.CraftingWatcher;
|
||||
import appeng.me.cluster.implementations.CraftingCPUCluster;
|
||||
import appeng.me.helpers.BaseActionSource;
|
||||
import appeng.me.helpers.GenericInterestManager;
|
||||
import appeng.tile.crafting.TileCraftingStorageTile;
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.tile.crafting.CraftingStorageTileEntity;
|
||||
import appeng.tile.crafting.CraftingTileEntity;
|
||||
|
||||
public class CraftingGridCache
|
||||
implements ICraftingGrid, ICraftingProviderHelper, ICellProvider, IMEInventoryHandler<IAEItemStack> {
|
||||
@@ -163,7 +163,7 @@ public class CraftingGridCache
|
||||
}
|
||||
}
|
||||
|
||||
if (machine instanceof TileCraftingTile) {
|
||||
if (machine instanceof CraftingTileEntity) {
|
||||
this.updateList = true;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ public class CraftingGridCache
|
||||
}
|
||||
}
|
||||
|
||||
if (machine instanceof TileCraftingTile) {
|
||||
if (machine instanceof CraftingTileEntity) {
|
||||
this.updateList = true;
|
||||
}
|
||||
|
||||
@@ -264,8 +264,8 @@ public class CraftingGridCache
|
||||
private void updateCPUClusters() {
|
||||
this.craftingCPUClusters.clear();
|
||||
|
||||
for (final IGridNode cst : this.grid.getMachines(TileCraftingStorageTile.class)) {
|
||||
final TileCraftingStorageTile tile = (TileCraftingStorageTile) cst.getMachine();
|
||||
for (final IGridNode cst : this.grid.getMachines(CraftingStorageTileEntity.class)) {
|
||||
final CraftingStorageTileEntity tile = (CraftingStorageTileEntity) cst.getMachine();
|
||||
final CraftingCPUCluster cluster = (CraftingCPUCluster) tile.getCluster();
|
||||
if (cluster != null) {
|
||||
this.craftingCPUClusters.add(cluster);
|
||||
|
||||
+22
-22
@@ -36,16 +36,16 @@ import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
import appeng.api.networking.ticking.ITickManager;
|
||||
import appeng.core.AELog;
|
||||
import appeng.me.cache.helpers.TunnelCollection;
|
||||
import appeng.parts.p2p.PartP2PTunnel;
|
||||
import appeng.parts.p2p.PartP2PTunnelME;
|
||||
import appeng.parts.p2p.P2PTunnelPart;
|
||||
import appeng.parts.p2p.MEP2PTunnelPart;
|
||||
|
||||
public class P2PCache implements IGridCache {
|
||||
private static final TunnelCollection<PartP2PTunnel> NULL_COLLECTION = new TunnelCollection<PartP2PTunnel>(null,
|
||||
private static final TunnelCollection<P2PTunnelPart> NULL_COLLECTION = new TunnelCollection<P2PTunnelPart>(null,
|
||||
null);
|
||||
|
||||
private final IGrid myGrid;
|
||||
private final HashMap<Short, PartP2PTunnel> inputs = new HashMap<>();
|
||||
private final Multimap<Short, PartP2PTunnel> outputs = LinkedHashMultimap.create();
|
||||
private final HashMap<Short, P2PTunnelPart> inputs = new HashMap<>();
|
||||
private final Multimap<Short, P2PTunnelPart> outputs = LinkedHashMultimap.create();
|
||||
private final Random frequencyGenerator;
|
||||
|
||||
public P2PCache(final IGrid g) {
|
||||
@@ -56,8 +56,8 @@ public class P2PCache implements IGridCache {
|
||||
@MENetworkEventSubscribe
|
||||
public void bootComplete(final MENetworkBootingStatusChange bootStatus) {
|
||||
final ITickManager tm = this.myGrid.getCache(ITickManager.class);
|
||||
for (final PartP2PTunnel me : this.inputs.values()) {
|
||||
if (me instanceof PartP2PTunnelME) {
|
||||
for (final P2PTunnelPart me : this.inputs.values()) {
|
||||
if (me instanceof MEP2PTunnelPart) {
|
||||
tm.wakeDevice(me.getGridNode());
|
||||
}
|
||||
}
|
||||
@@ -66,8 +66,8 @@ public class P2PCache implements IGridCache {
|
||||
@MENetworkEventSubscribe
|
||||
public void bootComplete(final MENetworkPowerStatusChange power) {
|
||||
final ITickManager tm = this.myGrid.getCache(ITickManager.class);
|
||||
for (final PartP2PTunnel me : this.inputs.values()) {
|
||||
if (me instanceof PartP2PTunnelME) {
|
||||
for (final P2PTunnelPart me : this.inputs.values()) {
|
||||
if (me instanceof MEP2PTunnelPart) {
|
||||
tm.wakeDevice(me.getGridNode());
|
||||
}
|
||||
}
|
||||
@@ -80,14 +80,14 @@ public class P2PCache implements IGridCache {
|
||||
|
||||
@Override
|
||||
public void removeNode(final IGridNode node, final IGridHost machine) {
|
||||
if (machine instanceof PartP2PTunnel) {
|
||||
if (machine instanceof PartP2PTunnelME) {
|
||||
if (machine instanceof P2PTunnelPart) {
|
||||
if (machine instanceof MEP2PTunnelPart) {
|
||||
if (!node.hasFlag(GridFlags.REQUIRE_CHANNEL)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
final PartP2PTunnel t = (PartP2PTunnel) machine;
|
||||
final P2PTunnelPart t = (P2PTunnelPart) machine;
|
||||
// AELog.info( "rmv-" + (t.output ? "output: " : "input: ") + t.freq );
|
||||
|
||||
if (t.isOutput()) {
|
||||
@@ -102,14 +102,14 @@ public class P2PCache implements IGridCache {
|
||||
|
||||
@Override
|
||||
public void addNode(final IGridNode node, final IGridHost machine) {
|
||||
if (machine instanceof PartP2PTunnel) {
|
||||
if (machine instanceof PartP2PTunnelME) {
|
||||
if (machine instanceof P2PTunnelPart) {
|
||||
if (machine instanceof MEP2PTunnelPart) {
|
||||
if (!node.hasFlag(GridFlags.REQUIRE_CHANNEL)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
final PartP2PTunnel t = (PartP2PTunnel) machine;
|
||||
final P2PTunnelPart t = (P2PTunnelPart) machine;
|
||||
// AELog.info( "add-" + (t.output ? "output: " : "input: ") + t.freq );
|
||||
|
||||
if (t.isOutput()) {
|
||||
@@ -138,14 +138,14 @@ public class P2PCache implements IGridCache {
|
||||
}
|
||||
|
||||
private void updateTunnel(final short freq, final boolean updateOutputs, final boolean configChange) {
|
||||
for (final PartP2PTunnel p : this.outputs.get(freq)) {
|
||||
for (final P2PTunnelPart p : this.outputs.get(freq)) {
|
||||
if (configChange) {
|
||||
p.onTunnelConfigChange();
|
||||
}
|
||||
p.onTunnelNetworkChange();
|
||||
}
|
||||
|
||||
final PartP2PTunnel in = this.inputs.get(freq);
|
||||
final P2PTunnelPart in = this.inputs.get(freq);
|
||||
if (in != null) {
|
||||
if (configChange) {
|
||||
in.onTunnelConfigChange();
|
||||
@@ -154,7 +154,7 @@ public class P2PCache implements IGridCache {
|
||||
}
|
||||
}
|
||||
|
||||
public void updateFreq(final PartP2PTunnel t, final short newFrequency) {
|
||||
public void updateFreq(final P2PTunnelPart t, final short newFrequency) {
|
||||
if (this.outputs.containsValue(t)) {
|
||||
this.outputs.remove(t.getFrequency(), t);
|
||||
}
|
||||
@@ -192,14 +192,14 @@ public class P2PCache implements IGridCache {
|
||||
return newFrequency;
|
||||
}
|
||||
|
||||
public TunnelCollection<PartP2PTunnel> getOutputs(final short freq, final Class<? extends PartP2PTunnel> c) {
|
||||
final PartP2PTunnel in = this.inputs.get(freq);
|
||||
public TunnelCollection<P2PTunnelPart> getOutputs(final short freq, final Class<? extends P2PTunnelPart> c) {
|
||||
final P2PTunnelPart in = this.inputs.get(freq);
|
||||
|
||||
if (in == null) {
|
||||
return NULL_COLLECTION;
|
||||
}
|
||||
|
||||
final TunnelCollection<PartP2PTunnel> out = this.inputs.get(freq).getCollection(this.outputs.get(freq), c);
|
||||
final TunnelCollection<P2PTunnelPart> out = this.inputs.get(freq).getCollection(this.outputs.get(freq), c);
|
||||
|
||||
if (out == null) {
|
||||
return NULL_COLLECTION;
|
||||
@@ -208,7 +208,7 @@ public class P2PCache implements IGridCache {
|
||||
return out;
|
||||
}
|
||||
|
||||
public PartP2PTunnel getInput(final short freq) {
|
||||
public P2PTunnelPart getInput(final short freq) {
|
||||
return this.inputs.get(freq);
|
||||
}
|
||||
}
|
||||
|
||||
+9
-9
@@ -56,12 +56,12 @@ import appeng.me.pathfinding.ControllerChannelUpdater;
|
||||
import appeng.me.pathfinding.ControllerValidator;
|
||||
import appeng.me.pathfinding.IPathItem;
|
||||
import appeng.me.pathfinding.PathSegment;
|
||||
import appeng.tile.networking.TileController;
|
||||
import appeng.tile.networking.ControllerTileEntity;
|
||||
|
||||
public class PathGridCache implements IPathingGrid {
|
||||
|
||||
private final List<PathSegment> active = new ArrayList<>();
|
||||
private final Set<TileController> controllers = new HashSet<>();
|
||||
private final Set<ControllerTileEntity> controllers = new HashSet<>();
|
||||
private final Set<IGridNode> requireChannels = new HashSet<>();
|
||||
private final Set<IGridNode> blockDense = new HashSet<>();
|
||||
private final IGrid myGrid;
|
||||
@@ -130,11 +130,11 @@ public class PathGridCache implements IPathingGrid {
|
||||
|
||||
// myGrid.getPivot().beginVisit( new AdHocChannelUpdater( 0 )
|
||||
// );
|
||||
for (final IGridNode node : this.myGrid.getMachines(TileController.class)) {
|
||||
for (final IGridNode node : this.myGrid.getMachines(ControllerTileEntity.class)) {
|
||||
closedList.add((IPathItem) node);
|
||||
for (final IGridConnection gcc : node.getConnections()) {
|
||||
final GridConnection gc = (GridConnection) gcc;
|
||||
if (!(gc.getOtherSide(node).getMachine() instanceof TileController)) {
|
||||
if (!(gc.getOtherSide(node).getMachine() instanceof ControllerTileEntity)) {
|
||||
final List<IPathItem> open = new ArrayList<>();
|
||||
closedList.add(gc);
|
||||
open.add(gc);
|
||||
@@ -160,9 +160,9 @@ public class PathGridCache implements IPathingGrid {
|
||||
|
||||
if (this.active.isEmpty() && this.ticksUntilReady <= 0) {
|
||||
if (this.controllerState == ControllerState.CONTROLLER_ONLINE) {
|
||||
final Iterator<TileController> controllerIterator = this.controllers.iterator();
|
||||
final Iterator<ControllerTileEntity> controllerIterator = this.controllers.iterator();
|
||||
if (controllerIterator.hasNext()) {
|
||||
final TileController controller = controllerIterator.next();
|
||||
final ControllerTileEntity controller = controllerIterator.next();
|
||||
controller.getGridNode(AEPartLocation.INTERNAL).beginVisit(new ControllerChannelUpdater());
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ public class PathGridCache implements IPathingGrid {
|
||||
|
||||
@Override
|
||||
public void removeNode(final IGridNode gridNode, final IGridHost machine) {
|
||||
if (machine instanceof TileController) {
|
||||
if (machine instanceof ControllerTileEntity) {
|
||||
this.controllers.remove(machine);
|
||||
this.recalculateControllerNextTick = true;
|
||||
}
|
||||
@@ -199,8 +199,8 @@ public class PathGridCache implements IPathingGrid {
|
||||
|
||||
@Override
|
||||
public void addNode(final IGridNode gridNode, final IGridHost machine) {
|
||||
if (machine instanceof TileController) {
|
||||
this.controllers.add((TileController) machine);
|
||||
if (machine instanceof ControllerTileEntity) {
|
||||
this.controllers.add((ControllerTileEntity) machine);
|
||||
this.recalculateControllerNextTick = true;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -33,8 +33,8 @@ import appeng.api.util.DimensionalCoord;
|
||||
import appeng.api.util.IReadOnlyCollection;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.me.cluster.implementations.SpatialPylonCluster;
|
||||
import appeng.tile.spatial.TileSpatialIOPort;
|
||||
import appeng.tile.spatial.TileSpatialPylon;
|
||||
import appeng.tile.spatial.SpatialIOPortTileEntity;
|
||||
import appeng.tile.spatial.SpatialPylonTileEntity;
|
||||
|
||||
public class SpatialPylonCache implements ISpatialCache {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class SpatialPylonCache implements ISpatialCache {
|
||||
private DimensionalCoord captureMin;
|
||||
private DimensionalCoord captureMax;
|
||||
private boolean isValid = false;
|
||||
private List<TileSpatialIOPort> ioPorts = new ArrayList<>();
|
||||
private List<SpatialIOPortTileEntity> ioPorts = new ArrayList<>();
|
||||
private HashMap<SpatialPylonCluster, SpatialPylonCluster> clusters = new HashMap<>();
|
||||
|
||||
public SpatialPylonCache(final IGrid g) {
|
||||
@@ -61,14 +61,14 @@ public class SpatialPylonCache implements ISpatialCache {
|
||||
this.clusters = new HashMap<>();
|
||||
this.ioPorts = new ArrayList<>();
|
||||
|
||||
for (final IGridNode gm : grid.getMachines(TileSpatialIOPort.class)) {
|
||||
this.ioPorts.add((TileSpatialIOPort) gm.getMachine());
|
||||
for (final IGridNode gm : grid.getMachines(SpatialIOPortTileEntity.class)) {
|
||||
this.ioPorts.add((SpatialIOPortTileEntity) gm.getMachine());
|
||||
}
|
||||
|
||||
final IReadOnlyCollection<IGridNode> set = grid.getMachines(TileSpatialPylon.class);
|
||||
final IReadOnlyCollection<IGridNode> set = grid.getMachines(SpatialPylonTileEntity.class);
|
||||
for (final IGridNode gm : set) {
|
||||
if (gm.meetsChannelRequirements()) {
|
||||
final SpatialPylonCluster c = ((TileSpatialPylon) gm.getMachine()).getCluster();
|
||||
final SpatialPylonCluster c = ((SpatialPylonTileEntity) gm.getMachine()).getCluster();
|
||||
if (c != null) {
|
||||
this.clusters.put(c, c);
|
||||
}
|
||||
|
||||
+3
-3
@@ -23,17 +23,17 @@ import java.util.HashMap;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.parts.p2p.PartP2PTunnelME;
|
||||
import appeng.parts.p2p.MEP2PTunnelPart;
|
||||
import appeng.util.IWorldCallable;
|
||||
|
||||
public class Connections implements IWorldCallable<Void> {
|
||||
|
||||
private final HashMap<IGridNode, TunnelConnection> connections = new HashMap<>();
|
||||
private final PartP2PTunnelME me;
|
||||
private final MEP2PTunnelPart me;
|
||||
private boolean create = false;
|
||||
private boolean destroy = false;
|
||||
|
||||
public Connections(final PartP2PTunnelME o) {
|
||||
public Connections(final MEP2PTunnelPart o) {
|
||||
this.me = o;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ package appeng.me.cache.helpers;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
import appeng.parts.p2p.PartP2PTunnel;
|
||||
import appeng.parts.p2p.P2PTunnelPart;
|
||||
import appeng.util.iterators.NullIterator;
|
||||
|
||||
public class TunnelCollection<T extends PartP2PTunnel> implements Iterable<T> {
|
||||
public class TunnelCollection<T extends P2PTunnelPart> implements Iterable<T> {
|
||||
|
||||
private final Class clz;
|
||||
private Collection<T> tunnelSources;
|
||||
@@ -50,11 +50,11 @@ public class TunnelCollection<T extends PartP2PTunnel> implements Iterable<T> {
|
||||
return new TunnelIterator<>(this.tunnelSources, this.clz);
|
||||
}
|
||||
|
||||
public boolean matches(final Class<? extends PartP2PTunnel> c) {
|
||||
public boolean matches(final Class<? extends P2PTunnelPart> c) {
|
||||
return this.clz == c;
|
||||
}
|
||||
|
||||
public Class<? extends PartP2PTunnel> getClz() {
|
||||
public Class<? extends P2PTunnelPart> getClz() {
|
||||
return this.clz;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
package appeng.me.cache.helpers;
|
||||
|
||||
import appeng.api.networking.IGridConnection;
|
||||
import appeng.parts.p2p.PartP2PTunnelME;
|
||||
import appeng.parts.p2p.MEP2PTunnelPart;
|
||||
|
||||
public class TunnelConnection {
|
||||
|
||||
private final PartP2PTunnelME tunnel;
|
||||
private final MEP2PTunnelPart tunnel;
|
||||
private final IGridConnection c;
|
||||
|
||||
public TunnelConnection(final PartP2PTunnelME t, final IGridConnection con) {
|
||||
public TunnelConnection(final MEP2PTunnelPart t, final IGridConnection con) {
|
||||
this.tunnel = t;
|
||||
this.c = con;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ public class TunnelConnection {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
public PartP2PTunnelME getTunnel() {
|
||||
public MEP2PTunnelPart getTunnel() {
|
||||
return this.tunnel;
|
||||
}
|
||||
}
|
||||
@@ -21,9 +21,9 @@ package appeng.me.cache.helpers;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
import appeng.parts.p2p.PartP2PTunnel;
|
||||
import appeng.parts.p2p.P2PTunnelPart;
|
||||
|
||||
public class TunnelIterator<T extends PartP2PTunnel> implements Iterator<T> {
|
||||
public class TunnelIterator<T extends P2PTunnelPart> implements Iterator<T> {
|
||||
|
||||
private final Iterator<T> wrapped;
|
||||
private final Class targetType;
|
||||
|
||||
@@ -33,15 +33,15 @@ import appeng.api.util.WorldCoord;
|
||||
import appeng.me.cluster.IAECluster;
|
||||
import appeng.me.cluster.IAEMultiBlock;
|
||||
import appeng.me.cluster.MBCalculator;
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.tile.crafting.CraftingTileEntity;
|
||||
|
||||
public class CraftingCPUCalculator extends MBCalculator {
|
||||
|
||||
private final TileCraftingTile tqb;
|
||||
private final CraftingTileEntity tqb;
|
||||
|
||||
public CraftingCPUCalculator(final IAEMultiBlock t) {
|
||||
super(t);
|
||||
this.tqb = (TileCraftingTile) t;
|
||||
this.tqb = (CraftingTileEntity) t;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,8 +79,8 @@ public class CraftingCPUCalculator extends MBCalculator {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!storage && te instanceof TileCraftingTile) {
|
||||
storage = ((TileCraftingTile) te).getStorageBytes() > 0;
|
||||
if (!storage && te instanceof CraftingTileEntity) {
|
||||
storage = ((CraftingTileEntity) te).getStorageBytes() > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class CraftingCPUCalculator extends MBCalculator {
|
||||
for (int x = min.x; x <= max.x; x++) {
|
||||
for (int y = min.y; y <= max.y; y++) {
|
||||
for (int z = min.z; z <= max.z; z++) {
|
||||
final TileCraftingTile te = (TileCraftingTile) w.getTileEntity(new BlockPos(x, y, z));
|
||||
final CraftingTileEntity te = (CraftingTileEntity) w.getTileEntity(new BlockPos(x, y, z));
|
||||
te.updateStatus(c);
|
||||
c.addTile(te);
|
||||
}
|
||||
@@ -126,6 +126,6 @@ public class CraftingCPUCalculator extends MBCalculator {
|
||||
|
||||
@Override
|
||||
public boolean isValidTile(final TileEntity te) {
|
||||
return te instanceof TileCraftingTile;
|
||||
return te instanceof CraftingTileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ import appeng.crafting.MECraftingInventory;
|
||||
import appeng.me.cache.CraftingGridCache;
|
||||
import appeng.me.cluster.IAECluster;
|
||||
import appeng.me.helpers.MachineSource;
|
||||
import appeng.tile.crafting.TileCraftingMonitorTile;
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.tile.crafting.CraftingMonitorTileEntity;
|
||||
import appeng.tile.crafting.CraftingTileEntity;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
@@ -87,9 +87,9 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
private final int[] usedOps = new int[3];
|
||||
private final Map<ICraftingPatternDetails, TaskProgress> tasks = new HashMap<>();
|
||||
// INSTANCE sate
|
||||
private final List<TileCraftingTile> tiles = new ArrayList<>();
|
||||
private final List<TileCraftingTile> storage = new ArrayList<>();
|
||||
private final List<TileCraftingMonitorTile> status = new ArrayList<>();
|
||||
private final List<CraftingTileEntity> tiles = new ArrayList<>();
|
||||
private final List<CraftingTileEntity> storage = new ArrayList<>();
|
||||
private final List<CraftingMonitorTileEntity> status = new ArrayList<>();
|
||||
private final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap<>();
|
||||
private ICraftingLink myLastLink;
|
||||
private ITextComponent myName = null;
|
||||
@@ -150,7 +150,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
|
||||
@Override
|
||||
public void updateStatus(final boolean updateGrid) {
|
||||
for (final TileCraftingTile r : this.tiles) {
|
||||
for (final CraftingTileEntity r : this.tiles) {
|
||||
r.updateMeta(true);
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
|
||||
boolean posted = false;
|
||||
|
||||
for (final TileCraftingTile r : this.tiles) {
|
||||
for (final CraftingTileEntity r : this.tiles) {
|
||||
final IGridNode n = r.getActionableNode();
|
||||
if (n != null && !posted) {
|
||||
final IGrid g = n.getGrid();
|
||||
@@ -183,7 +183,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
return (Iterator) this.tiles.iterator();
|
||||
}
|
||||
|
||||
void addTile(final TileCraftingTile te) {
|
||||
void addTile(final CraftingTileEntity te) {
|
||||
if (this.machineSrc == null || te.isCoreBlock()) {
|
||||
this.machineSrc = new MachineSource(te);
|
||||
}
|
||||
@@ -196,7 +196,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
this.availableStorage += te.getStorageBytes();
|
||||
this.storage.add(te);
|
||||
} else if (te.isStatus()) {
|
||||
this.status.add((TileCraftingMonitorTile) te);
|
||||
this.status.add((CraftingMonitorTileEntity) te);
|
||||
} else if (te.isAccelerator()) {
|
||||
this.accelerator++;
|
||||
}
|
||||
@@ -393,7 +393,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
send = null;
|
||||
}
|
||||
|
||||
for (final TileCraftingMonitorTile t : this.status) {
|
||||
for (final CraftingMonitorTileEntity t : this.status) {
|
||||
t.setJob(send);
|
||||
}
|
||||
}
|
||||
@@ -402,15 +402,15 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
return this.listeners.entrySet().iterator();
|
||||
}
|
||||
|
||||
private TileCraftingTile getCore() {
|
||||
private CraftingTileEntity getCore() {
|
||||
if (this.machineSrc == null) {
|
||||
return null;
|
||||
}
|
||||
return (TileCraftingTile) this.machineSrc.machine().get();
|
||||
return (CraftingTileEntity) this.machineSrc.machine().get();
|
||||
}
|
||||
|
||||
private IGrid getGrid() {
|
||||
for (final TileCraftingTile r : this.tiles) {
|
||||
for (final CraftingTileEntity r : this.tiles) {
|
||||
final IGridNode gn = r.getActionableNode();
|
||||
if (gn != null) {
|
||||
final IGrid g = gn.getGrid();
|
||||
@@ -839,7 +839,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
final TileCraftingTile core = this.getCore();
|
||||
final CraftingTileEntity core = this.getCore();
|
||||
|
||||
if (core == null) {
|
||||
return false;
|
||||
@@ -1024,7 +1024,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
}
|
||||
|
||||
void done() {
|
||||
final TileCraftingTile core = this.getCore();
|
||||
final CraftingTileEntity core = this.getCore();
|
||||
|
||||
core.setCoreBlock(true);
|
||||
|
||||
@@ -1081,7 +1081,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
|
||||
public void updateName() {
|
||||
this.myName = null;
|
||||
for (final TileCraftingTile te : this.tiles) {
|
||||
for (final CraftingTileEntity te : this.tiles) {
|
||||
|
||||
if (te.hasCustomInventoryName()) {
|
||||
if (this.myName != null) {
|
||||
@@ -1120,7 +1120,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
}
|
||||
|
||||
public void breakCluster() {
|
||||
final TileCraftingTile t = this.getCore();
|
||||
final CraftingTileEntity t = this.getCore();
|
||||
|
||||
if (t != null) {
|
||||
t.breakCluster();
|
||||
|
||||
@@ -30,15 +30,15 @@ import appeng.api.util.WorldCoord;
|
||||
import appeng.me.cluster.IAECluster;
|
||||
import appeng.me.cluster.IAEMultiBlock;
|
||||
import appeng.me.cluster.MBCalculator;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
import appeng.tile.qnb.QuantumBridgeTileEntity;
|
||||
|
||||
public class QuantumCalculator extends MBCalculator {
|
||||
|
||||
private final TileQuantumBridge tqb;
|
||||
private final QuantumBridgeTileEntity tqb;
|
||||
|
||||
public QuantumCalculator(final IAEMultiBlock t) {
|
||||
super(t);
|
||||
this.tqb = (TileQuantumBridge) t;
|
||||
this.tqb = (QuantumBridgeTileEntity) t;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,7 +107,7 @@ public class QuantumCalculator extends MBCalculator {
|
||||
for (int x = min.x; x <= max.x; x++) {
|
||||
for (int y = min.y; y <= max.y; y++) {
|
||||
for (int z = min.z; z <= max.z; z++) {
|
||||
final TileQuantumBridge te = (TileQuantumBridge) w.getTileEntity(new BlockPos(x, y, z));
|
||||
final QuantumBridgeTileEntity te = (QuantumBridgeTileEntity) w.getTileEntity(new BlockPos(x, y, z));
|
||||
|
||||
num++;
|
||||
final byte flags;
|
||||
@@ -132,7 +132,7 @@ public class QuantumCalculator extends MBCalculator {
|
||||
|
||||
@Override
|
||||
public boolean isValidTile(final TileEntity te) {
|
||||
return te instanceof TileQuantumBridge;
|
||||
return te instanceof QuantumBridgeTileEntity;
|
||||
}
|
||||
|
||||
private boolean isBlockAtLocation(final IBlockReader w, final BlockPos pos, final IBlockDefinition def) {
|
||||
|
||||
@@ -40,7 +40,7 @@ import appeng.api.util.WorldCoord;
|
||||
import appeng.core.AELog;
|
||||
import appeng.me.cache.helpers.ConnectionWrapper;
|
||||
import appeng.me.cluster.IAECluster;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
import appeng.tile.qnb.QuantumBridgeTileEntity;
|
||||
import appeng.util.iterators.ChainedIterator;
|
||||
|
||||
public class QuantumCluster implements ILocatable, IAECluster {
|
||||
@@ -49,17 +49,17 @@ public class QuantumCluster implements ILocatable, IAECluster {
|
||||
private final WorldCoord max;
|
||||
private boolean isDestroyed = false;
|
||||
private boolean updateStatus = true;
|
||||
private TileQuantumBridge[] Ring;
|
||||
private QuantumBridgeTileEntity[] Ring;
|
||||
private boolean registered = false;
|
||||
private ConnectionWrapper connection;
|
||||
private long thisSide;
|
||||
private long otherSide;
|
||||
private TileQuantumBridge center;
|
||||
private QuantumBridgeTileEntity center;
|
||||
|
||||
public QuantumCluster(final WorldCoord min, final WorldCoord max) {
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
this.setRing(new TileQuantumBridge[8]);
|
||||
this.setRing(new QuantumBridgeTileEntity[8]);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@@ -208,12 +208,12 @@ public class QuantumCluster implements ILocatable, IAECluster {
|
||||
|
||||
this.center.updateStatus(null, (byte) -1, this.isUpdateStatus());
|
||||
|
||||
for (final TileQuantumBridge r : this.getRing()) {
|
||||
for (final QuantumBridgeTileEntity r : this.getRing()) {
|
||||
r.updateStatus(null, (byte) -1, this.isUpdateStatus());
|
||||
}
|
||||
|
||||
this.center = null;
|
||||
this.setRing(new TileQuantumBridge[8]);
|
||||
this.setRing(new QuantumBridgeTileEntity[8]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -222,7 +222,7 @@ public class QuantumCluster implements ILocatable, IAECluster {
|
||||
this.getRing()[4], this.getRing()[5], this.getRing()[6], this.getRing()[7], this.center);
|
||||
}
|
||||
|
||||
public boolean isCorner(final TileQuantumBridge tileQuantumBridge) {
|
||||
public boolean isCorner(final QuantumBridgeTileEntity tileQuantumBridge) {
|
||||
return this.getRing()[0] == tileQuantumBridge || this.getRing()[2] == tileQuantumBridge
|
||||
|| this.getRing()[4] == tileQuantumBridge || this.getRing()[6] == tileQuantumBridge;
|
||||
}
|
||||
@@ -232,11 +232,11 @@ public class QuantumCluster implements ILocatable, IAECluster {
|
||||
return this.thisSide;
|
||||
}
|
||||
|
||||
public TileQuantumBridge getCenter() {
|
||||
public QuantumBridgeTileEntity getCenter() {
|
||||
return this.center;
|
||||
}
|
||||
|
||||
void setCenter(final TileQuantumBridge c) {
|
||||
void setCenter(final QuantumBridgeTileEntity c) {
|
||||
this.registered = true;
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
this.center = c;
|
||||
@@ -250,11 +250,11 @@ public class QuantumCluster implements ILocatable, IAECluster {
|
||||
this.updateStatus = updateStatus;
|
||||
}
|
||||
|
||||
TileQuantumBridge[] getRing() {
|
||||
QuantumBridgeTileEntity[] getRing() {
|
||||
return this.Ring;
|
||||
}
|
||||
|
||||
private void setRing(final TileQuantumBridge[] ring) {
|
||||
private void setRing(final QuantumBridgeTileEntity[] ring) {
|
||||
this.Ring = ring;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,15 +27,15 @@ import appeng.api.util.WorldCoord;
|
||||
import appeng.me.cluster.IAECluster;
|
||||
import appeng.me.cluster.IAEMultiBlock;
|
||||
import appeng.me.cluster.MBCalculator;
|
||||
import appeng.tile.spatial.TileSpatialPylon;
|
||||
import appeng.tile.spatial.SpatialPylonTileEntity;
|
||||
|
||||
public class SpatialPylonCalculator extends MBCalculator {
|
||||
|
||||
private final TileSpatialPylon tqb;
|
||||
private final SpatialPylonTileEntity tqb;
|
||||
|
||||
public SpatialPylonCalculator(final IAEMultiBlock t) {
|
||||
super(t);
|
||||
this.tqb = (TileSpatialPylon) t;
|
||||
this.tqb = (SpatialPylonTileEntity) t;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,7 +81,7 @@ public class SpatialPylonCalculator extends MBCalculator {
|
||||
for (int x = min.x; x <= max.x; x++) {
|
||||
for (int y = min.y; y <= max.y; y++) {
|
||||
for (int z = min.z; z <= max.z; z++) {
|
||||
final TileSpatialPylon te = (TileSpatialPylon) w.getTileEntity(new BlockPos(x, y, z));
|
||||
final SpatialPylonTileEntity te = (SpatialPylonTileEntity) w.getTileEntity(new BlockPos(x, y, z));
|
||||
te.updateStatus(c);
|
||||
c.getLine().add((te));
|
||||
}
|
||||
@@ -91,6 +91,6 @@ public class SpatialPylonCalculator extends MBCalculator {
|
||||
|
||||
@Override
|
||||
public boolean isValidTile(final TileEntity te) {
|
||||
return te instanceof TileSpatialPylon;
|
||||
return te instanceof SpatialPylonTileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,13 +25,13 @@ import java.util.List;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.me.cluster.IAECluster;
|
||||
import appeng.tile.spatial.TileSpatialPylon;
|
||||
import appeng.tile.spatial.SpatialPylonTileEntity;
|
||||
|
||||
public class SpatialPylonCluster implements IAECluster {
|
||||
|
||||
private final DimensionalCoord min;
|
||||
private final DimensionalCoord max;
|
||||
private final List<TileSpatialPylon> line = new ArrayList<>();
|
||||
private final List<SpatialPylonTileEntity> line = new ArrayList<>();
|
||||
private boolean isDestroyed = false;
|
||||
|
||||
private Axis currentAxis = Axis.UNFORMED;
|
||||
@@ -54,7 +54,7 @@ public class SpatialPylonCluster implements IAECluster {
|
||||
|
||||
@Override
|
||||
public void updateStatus(final boolean updateGrid) {
|
||||
for (final TileSpatialPylon r : this.getLine()) {
|
||||
for (final SpatialPylonTileEntity r : this.getLine()) {
|
||||
r.recalculateDisplay();
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public class SpatialPylonCluster implements IAECluster {
|
||||
}
|
||||
this.isDestroyed = true;
|
||||
|
||||
for (final TileSpatialPylon r : this.getLine()) {
|
||||
for (final SpatialPylonTileEntity r : this.getLine()) {
|
||||
r.updateStatus(null);
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public class SpatialPylonCluster implements IAECluster {
|
||||
return this.min;
|
||||
}
|
||||
|
||||
List<TileSpatialPylon> getLine() {
|
||||
List<SpatialPylonTileEntity> getLine() {
|
||||
return this.line;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ import appeng.core.worlddata.WorldData;
|
||||
import appeng.hooks.TickHandler;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.cache.P2PCache;
|
||||
import appeng.parts.networking.PartCable;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.parts.networking.CablePart;
|
||||
import appeng.tile.AEBaseTileEntity;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class AENetworkProxy implements IGridBlock {
|
||||
@@ -95,8 +95,8 @@ public class AENetworkProxy implements IGridBlock {
|
||||
}
|
||||
|
||||
public void validate() {
|
||||
if (this.gp instanceof AEBaseTile) {
|
||||
TickHandler.INSTANCE.addInit((AEBaseTile) this.gp);
|
||||
if (this.gp instanceof AEBaseTileEntity) {
|
||||
TickHandler.INSTANCE.addInit((AEBaseTileEntity) this.gp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,8 +280,8 @@ public class AENetworkProxy implements IGridBlock {
|
||||
|
||||
@Override
|
||||
public void onGridNotification(final GridNotification notification) {
|
||||
if (this.gp instanceof PartCable) {
|
||||
((PartCable) this.gp).markForUpdate();
|
||||
if (this.gp instanceof CablePart) {
|
||||
((CablePart) this.gp).markForUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.IGridVisitor;
|
||||
import appeng.tile.networking.TileController;
|
||||
import appeng.tile.networking.ControllerTileEntity;
|
||||
|
||||
public class ControllerValidator implements IGridVisitor {
|
||||
|
||||
@@ -48,8 +48,8 @@ public class ControllerValidator implements IGridVisitor {
|
||||
@Override
|
||||
public boolean visitNode(final IGridNode n) {
|
||||
final IGridHost host = n.getMachine();
|
||||
if (this.isValid() && host instanceof TileController) {
|
||||
final TileController c = (TileController) host;
|
||||
if (this.isValid() && host instanceof ControllerTileEntity) {
|
||||
final ControllerTileEntity c = (ControllerTileEntity) host;
|
||||
|
||||
final BlockPos pos = c.getPos();
|
||||
|
||||
|
||||
@@ -32,15 +32,15 @@ import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.tile.misc.TileSecurityStation;
|
||||
import appeng.tile.misc.SecurityStationTileEntity;
|
||||
|
||||
public class SecurityStationInventory implements IMEInventoryHandler<IAEItemStack> {
|
||||
|
||||
private final IItemList<IAEItemStack> storedItems = AEApi.instance().storage()
|
||||
.getStorageChannel(IItemStorageChannel.class).createList();
|
||||
private final TileSecurityStation securityTile;
|
||||
private final SecurityStationTileEntity securityTile;
|
||||
|
||||
public SecurityStationInventory(final TileSecurityStation ts) {
|
||||
public SecurityStationInventory(final SecurityStationTileEntity ts) {
|
||||
this.securityTile = ts;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user