begin refactoring internal TileGenericPipe usage to IPipeTile

This commit is contained in:
asiekierka 2014-12-29 12:23:24 +01:00
parent 8fba5bb6a1
commit e489b7857a
16 changed files with 91 additions and 79 deletions

View file

@ -642,7 +642,7 @@ public class BlockGenericPipe extends BlockBuildCraft {
}
} else if (currentItem.getItem() == Items.water_bucket) {
if (!world.isRemote) {
pipe.container.setColor(-1);
pipe.container.setPipeColor(-1);
}
return true;
} else if (currentItem.getItem() instanceof IPipePluggableItem) {
@ -1101,7 +1101,7 @@ public class BlockGenericPipe extends BlockBuildCraft {
public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour) {
TileGenericPipe pipeTile = (TileGenericPipe) world.getTileEntity(x, y, z);
if (!pipeTile.hasBlockingPluggable(side)) {
return pipeTile.setColor(colour);
return pipeTile.setPipeColor(colour);
}
return false;

View file

@ -97,8 +97,8 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
Pipe<?> otherPipe;
if (tile instanceof TileGenericPipe) {
otherPipe = ((TileGenericPipe) tile).pipe;
if (tile instanceof IPipeTile) {
otherPipe = (Pipe<?>) ((IPipeTile)tile).getPipe();
if (!BlockGenericPipe.isFullyDefined(otherPipe)) {
return false;
}
@ -221,12 +221,13 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) {
TileEntity tile = container.getTile(o);
if (tile instanceof TileGenericPipe) {
TileGenericPipe tilePipe = (TileGenericPipe) tile;
if (tile instanceof IPipeTile) {
IPipeTile tilePipe = (IPipeTile) tile;
Pipe<?> pipe = (Pipe<?>) tilePipe.getPipe();
if (BlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
if (BlockGenericPipe.isFullyDefined(pipe)) {
if (isWireConnectedTo(tile, color)) {
foundBiggerSignal |= receiveSignal(tilePipe.pipe.signalStrength[color.ordinal()] - 1, color);
foundBiggerSignal |= receiveSignal(pipe.signalStrength[color.ordinal()] - 1, color);
}
}
}
@ -240,11 +241,12 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) {
TileEntity tile = container.getTile(o);
if (tile instanceof TileGenericPipe) {
TileGenericPipe tilePipe = (TileGenericPipe) tile;
if (tile instanceof IPipeTile) {
IPipeTile tilePipe = (IPipeTile) tile;
Pipe<?> pipe = (Pipe<?>) tilePipe.getPipe();
if (BlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
tilePipe.pipe.internalUpdateScheduled = true;
if (BlockGenericPipe.isFullyDefined(pipe)) {
pipe.internalUpdateScheduled = true;
}
}
}
@ -282,12 +284,13 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) {
TileEntity tile = container.getTile(o);
if (tile instanceof TileGenericPipe) {
TileGenericPipe tilePipe = (TileGenericPipe) tile;
if (tile instanceof IPipeTile) {
IPipeTile tilePipe = (IPipeTile) tile;
Pipe<?> pipe = (Pipe<?>) tilePipe.getPipe();
if (BlockGenericPipe.isFullyDefined(tilePipe.pipe) && tilePipe.pipe.wireSet[wire.ordinal()]) {
if (BlockGenericPipe.isFullyDefined(pipe) && pipe.wireSet[wire.ordinal()]) {
if (isWireConnectedTo(tile, wire)) {
tilePipe.pipe.receiveSignal(signalStrength[wire.ordinal()] - 1, wire);
pipe.receiveSignal(signalStrength[wire.ordinal()] - 1, wire);
}
}
}
@ -366,7 +369,7 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
TileEntity tile = container.getTile(o);
if (tile instanceof TileGenericPipe && container.isPipeConnected(o)) {
if (tile instanceof IPipeTile && container.isPipeConnected(o)) {
return 0;
} else {
return getMaxRedstoneOutput(o);
@ -472,21 +475,21 @@ public abstract class Pipe<T extends PipeTransport> implements IDropControlInven
}
public boolean isWireConnectedTo(TileEntity tile, PipeWire color) {
if (!(tile instanceof TileGenericPipe)) {
if (!(tile instanceof IPipeTile)) {
return false;
}
TileGenericPipe tilePipe = (TileGenericPipe) tile;
Pipe<?> pipe = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (!BlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
if (!BlockGenericPipe.isFullyDefined(pipe)) {
return false;
}
if (!tilePipe.pipe.wireSet[color.ordinal()]) {
if (!pipe.wireSet[color.ordinal()]) {
return false;
}
return tilePipe.pipe.transport instanceof PipeTransportStructure || transport instanceof PipeTransportStructure
return pipe.transport instanceof PipeTransportStructure || transport instanceof PipeTransportStructure
|| Utils.checkPipesConnections(
container, tile);
}

View file

@ -27,6 +27,7 @@ import net.minecraftforge.fluids.IFluidHandler;
import buildcraft.BuildCraftCore;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.SafeTimeTracker;
import buildcraft.api.transport.IPipe;
import buildcraft.api.transport.IPipeTile;
import buildcraft.core.DefaultProps;
import buildcraft.core.utils.MathUtils;
@ -195,21 +196,21 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler
}
private boolean canReceiveFluid(ForgeDirection o) {
TileEntity entity = container.getTile(o);
TileEntity tile = container.getTile(o);
if (!container.isPipeConnected(o)) {
return false;
}
if (entity instanceof TileGenericPipe) {
Pipe<?> pipe = ((TileGenericPipe) entity).pipe;
if (tile instanceof IPipeTile) {
Pipe<?> pipe = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (pipe == null || !inputOpen(o.getOpposite())) {
return false;
}
}
if (entity instanceof IFluidHandler) {
if (tile instanceof IFluidHandler) {
return true;
}
@ -535,8 +536,8 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler
@Override
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
if (tile instanceof TileGenericPipe) {
Pipe<?> pipe2 = ((TileGenericPipe) tile).pipe;
if (tile instanceof IPipeTile) {
Pipe<?> pipe2 = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (BlockGenericPipe.isValid(pipe2) && !(pipe2.transport instanceof PipeTransportFluids)) {
return false;
}
@ -552,7 +553,7 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler
return true;
}
return tile instanceof TileGenericPipe;
return tile instanceof IPipeTile;
}
/**

View file

@ -228,11 +228,11 @@ public class PipeTransportItems extends PipeTransport {
return false;
}
if (entity instanceof TileGenericPipe) {
TileGenericPipe pipe = (TileGenericPipe) entity;
if (entity instanceof IPipeTile) {
Pipe<?> pipe = (Pipe<?>) ((IPipeTile) entity).getPipe();
//return !pipe.pipe.isClosed() && pipe.pipe.transport instanceof PipeTransportItems;
return pipe.pipe.inputOpen(o.getOpposite()) && pipe.pipe.transport instanceof PipeTransportItems;
return pipe.inputOpen(o.getOpposite()) && pipe.transport instanceof PipeTransportItems;
} else if (entity instanceof IInventory && item.getInsertionHandler().canInsertItem(item, (IInventory) entity)) {
if (Transactor.getTransactorFor(entity).add(item.getItemStack(), o.getOpposite(), false).stackSize > 0) {
return true;
@ -300,10 +300,10 @@ public class PipeTransportItems extends PipeTransport {
}
private boolean passToNextPipe(TravelingItem item, TileEntity tile) {
if (tile instanceof TileGenericPipe) {
TileGenericPipe pipe = (TileGenericPipe) tile;
if (BlockGenericPipe.isValid(pipe.pipe) && pipe.pipe.transport instanceof PipeTransportItems) {
((PipeTransportItems) pipe.pipe.transport).injectItem(item, item.output);
if (tile instanceof IPipeTile) {
Pipe<?> pipe = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (BlockGenericPipe.isValid(pipe) && pipe.transport instanceof PipeTransportItems) {
((PipeTransportItems) pipe.transport).injectItem(item, item.output);
return true;
}
}
@ -474,8 +474,8 @@ public class PipeTransportItems extends PipeTransport {
@Override
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
if (tile instanceof TileGenericPipe) {
Pipe<?> pipe2 = ((TileGenericPipe) tile).pipe;
if (tile instanceof IPipeTile) {
Pipe<?> pipe2 = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (BlockGenericPipe.isValid(pipe2) && !(pipe2.transport instanceof PipeTransportItems)) {
return false;
}
@ -486,7 +486,7 @@ public class PipeTransportItems extends PipeTransport {
return slots != null && slots.length > 0;
}
return tile instanceof TileGenericPipe || (tile instanceof IInventory && ((IInventory) tile).getSizeInventory() > 0);
return tile instanceof IPipeTile || (tile instanceof IInventory && ((IInventory) tile).getSizeInventory() > 0);
}
/**

View file

@ -88,8 +88,8 @@ public class PipeTransportPower extends PipeTransport {
@Override
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
if (tile instanceof TileGenericPipe) {
Pipe<?> pipe2 = ((TileGenericPipe) tile).pipe;
if (tile instanceof IPipeTile) {
Pipe<?> pipe2 = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (BlockGenericPipe.isValid(pipe2) && !(pipe2.transport instanceof PipeTransportPower)) {
return false;
}
@ -222,11 +222,11 @@ public class PipeTransportPower extends PipeTransport {
int powerConsumed = powerQuery[out] * totalPowerContained / totalPowerQuery;
boolean tilePowered = false;
if (tiles[out] instanceof TileGenericPipe) {
if (tiles[out] instanceof IPipeTile) {
// Transmit power to the nearby pipe
TileGenericPipe nearbyTile = (TileGenericPipe) tiles[out];
PipeTransportPower nearbyTransport = (PipeTransportPower) nearbyTile.pipe.transport;
Pipe<?> nearbyPipe = (Pipe<?>) ((IPipeTile) tiles[out]).getPipe();
PipeTransportPower nearbyTransport = (PipeTransportPower) nearbyPipe.transport;
powerConsumed = nearbyTransport.receiveEnergy(
ForgeDirection.VALID_DIRECTIONS[out].getOpposite(),
powerConsumed);
@ -305,7 +305,7 @@ public class PipeTransportPower extends PipeTransport {
TileEntity tile = tiles [dir.ordinal()];
if (tile instanceof TileGenericPipe && ((TileGenericPipe) tile).pipe.transport instanceof PipeTransportPower) {
if (tile instanceof IPipeTile && ((Pipe<?>) ((IPipeTile) tile).getPipe()).transport instanceof PipeTransportPower) {
continue;
}
@ -357,14 +357,14 @@ public class PipeTransportPower extends PipeTransport {
if (tiles[i] != null) {
TileEntity entity = tiles[i];
if (entity instanceof TileGenericPipe) {
TileGenericPipe nearbyTile = (TileGenericPipe) entity;
if (entity instanceof IPipeTile) {
Pipe<?> nearbyPipe = (Pipe<?>) ((IPipeTile) entity).getPipe();
if (nearbyTile.pipe == null) {
if (nearbyPipe == null) {
continue;
}
PipeTransportPower nearbyTransport = (PipeTransportPower) nearbyTile.pipe.transport;
PipeTransportPower nearbyTransport = (PipeTransportPower) nearbyPipe.transport;
nearbyTransport.requestEnergy(ForgeDirection.VALID_DIRECTIONS[i].getOpposite(), transferQuery[i]);
}
}

View file

@ -23,8 +23,8 @@ public class PipeTransportStructure extends PipeTransport {
@Override
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
if (tile instanceof TileGenericPipe) {
Pipe<?> pipe2 = ((TileGenericPipe) tile).pipe;
if (tile instanceof IPipeTile) {
Pipe<?> pipe2 = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (BlockGenericPipe.isValid(pipe2) && !(pipe2.transport instanceof PipeTransportStructure)) {
return false;

View file

@ -431,19 +431,19 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
public void initializeFromItemMetadata(int i) {
if (i >= 1 && i <= 16) {
setColor((i - 1) & 15);
setPipeColor((i - 1) & 15);
}
}
public int getItemMetadata() {
return getColor() >= 0 ? (1 + getColor()) : 0;
return getPipeColor() >= 0 ? (1 + getPipeColor()) : 0;
}
public int getColor() {
public int getPipeColor() {
return worldObj.isRemote ? renderState.glassColor : this.glassColor;
}
public boolean setColor(int color) {
public boolean setPipeColor(int color) {
// -1 = no color
if (!worldObj.isRemote && color >= -1 && color < 16 && glassColor != color) {
glassColor = color;
@ -555,8 +555,8 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
if (tile instanceof ITileBufferHolder) {
((ITileBufferHolder) tile).blockCreated(o, BuildCraftTransport.genericPipeBlock, this);
}
if (tile instanceof TileGenericPipe) {
((TileGenericPipe) tile).scheduleNeighborChange();
if (tile instanceof IPipeTile) {
((IPipeTile) tile).scheduleNeighborChange();
}
}
@ -721,18 +721,18 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
}
}
if (with instanceof TileGenericPipe) {
TileGenericPipe other = (TileGenericPipe) with;
if (with instanceof IPipeTile) {
IPipeTile other = (IPipeTile) with;
if (other.hasBlockingPluggable(side.getOpposite())) {
return false;
}
if (other.glassColor >= 0 && glassColor >= 0 && other.glassColor != glassColor) {
if (other.getPipeColor() >= 0 && glassColor >= 0 && other.getPipeColor() != glassColor) {
return false;
}
Pipe<?> otherPipe = ((TileGenericPipe) with).pipe;
Pipe<?> otherPipe = (Pipe<?>) other.getPipe();
if (!BlockGenericPipe.isValid(otherPipe)) {
return false;
@ -769,7 +769,7 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler,
return canPipeConnect_internal(with, side);
}
protected boolean hasBlockingPluggable(ForgeDirection side) {
public boolean hasBlockingPluggable(ForgeDirection side) {
PipePluggable pluggable = getPipePluggable(side);
if (pluggable == null) {
return false;

View file

@ -24,10 +24,11 @@ import net.minecraftforge.fluids.IFluidHandler;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider;
import buildcraft.api.statements.IActionInternal;
import buildcraft.api.transport.IPipe;
import buildcraft.api.transport.IPipeTile;
import buildcraft.transport.Pipe;
import buildcraft.transport.PipeIconProvider;
import buildcraft.transport.PipeTransportFluids;
import buildcraft.transport.TileGenericPipe;
import buildcraft.transport.gates.StatementSlot;
import buildcraft.transport.statements.ActionPipeDirection;
@ -38,8 +39,8 @@ public class PipeFluidsIron extends Pipe<PipeTransportFluids> {
private PipeLogicIron logic = new PipeLogicIron(this) {
@Override
protected boolean isValidConnectingTile(TileEntity tile) {
if (tile instanceof TileGenericPipe) {
Pipe<?> otherPipe = ((TileGenericPipe) tile).pipe;
if (tile instanceof IPipeTile) {
Pipe<?> otherPipe = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (otherPipe instanceof PipeFluidsWood || otherPipe instanceof PipeStructureCobblestone) {
return false;
} else {

View file

@ -19,6 +19,7 @@ import net.minecraftforge.fluids.FluidStack;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider;
import buildcraft.api.transport.IPipeTile;
import buildcraft.transport.IPipeConnectionForced;
import buildcraft.transport.IPipeTransportFluidsHook;
import buildcraft.transport.Pipe;
@ -47,7 +48,7 @@ public class PipeFluidsSandstone extends Pipe<PipeTransportFluids> implements IP
@Override
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
if (!(container.getTile(from) instanceof TileGenericPipe)) {
if (!(container.getTile(from) instanceof IPipeTile)) {
return 0;
} else {
return transport.internalTanks[from.ordinal()].fill(resource, doFill);
@ -56,7 +57,7 @@ public class PipeFluidsSandstone extends Pipe<PipeTransportFluids> implements IP
@Override
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
return (tile instanceof TileGenericPipe) && super.canPipeConnect(tile, side);
return (tile instanceof IPipeTile) && super.canPipeConnect(tile, side);
}
@Override

View file

@ -31,11 +31,11 @@ import buildcraft.api.core.IIconProvider;
import buildcraft.api.core.ISerializable;
import buildcraft.api.statements.IActionInternal;
import buildcraft.api.tools.IToolWrench;
import buildcraft.api.transport.IPipeTile;
import buildcraft.core.utils.ColorUtils;
import buildcraft.transport.Pipe;
import buildcraft.transport.PipeIconProvider;
import buildcraft.transport.PipeTransportItems;
import buildcraft.transport.TileGenericPipe;
import buildcraft.transport.TransportConstants;
import buildcraft.transport.TravelingItem;
import buildcraft.transport.gates.StatementSlot;
@ -51,8 +51,8 @@ public class PipeItemsDaizuli extends Pipe<PipeTransportItems> implements ISeria
private PipeLogicIron logic = new PipeLogicIron(this) {
@Override
protected boolean isValidConnectingTile(TileEntity tile) {
if (tile instanceof TileGenericPipe) {
Pipe<?> otherPipe = ((TileGenericPipe) tile).pipe;
if (tile instanceof IPipeTile) {
Pipe<?> otherPipe = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (otherPipe instanceof PipeItemsWood) {
return false;
}

View file

@ -24,6 +24,8 @@ import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider;
import buildcraft.api.statements.IActionInternal;
import buildcraft.api.transport.IPipe;
import buildcraft.api.transport.IPipeTile;
import buildcraft.transport.Pipe;
import buildcraft.transport.PipeIconProvider;
import buildcraft.transport.PipeTransportItems;
@ -38,8 +40,8 @@ public class PipeItemsIron extends Pipe<PipeTransportItems> {
private PipeLogicIron logic = new PipeLogicIron(this) {
@Override
protected boolean isValidConnectingTile(TileEntity tile) {
if (tile instanceof TileGenericPipe) {
Pipe<?> otherPipe = ((TileGenericPipe) tile).pipe;
if (tile instanceof IPipeTile) {
Pipe<?> otherPipe = (Pipe<?>) ((IPipeTile) tile).getPipe();
if (otherPipe instanceof PipeItemsWood) {
return false;
}

View file

@ -18,6 +18,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider;
import buildcraft.api.transport.IPipeTile;
import buildcraft.transport.IPipeConnectionForced;
import buildcraft.transport.Pipe;
import buildcraft.transport.PipeIconProvider;
@ -43,7 +44,7 @@ public class PipeItemsSandstone extends Pipe implements IPipeConnectionForced {
@Override
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
return (tile instanceof TileGenericPipe) && super.canPipeConnect(tile, side);
return (tile instanceof IPipeTile) && super.canPipeConnect(tile, side);
}
@Override

View file

@ -26,6 +26,7 @@ import cofh.api.energy.IEnergyHandler;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider;
import buildcraft.api.core.Position;
import buildcraft.api.transport.IPipeTile;
import buildcraft.api.transport.IStripesHandler;
import buildcraft.api.transport.IStripesHandler.StripesHandlerType;
import buildcraft.api.transport.IStripesPipe;
@ -143,13 +144,13 @@ public class PipeItemsStripes extends Pipe<PipeTransportItems> implements IEnerg
if (stack.stackSize > 0) {
TileEntity targetTile = getWorld().getTileEntity((int) p.x, (int) p.y, (int) p.z);
if (targetTile instanceof TileGenericPipe) {
if (targetTile instanceof IPipeTile) {
TravelingItem newItem = TravelingItem.make(
container.xCoord + 0.5,
container.yCoord + TransportUtils.getPipeFloorOf(
new ItemStack(BuildCraftTransport.pipeItemsStripes)),
container.zCoord + 0.5, stack.copy());
((PipeTransportItems) ((TileGenericPipe) targetTile).pipe.transport).injectItem(newItem, event.direction.getOpposite());
((PipeTransportItems) ((Pipe<?>)((IPipeTile) targetTile).getPipe()).transport).injectItem(newItem, event.direction.getOpposite());
stack.stackSize = 0;
}

View file

@ -18,6 +18,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.BuildCraftTransport;
import buildcraft.api.core.IIconProvider;
import buildcraft.api.transport.IPipeTile;
import buildcraft.transport.IPipeConnectionForced;
import buildcraft.transport.Pipe;
import buildcraft.transport.PipeIconProvider;
@ -44,7 +45,7 @@ public class PipePowerSandstone extends Pipe<PipeTransportPower> implements IPip
@Override
public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
return (tile instanceof TileGenericPipe) && super.canPipeConnect(tile, side);
return (tile instanceof IPipeTile) && super.canPipeConnect(tile, side);
}
@Override

View file

@ -37,7 +37,7 @@ public class PipePowerWood extends Pipe<PipeTransportPower> implements IPipeTran
protected RFBattery battery;
private boolean full;
private int requestedEnergy, sources;
private int requestedEnergy, sources, lastRequestedEnergy;
public PipePowerWood(Item item) {
super(new PipeTransportPower(), item);
@ -128,6 +128,7 @@ public class PipePowerWood extends Pipe<PipeTransportPower> implements IPipeTran
}
}
lastRequestedEnergy = requestedEnergy;
requestedEnergy = 0;
}
@ -178,7 +179,7 @@ public class PipePowerWood extends Pipe<PipeTransportPower> implements IPipeTran
public int receiveEnergy(ForgeDirection from, int maxReceive,
boolean simulate) {
if (from.ordinal() < 6 && powerSources[from.ordinal()]) {
return battery.receiveEnergy(maxReceive, simulate);
return battery.receiveEnergy(simulate ? Math.min(maxReceive, lastRequestedEnergy) : maxReceive, simulate);
} else {
return 0;
}

View file

@ -38,7 +38,7 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler {
PipeRenderState state = tile.renderState;
IIconProvider icons = tile.getPipeIcons();
FakeBlock fakeBlock = FakeBlock.INSTANCE;
int glassColor = tile.getColor();
int glassColor = tile.getPipeColor();
if (icons == null) {
return;