Removed several unchecked casts.
This commit is contained in:
@@ -47,5 +47,5 @@ public interface IAECluster {
|
||||
*/
|
||||
boolean isDestroyed();
|
||||
|
||||
Iterator<IGridHost> getTiles();
|
||||
Iterator<? extends IGridHost> getTiles();
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class CraftingCPUCalculator extends MBCalculator<CraftingTileEntity, Craf
|
||||
|
||||
c.done();
|
||||
|
||||
final Iterator<IGridHost> i = c.getTiles();
|
||||
final Iterator<CraftingTileEntity> i = c.getTiles();
|
||||
while (i.hasNext()) {
|
||||
final IGridHost gh = i.next();
|
||||
final IGridNode n = gh.getGridNode(AEPartLocation.INTERNAL);
|
||||
|
||||
@@ -185,8 +185,8 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<IGridHost> getTiles() {
|
||||
return (Iterator) this.tiles.iterator();
|
||||
public Iterator<CraftingTileEntity> getTiles() {
|
||||
return this.tiles.iterator();
|
||||
}
|
||||
|
||||
void addTile(final CraftingTileEntity te) {
|
||||
|
||||
@@ -33,7 +33,6 @@ import appeng.api.events.LocatableEventAnnounce;
|
||||
import appeng.api.events.LocatableEventAnnounce.LocatableEvent;
|
||||
import appeng.api.exceptions.FailedConnectionException;
|
||||
import appeng.api.features.ILocatable;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.core.AELog;
|
||||
@@ -238,7 +237,7 @@ public class QuantumCluster implements ILocatable, IAECluster {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<IGridHost> getTiles() {
|
||||
public Iterator<QuantumBridgeTileEntity> getTiles() {
|
||||
return new ChainedIterator<>(this.getRing()[0], this.getRing()[1], this.getRing()[2], this.getRing()[3],
|
||||
this.getRing()[4], this.getRing()[5], this.getRing()[6], this.getRing()[7], this.center);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.List;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.me.cluster.IAECluster;
|
||||
import appeng.me.cluster.MBCalculator;
|
||||
import appeng.tile.spatial.SpatialPylonTileEntity;
|
||||
@@ -88,8 +87,8 @@ public class SpatialPylonCluster implements IAECluster {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<IGridHost> getTiles() {
|
||||
return (Iterator) this.getLine().iterator();
|
||||
public Iterator<SpatialPylonTileEntity> getTiles() {
|
||||
return this.getLine().iterator();
|
||||
}
|
||||
|
||||
public int tileCount() {
|
||||
|
||||
@@ -41,11 +41,10 @@ public class AENetworkProxyMultiblock extends AENetworkProxy implements IGridMul
|
||||
if (this.getCluster() == null) {
|
||||
return new ChainedIterator<>();
|
||||
}
|
||||
|
||||
return new ProxyNodeIterator(this.getCluster().getTiles());
|
||||
}
|
||||
|
||||
private IAECluster getCluster() {
|
||||
return ((IAEMultiBlock) this.getMachine()).getCluster();
|
||||
return ((IAEMultiBlock<?>) this.getMachine()).getCluster();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user