Fabric port in progress

This commit is contained in:
Sebastian Hartte
2020-06-27 23:25:38 +02:00
parent 80fbb58d4f
commit b79cd732b2
368 changed files with 2498 additions and 2698 deletions
+1 -1
View File
@@ -426,7 +426,7 @@ public class GridNode implements IGridNode, IPathItem {
private IGridHost findGridHost(final WorldAccess world, final int x, final int y, final int z) {
final BlockPos pos = new BlockPos(x, y, z);
if (world.isBlockLoaded(pos)) {
final BlockEntity te = world.getTileEntity(pos);
final BlockEntity te = world.getBlockEntity(pos);
if (te instanceof IGridHost) {
return (IGridHost) te;
}
+6 -6
View File
@@ -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.CraftingStorageTileEntity;
import appeng.tile.crafting.CraftingTileEntity;
import appeng.tile.crafting.CraftingStorageBlockEntity;
import appeng.tile.crafting.CraftingBlockEntity;
public class CraftingGridCache
implements ICraftingGrid, ICraftingProviderHelper, ICellProvider, IMEInventoryHandler<IAEItemStack> {
@@ -163,7 +163,7 @@ public class CraftingGridCache
}
}
if (machine instanceof CraftingTileEntity) {
if (machine instanceof CraftingBlockEntity) {
this.updateList = true;
}
@@ -190,7 +190,7 @@ public class CraftingGridCache
}
}
if (machine instanceof CraftingTileEntity) {
if (machine instanceof CraftingBlockEntity) {
this.updateList = true;
}
@@ -264,8 +264,8 @@ public class CraftingGridCache
private void updateCPUClusters() {
this.craftingCPUClusters.clear();
for (final IGridNode cst : this.grid.getMachines(CraftingStorageTileEntity.class)) {
final CraftingStorageTileEntity tile = (CraftingStorageTileEntity) cst.getMachine();
for (final IGridNode cst : this.grid.getMachines(CraftingStorageBlockEntity.class)) {
final CraftingStorageBlockEntity tile = (CraftingStorageBlockEntity) cst.getMachine();
final CraftingCPUCluster cluster = (CraftingCPUCluster) tile.getCluster();
if (cluster != null) {
this.craftingCPUClusters.add(cluster);
+10 -10
View File
@@ -26,7 +26,7 @@ import java.util.List;
import java.util.Set;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.server.network.ServerPlayerEntity;
import appeng.api.AEApi;
import appeng.api.features.AEFeature;
@@ -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.ControllerTileEntity;
import appeng.tile.networking.ControllerBlockEntity;
public class PathGridCache implements IPathingGrid {
private final List<PathSegment> active = new ArrayList<>();
private final Set<ControllerTileEntity> controllers = new HashSet<>();
private final Set<ControllerBlockEntity> 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(ControllerTileEntity.class)) {
for (final IGridNode node : this.myGrid.getMachines(ControllerBlockEntity.class)) {
closedList.add((IPathItem) node);
for (final IGridConnection gcc : node.getConnections()) {
final GridConnection gc = (GridConnection) gcc;
if (!(gc.getOtherSide(node).getMachine() instanceof ControllerTileEntity)) {
if (!(gc.getOtherSide(node).getMachine() instanceof ControllerBlockEntity)) {
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<ControllerTileEntity> controllerIterator = this.controllers.iterator();
final Iterator<ControllerBlockEntity> controllerIterator = this.controllers.iterator();
if (controllerIterator.hasNext()) {
final ControllerTileEntity controller = controllerIterator.next();
final ControllerBlockEntity 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 ControllerTileEntity) {
if (machine instanceof ControllerBlockEntity) {
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 ControllerTileEntity) {
this.controllers.add((ControllerTileEntity) machine);
if (machine instanceof ControllerBlockEntity) {
this.controllers.add((ControllerBlockEntity) machine);
this.recalculateControllerNextTick = true;
}
+7 -7
View File
@@ -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.SpatialIOPortTileEntity;
import appeng.tile.spatial.SpatialPylonTileEntity;
import appeng.tile.spatial.SpatialIOPortBlockEntity;
import appeng.tile.spatial.SpatialPylonBlockEntity;
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<SpatialIOPortTileEntity> ioPorts = new ArrayList<>();
private List<SpatialIOPortBlockEntity> 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(SpatialIOPortTileEntity.class)) {
this.ioPorts.add((SpatialIOPortTileEntity) gm.getMachine());
for (final IGridNode gm : grid.getMachines(SpatialIOPortBlockEntity.class)) {
this.ioPorts.add((SpatialIOPortBlockEntity) gm.getMachine());
}
final IReadOnlyCollection<IGridNode> set = grid.getMachines(SpatialPylonTileEntity.class);
final IReadOnlyCollection<IGridNode> set = grid.getMachines(SpatialPylonBlockEntity.class);
for (final IGridNode gm : set) {
if (gm.meetsChannelRequirements()) {
final SpatialPylonCluster c = ((SpatialPylonTileEntity) gm.getMachine()).getCluster();
final SpatialPylonCluster c = ((SpatialPylonBlockEntity) gm.getMachine()).getCluster();
if (c != null) {
this.clusters.put(c, c);
}
@@ -100,7 +100,7 @@ public abstract class MBCalculator {
}
private boolean isValidTileAt(final World w, final int x, final int y, final int z) {
return this.isValidTile(w.getTileEntity(new BlockPos(x, y, z)));
return this.isValidTile(w.getBlockEntity(new BlockPos(x, y, z)));
}
/**
@@ -194,7 +194,7 @@ public abstract class MBCalculator {
for (int x = minX; x <= maxX; x++) {
for (int y = minY; y <= maxY; y++) {
for (int z = minZ; z <= maxZ; z++) {
final BlockEntity te = w.getTileEntity(new BlockPos(x, y, z));
final BlockEntity te = w.getBlockEntity(new BlockPos(x, y, z));
if (this.isValidTile(te)) {
return true;
}
@@ -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.CraftingTileEntity;
import appeng.tile.crafting.CraftingBlockEntity;
public class CraftingCPUCalculator extends MBCalculator {
private final CraftingTileEntity tqb;
private final CraftingBlockEntity tqb;
public CraftingCPUCalculator(final IAEMultiBlock t) {
super(t);
this.tqb = (CraftingTileEntity) t;
this.tqb = (CraftingBlockEntity) t;
}
@Override
@@ -73,14 +73,14 @@ 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 IAEMultiBlock te = (IAEMultiBlock) w.getTileEntity(new BlockPos(x, y, z));
final IAEMultiBlock te = (IAEMultiBlock) w.getBlockEntity(new BlockPos(x, y, z));
if (!te.isValid()) {
return false;
}
if (!storage && te instanceof CraftingTileEntity) {
storage = ((CraftingTileEntity) te).getStorageBytes() > 0;
if (!storage && te instanceof CraftingBlockEntity) {
storage = ((CraftingBlockEntity) 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 CraftingTileEntity te = (CraftingTileEntity) w.getTileEntity(new BlockPos(x, y, z));
final CraftingBlockEntity te = (CraftingBlockEntity) w.getBlockEntity(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 BlockEntity te) {
return te instanceof CraftingTileEntity;
return te instanceof CraftingBlockEntity;
}
}
@@ -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.CraftingMonitorTileEntity;
import appeng.tile.crafting.CraftingTileEntity;
import appeng.tile.crafting.CraftingMonitorBlockEntity;
import appeng.tile.crafting.CraftingBlockEntity;
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<CraftingTileEntity> tiles = new ArrayList<>();
private final List<CraftingTileEntity> storage = new ArrayList<>();
private final List<CraftingMonitorTileEntity> status = new ArrayList<>();
private final List<CraftingBlockEntity> tiles = new ArrayList<>();
private final List<CraftingBlockEntity> storage = new ArrayList<>();
private final List<CraftingMonitorBlockEntity> status = new ArrayList<>();
private final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap<>();
private ICraftingLink myLastLink;
private Text myName = null;
@@ -150,7 +150,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
@Override
public void updateStatus(final boolean updateGrid) {
for (final CraftingTileEntity r : this.tiles) {
for (final CraftingBlockEntity r : this.tiles) {
r.updateMeta(true);
}
}
@@ -164,7 +164,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
boolean posted = false;
for (final CraftingTileEntity r : this.tiles) {
for (final CraftingBlockEntity 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 CraftingTileEntity te) {
void addTile(final CraftingBlockEntity 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((CraftingMonitorTileEntity) te);
this.status.add((CraftingMonitorBlockEntity) te);
} else if (te.isAccelerator()) {
this.accelerator++;
}
@@ -393,7 +393,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
send = null;
}
for (final CraftingMonitorTileEntity t : this.status) {
for (final CraftingMonitorBlockEntity t : this.status) {
t.setJob(send);
}
}
@@ -402,15 +402,15 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
return this.listeners.entrySet().iterator();
}
private CraftingTileEntity getCore() {
private CraftingBlockEntity getCore() {
if (this.machineSrc == null) {
return null;
}
return (CraftingTileEntity) this.machineSrc.machine().get();
return (CraftingBlockEntity) this.machineSrc.machine().get();
}
private IGrid getGrid() {
for (final CraftingTileEntity r : this.tiles) {
for (final CraftingBlockEntity 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 CraftingTileEntity core = this.getCore();
final CraftingBlockEntity core = this.getCore();
if (core == null) {
return false;
@@ -1024,7 +1024,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
}
void done() {
final CraftingTileEntity core = this.getCore();
final CraftingBlockEntity core = this.getCore();
core.setCoreBlock(true);
@@ -1081,11 +1081,11 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
public void updateName() {
this.myName = null;
for (final CraftingTileEntity te : this.tiles) {
for (final CraftingBlockEntity te : this.tiles) {
if (te.hasCustomInventoryName()) {
if (this.myName != null) {
this.myName.appendText(" ").appendSibling(te.getCustomInventoryName());
this.myName.append(" ").append(te.getCustomInventoryName());
} else {
this.myName = te.getCustomInventoryName().deepCopy();
}
@@ -1120,7 +1120,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
}
public void breakCluster() {
final CraftingTileEntity t = this.getCore();
final CraftingBlockEntity 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.QuantumBridgeTileEntity;
import appeng.tile.qnb.QuantumBridgeBlockEntity;
public class QuantumCalculator extends MBCalculator {
private final QuantumBridgeTileEntity tqb;
private final QuantumBridgeBlockEntity tqb;
public QuantumCalculator(final IAEMultiBlock t) {
super(t);
this.tqb = (QuantumBridgeTileEntity) t;
this.tqb = (QuantumBridgeBlockEntity) t;
}
@Override
@@ -70,7 +70,7 @@ public class QuantumCalculator extends MBCalculator {
for (int y = min.y; y <= max.y; y++) {
for (int z = min.z; z <= max.z; z++) {
final BlockPos p = new BlockPos(x, y, z);
final IAEMultiBlock te = (IAEMultiBlock) w.getTileEntity(p);
final IAEMultiBlock te = (IAEMultiBlock) w.getBlockEntity(p);
if (!te.isValid()) {
return false;
@@ -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 QuantumBridgeTileEntity te = (QuantumBridgeTileEntity) w.getTileEntity(new BlockPos(x, y, z));
final QuantumBridgeBlockEntity te = (QuantumBridgeBlockEntity) w.getBlockEntity(new BlockPos(x, y, z));
num++;
final byte flags;
@@ -132,7 +132,7 @@ public class QuantumCalculator extends MBCalculator {
@Override
public boolean isValidTile(final BlockEntity te) {
return te instanceof QuantumBridgeTileEntity;
return te instanceof QuantumBridgeBlockEntity;
}
private boolean isBlockAtLocation(final BlockView 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.QuantumBridgeTileEntity;
import appeng.tile.qnb.QuantumBridgeBlockEntity;
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 QuantumBridgeTileEntity[] Ring;
private QuantumBridgeBlockEntity[] Ring;
private boolean registered = false;
private ConnectionWrapper connection;
private long thisSide;
private long otherSide;
private QuantumBridgeTileEntity center;
private QuantumBridgeBlockEntity center;
public QuantumCluster(final WorldCoord min, final WorldCoord max) {
this.min = min;
this.max = max;
this.setRing(new QuantumBridgeTileEntity[8]);
this.setRing(new QuantumBridgeBlockEntity[8]);
}
@SubscribeEvent
@@ -165,7 +165,7 @@ public class QuantumCluster implements ILocatable, IAECluster {
final DimensionType id = theWorld.dimension.getType();
final World cur = theWorld.getServer().getWorld(id);
final BlockEntity te = theWorld.getTileEntity(qc.center.getPos());
final BlockEntity te = theWorld.getBlockEntity(qc.center.getPos());
return te != qc.center || theWorld != cur;
}
}
@@ -208,12 +208,12 @@ public class QuantumCluster implements ILocatable, IAECluster {
this.center.updateStatus(null, (byte) -1, this.isUpdateStatus());
for (final QuantumBridgeTileEntity r : this.getRing()) {
for (final QuantumBridgeBlockEntity r : this.getRing()) {
r.updateStatus(null, (byte) -1, this.isUpdateStatus());
}
this.center = null;
this.setRing(new QuantumBridgeTileEntity[8]);
this.setRing(new QuantumBridgeBlockEntity[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 QuantumBridgeTileEntity tileQuantumBridge) {
public boolean isCorner(final QuantumBridgeBlockEntity 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 QuantumBridgeTileEntity getCenter() {
public QuantumBridgeBlockEntity getCenter() {
return this.center;
}
void setCenter(final QuantumBridgeTileEntity c) {
void setCenter(final QuantumBridgeBlockEntity 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;
}
QuantumBridgeTileEntity[] getRing() {
QuantumBridgeBlockEntity[] getRing() {
return this.Ring;
}
private void setRing(final QuantumBridgeTileEntity[] ring) {
private void setRing(final QuantumBridgeBlockEntity[] 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.SpatialPylonTileEntity;
import appeng.tile.spatial.SpatialPylonBlockEntity;
public class SpatialPylonCalculator extends MBCalculator {
private final SpatialPylonTileEntity tqb;
private final SpatialPylonBlockEntity tqb;
public SpatialPylonCalculator(final IAEMultiBlock t) {
super(t);
this.tqb = (SpatialPylonTileEntity) t;
this.tqb = (SpatialPylonBlockEntity) t;
}
@Override
@@ -57,7 +57,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 IAEMultiBlock te = (IAEMultiBlock) w.getTileEntity(new BlockPos(x, y, z));
final IAEMultiBlock te = (IAEMultiBlock) w.getBlockEntity(new BlockPos(x, y, z));
if (!te.isValid()) {
return false;
@@ -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 SpatialPylonTileEntity te = (SpatialPylonTileEntity) w.getTileEntity(new BlockPos(x, y, z));
final SpatialPylonBlockEntity te = (SpatialPylonBlockEntity) w.getBlockEntity(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 BlockEntity te) {
return te instanceof SpatialPylonTileEntity;
return te instanceof SpatialPylonBlockEntity;
}
}
@@ -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.SpatialPylonTileEntity;
import appeng.tile.spatial.SpatialPylonBlockEntity;
public class SpatialPylonCluster implements IAECluster {
private final DimensionalCoord min;
private final DimensionalCoord max;
private final List<SpatialPylonTileEntity> line = new ArrayList<>();
private final List<SpatialPylonBlockEntity> 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 SpatialPylonTileEntity r : this.getLine()) {
for (final SpatialPylonBlockEntity r : this.getLine()) {
r.recalculateDisplay();
}
}
@@ -67,7 +67,7 @@ public class SpatialPylonCluster implements IAECluster {
}
this.isDestroyed = true;
for (final SpatialPylonTileEntity r : this.getLine()) {
for (final SpatialPylonBlockEntity r : this.getLine()) {
r.updateStatus(null);
}
}
@@ -105,7 +105,7 @@ public class SpatialPylonCluster implements IAECluster {
return this.min;
}
List<SpatialPylonTileEntity> getLine() {
List<SpatialPylonBlockEntity> getLine() {
return this.line;
}
@@ -50,7 +50,7 @@ import appeng.hooks.TickHandler;
import appeng.me.GridAccessException;
import appeng.me.cache.P2PCache;
import appeng.parts.networking.CablePart;
import appeng.tile.AEBaseTileEntity;
import appeng.tile.AEBaseBlockEntity;
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 AEBaseTileEntity) {
TickHandler.INSTANCE.addInit((AEBaseTileEntity) this.gp);
if (this.gp instanceof AEBaseBlockEntity) {
TickHandler.INSTANCE.addInit((AEBaseBlockEntity) this.gp);
}
}
@@ -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.ControllerTileEntity;
import appeng.tile.networking.ControllerBlockEntity;
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 ControllerTileEntity) {
final ControllerTileEntity c = (ControllerTileEntity) host;
if (this.isValid() && host instanceof ControllerBlockEntity) {
final ControllerBlockEntity c = (ControllerBlockEntity) 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.SecurityStationTileEntity;
import appeng.tile.misc.SecurityStationBlockEntity;
public class SecurityStationInventory implements IMEInventoryHandler<IAEItemStack> {
private final IItemList<IAEItemStack> storedItems = AEApi.instance().storage()
.getStorageChannel(IItemStorageChannel.class).createList();
private final SecurityStationTileEntity securityTile;
private final SecurityStationBlockEntity securityTile;
public SecurityStationInventory(final SecurityStationTileEntity ts) {
public SecurityStationInventory(final SecurityStationBlockEntity ts) {
this.securityTile = ts;
}