diff --git a/api/buildcraft/api/transport/IPipe.java b/api/buildcraft/api/transport/IPipe.java index cb4ebab8..2e96eeb2 100755 --- a/api/buildcraft/api/transport/IPipe.java +++ b/api/buildcraft/api/transport/IPipe.java @@ -12,7 +12,7 @@ import net.minecraftforge.common.util.ForgeDirection; import buildcraft.api.gates.IGate; public interface IPipe { - IPipeContainer getTile(); + IPipeTile getTile(); IGate getGate(ForgeDirection side); diff --git a/api/buildcraft/api/transport/IPipeConnection.java b/api/buildcraft/api/transport/IPipeConnection.java index 5453f7d7..349ddd43 100644 --- a/api/buildcraft/api/transport/IPipeConnection.java +++ b/api/buildcraft/api/transport/IPipeConnection.java @@ -25,5 +25,5 @@ public interface IPipeConnection { * @return CONNECT to force a connection, DISCONNECT to force no connection, * and DEFAULT to let the pipe decide. */ - ConnectOverride overridePipeConnection(IPipeContainer.PipeType type, ForgeDirection with); + ConnectOverride overridePipeConnection(IPipeTile.PipeType type, ForgeDirection with); } diff --git a/api/buildcraft/api/transport/IPipeContainer.java b/api/buildcraft/api/transport/IPipeContainer.java deleted file mode 100644 index 5725b7aa..00000000 --- a/api/buildcraft/api/transport/IPipeContainer.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; -import buildcraft.api.transport.pluggable.PipePluggable; - -public interface IPipeContainer extends IInjectable { - - PipeType getPipeType(); - - World getWorldObj(); - - int x(); - - int y(); - - int z(); - - /** - * True if the pipe is connected to the block/pipe in the specific direction - * - * @param with - * @return true if connect - */ - boolean isPipeConnected(ForgeDirection with); - - Block getNeighborBlock(ForgeDirection dir); - TileEntity getNeighborTile(ForgeDirection dir); - IPipe getNeighborPipe(ForgeDirection dir); - - IPipe getPipe(); - - PipePluggable getPipePluggable(ForgeDirection direction); - boolean hasPipePluggable(ForgeDirection direction); - - /** - * Created by asie on 12/19/14. - */ - enum PipeType { - - ITEM, FLUID, POWER, STRUCTURE - } -} diff --git a/api/buildcraft/api/transport/IPipeTile.java b/api/buildcraft/api/transport/IPipeTile.java index 387a748d..dabc77ec 100644 --- a/api/buildcraft/api/transport/IPipeTile.java +++ b/api/buildcraft/api/transport/IPipeTile.java @@ -1,5 +1,54 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * The BuildCraft API is distributed under the terms of the MIT License. + * Please check the contents of the license, which should be located + * as "LICENSE.API" in the BuildCraft source code distribution. + */ package buildcraft.api.transport; -@Deprecated -public interface IPipeTile extends IPipeContainer { +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import buildcraft.api.core.EnumColor; +import buildcraft.api.transport.pluggable.PipePluggable; + +public interface IPipeTile extends IInjectable { + enum PipeType { + ITEM, FLUID, POWER, STRUCTURE + } + + PipeType getPipeType(); + + World getWorldObj(); + + int x(); + + int y(); + + int z(); + + /** + * True if the pipe is connected to the block/pipe in the specific direction + * + * @param with + * @return true if connect + */ + boolean isPipeConnected(ForgeDirection with); + + Block getNeighborBlock(ForgeDirection dir); + TileEntity getNeighborTile(ForgeDirection dir); + IPipe getNeighborPipe(ForgeDirection dir); + + IPipe getPipe(); + + PipePluggable getPipePluggable(ForgeDirection direction); + boolean hasPipePluggable(ForgeDirection direction); + + // For compatibility with BC 6.2.x and below + int injectItem(ItemStack stack, boolean doAdd, ForgeDirection from, EnumColor color); + int injectItem(ItemStack stack, boolean doAdd, ForgeDirection from); } diff --git a/api/buildcraft/api/transport/PipeManager.java b/api/buildcraft/api/transport/PipeManager.java index ea03851b..3c208547 100755 --- a/api/buildcraft/api/transport/PipeManager.java +++ b/api/buildcraft/api/transport/PipeManager.java @@ -13,6 +13,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import net.minecraft.world.World; import buildcraft.api.transport.pluggable.PipePluggable; public abstract class PipeManager { @@ -24,6 +25,16 @@ public abstract class PipeManager { private static Map, String> pipePluggableByNames = new HashMap, String>(); + @Deprecated + public static boolean canExtractItems(Object extractor, World world, int i, int j, int k) { + return true; + } + + @Deprecated + public static boolean canExtractFluids(Object extractor, World world, int i, int j, int k) { + return true; + } + public static void registerStripesHandler(IStripesHandler handler) { stripesHandlers.add(handler); } diff --git a/api/buildcraft/api/transport/pluggable/PipePluggable.java b/api/buildcraft/api/transport/pluggable/PipePluggable.java index 385c4560..e3f6af9c 100755 --- a/api/buildcraft/api/transport/pluggable/PipePluggable.java +++ b/api/buildcraft/api/transport/pluggable/PipePluggable.java @@ -16,38 +16,38 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraftforge.common.util.ForgeDirection; import buildcraft.api.core.INBTStoreable; import buildcraft.api.core.ISerializable; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; /** * An IPipePluggable MUST have an empty constructor for client-side * rendering! */ public abstract class PipePluggable implements INBTStoreable, ISerializable { - public abstract ItemStack[] getDropItems(IPipeContainer pipe); + public abstract ItemStack[] getDropItems(IPipeTile pipe); - public void update(IPipeContainer pipe, ForgeDirection direction) { + public void update(IPipeTile pipe, ForgeDirection direction) { } - public void onAttachedPipe(IPipeContainer pipe, ForgeDirection direction) { + public void onAttachedPipe(IPipeTile pipe, ForgeDirection direction) { validate(pipe, direction); } - public void onDetachedPipe(IPipeContainer pipe, ForgeDirection direction) { + public void onDetachedPipe(IPipeTile pipe, ForgeDirection direction) { invalidate(); } - public abstract boolean isBlocking(IPipeContainer pipe, ForgeDirection direction); + public abstract boolean isBlocking(IPipeTile pipe, ForgeDirection direction); public void invalidate() { } - public void validate(IPipeContainer pipe, ForgeDirection direction) { + public void validate(IPipeTile pipe, ForgeDirection direction) { } - public boolean isSolidOnSide(IPipeContainer pipe, ForgeDirection direction) { + public boolean isSolidOnSide(IPipeTile pipe, ForgeDirection direction) { return false; } diff --git a/common/buildcraft/core/robots/AIRobotRecharge.java b/common/buildcraft/core/robots/AIRobotRecharge.java index bd478825..d308e0bf 100755 --- a/common/buildcraft/core/robots/AIRobotRecharge.java +++ b/common/buildcraft/core/robots/AIRobotRecharge.java @@ -10,7 +10,7 @@ package buildcraft.core.robots; import buildcraft.api.robots.AIRobot; import buildcraft.api.robots.EntityRobotBase; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.transport.PipeTransportPower; public class AIRobotRecharge extends AIRobot { @@ -28,7 +28,7 @@ public class AIRobotRecharge extends AIRobot { startDelegateAI(new AIRobotSearchAndGotoStation(robot, new IStationFilter() { @Override public boolean matches(DockingStation station) { - return station.getPipe().getPipeType() == IPipeContainer.PipeType.POWER; + return station.getPipe().getPipeType() == IPipeTile.PipeType.POWER; } }, null)); } diff --git a/common/buildcraft/core/statements/DefaultActionProvider.java b/common/buildcraft/core/statements/DefaultActionProvider.java index 856d34bb..d000f060 100644 --- a/common/buildcraft/core/statements/DefaultActionProvider.java +++ b/common/buildcraft/core/statements/DefaultActionProvider.java @@ -20,7 +20,7 @@ import buildcraft.api.statements.IActionInternal; import buildcraft.api.statements.IActionProvider; import buildcraft.api.statements.IStatementContainer; import buildcraft.api.tiles.IControllable; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; public class DefaultActionProvider implements IActionProvider { @@ -28,7 +28,7 @@ public class DefaultActionProvider implements IActionProvider { public Collection getInternalActions(IStatementContainer container) { LinkedList res = new LinkedList(); - if (container.getTile() instanceof IPipeContainer) { + if (container.getTile() instanceof IPipeTile) { res.add(BuildCraftCore.actionRedstone); } diff --git a/common/buildcraft/core/utils/Utils.java b/common/buildcraft/core/utils/Utils.java index c412d00e..2790e046 100644 --- a/common/buildcraft/core/utils/Utils.java +++ b/common/buildcraft/core/utils/Utils.java @@ -40,7 +40,7 @@ import net.minecraftforge.common.util.ForgeDirection; import buildcraft.api.core.IAreaProvider; import buildcraft.api.core.Position; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.DefaultProps; import buildcraft.core.EntityBlock; import buildcraft.core.IDropControlInventory; @@ -147,7 +147,7 @@ public final class Utils { * successful, false otherwise. */ public static int addToRandomPipeAround(World world, int x, int y, int z, ForgeDirection from, ItemStack stack) { - List possiblePipes = new ArrayList(); + List possiblePipes = new ArrayList(); List pipeDirections = new ArrayList(); for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) { @@ -161,9 +161,9 @@ public final class Utils { TileEntity tile = BlockUtils.getTileEntity(world, (int) pos.x, (int) pos.y, (int) pos.z); - if (tile instanceof IPipeContainer) { - IPipeContainer pipe = (IPipeContainer) tile; - if (pipe.getPipeType() != IPipeContainer.PipeType.ITEM) { + if (tile instanceof IPipeTile) { + IPipeTile pipe = (IPipeTile) tile; + if (pipe.getPipeType() != IPipeTile.PipeType.ITEM) { continue; } if (!pipe.isPipeConnected(side.getOpposite())) { @@ -178,7 +178,7 @@ public final class Utils { if (possiblePipes.size() > 0) { int choice = RANDOM.nextInt(possiblePipes.size()); - IPipeContainer pipeEntry = possiblePipes.get(choice); + IPipeTile pipeEntry = possiblePipes.get(choice); return pipeEntry.injectItem(stack, true, pipeDirections.get(choice)); } @@ -369,7 +369,7 @@ public final class Utils { return false; } - if (!(tile1 instanceof IPipeContainer) && !(tile2 instanceof IPipeContainer)) { + if (!(tile1 instanceof IPipeTile) && !(tile2 instanceof IPipeTile)) { return false; } @@ -389,11 +389,11 @@ public final class Utils { o = ForgeDirection.SOUTH; } - if (tile1 instanceof IPipeContainer && !((IPipeContainer) tile1).isPipeConnected(o)) { + if (tile1 instanceof IPipeTile && !((IPipeTile) tile1).isPipeConnected(o)) { return false; } - if (tile2 instanceof IPipeContainer && !((IPipeContainer) tile2).isPipeConnected(o.getOpposite())) { + if (tile2 instanceof IPipeTile && !((IPipeTile) tile2).isPipeConnected(o.getOpposite())) { return false; } diff --git a/common/buildcraft/energy/TileEnergyReceiver.java b/common/buildcraft/energy/TileEnergyReceiver.java index 4cdb5fb1..086d22b4 100644 --- a/common/buildcraft/energy/TileEnergyReceiver.java +++ b/common/buildcraft/energy/TileEnergyReceiver.java @@ -17,7 +17,7 @@ import net.minecraftforge.common.util.ForgeDirection; import cofh.api.energy.IEnergyHandler; import buildcraft.api.transport.IPipeConnection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.TileBuffer; import buildcraft.core.TileBuildCraft; @@ -65,9 +65,9 @@ public class TileEnergyReceiver extends TileBuildCraft implements IPipeConnectio } @Override - public ConnectOverride overridePipeConnection(IPipeContainer.PipeType type, + public ConnectOverride overridePipeConnection(IPipeTile.PipeType type, ForgeDirection with) { - return type == IPipeContainer.PipeType.POWER ? ConnectOverride.CONNECT : ConnectOverride.DISCONNECT; + return type == IPipeTile.PipeType.POWER ? ConnectOverride.CONNECT : ConnectOverride.DISCONNECT; } @Override diff --git a/common/buildcraft/energy/TileEngine.java b/common/buildcraft/energy/TileEngine.java index f9dbd060..cf3cd07b 100644 --- a/common/buildcraft/energy/TileEngine.java +++ b/common/buildcraft/energy/TileEngine.java @@ -23,7 +23,7 @@ import buildcraft.api.power.IEngine; import buildcraft.api.tiles.IHeatable; import buildcraft.api.tools.IToolWrench; import buildcraft.api.transport.IPipeConnection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.DefaultProps; import buildcraft.core.TileBuildCraft; import buildcraft.core.utils.MathUtils; @@ -397,7 +397,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPipeConnecti TileEntity tile = getTile(o); - if ((!pipesOnly || tile instanceof IPipeContainer) && isPoweredTile(tile, o)) { + if ((!pipesOnly || tile instanceof IPipeTile) && isPoweredTile(tile, o)) { orientation = o; worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord)); @@ -549,8 +549,8 @@ public abstract class TileEngine extends TileBuildCraft implements IPipeConnecti public abstract int calculateCurrentOutput(); @Override - public ConnectOverride overridePipeConnection(IPipeContainer.PipeType type, ForgeDirection with) { - if (type == IPipeContainer.PipeType.POWER) { + public ConnectOverride overridePipeConnection(IPipeTile.PipeType type, ForgeDirection with) { + if (type == IPipeTile.PipeType.POWER) { return ConnectOverride.DEFAULT; } else if (with == orientation) { return ConnectOverride.DISCONNECT; diff --git a/common/buildcraft/energy/TileEngineWood.java b/common/buildcraft/energy/TileEngineWood.java index 65e217f9..4b433c36 100644 --- a/common/buildcraft/energy/TileEngineWood.java +++ b/common/buildcraft/energy/TileEngineWood.java @@ -11,7 +11,7 @@ package buildcraft.energy; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.power.IRedstoneEngineReceiver; public class TileEngineWood extends TileEngine { @@ -87,7 +87,7 @@ public class TileEngineWood extends TileEngine { } @Override - public ConnectOverride overridePipeConnection(IPipeContainer.PipeType type, ForgeDirection with) { + public ConnectOverride overridePipeConnection(IPipeTile.PipeType type, ForgeDirection with) { return ConnectOverride.DISCONNECT; } @@ -126,7 +126,7 @@ public class TileEngineWood extends TileEngine { // TODO: Make a proper API out of this if ((tile instanceof IRedstoneEngineReceiver && ((IRedstoneEngineReceiver) tile).canConnectRedstoneEngine(orientation.getOpposite())) || - (tile instanceof IPipeContainer && ((IPipeContainer) tile).getPipeType() != IPipeContainer.PipeType.POWER)) { + (tile instanceof IPipeTile && ((IPipeTile) tile).getPipeType() != IPipeTile.PipeType.POWER)) { super.sendPower(); } else { this.energy = 0; diff --git a/common/buildcraft/factory/TileMiningWell.java b/common/buildcraft/factory/TileMiningWell.java index 27851346..400e8b60 100644 --- a/common/buildcraft/factory/TileMiningWell.java +++ b/common/buildcraft/factory/TileMiningWell.java @@ -15,7 +15,7 @@ import buildcraft.api.blueprints.BuilderAPI; import buildcraft.api.tiles.IControllable; import buildcraft.api.tiles.IHasWork; import buildcraft.api.transport.IPipeConnection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.RFBattery; import buildcraft.core.TileBuildCraft; import buildcraft.core.utils.BlockUtils; @@ -110,9 +110,9 @@ public class TileMiningWell extends TileBuildCraft implements IHasWork, IPipeCon } @Override - public ConnectOverride overridePipeConnection(IPipeContainer.PipeType type, + public ConnectOverride overridePipeConnection(IPipeTile.PipeType type, ForgeDirection with) { - return type == IPipeContainer.PipeType.ITEM ? ConnectOverride.CONNECT : ConnectOverride.DEFAULT; + return type == IPipeTile.PipeType.ITEM ? ConnectOverride.CONNECT : ConnectOverride.DEFAULT; } @Override diff --git a/common/buildcraft/factory/TileQuarry.java b/common/buildcraft/factory/TileQuarry.java index d092f79b..2437e545 100644 --- a/common/buildcraft/factory/TileQuarry.java +++ b/common/buildcraft/factory/TileQuarry.java @@ -38,7 +38,7 @@ import buildcraft.api.filler.FillerManager; import buildcraft.api.tiles.IControllable; import buildcraft.api.tiles.IHasWork; import buildcraft.api.transport.IPipeConnection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.Box; import buildcraft.core.Box.Kind; import buildcraft.core.CoreConstants; @@ -877,7 +877,7 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI } @Override - public ConnectOverride overridePipeConnection(IPipeContainer.PipeType type, ForgeDirection with) { - return type == IPipeContainer.PipeType.ITEM ? ConnectOverride.CONNECT : ConnectOverride.DEFAULT; + public ConnectOverride overridePipeConnection(IPipeTile.PipeType type, ForgeDirection with) { + return type == IPipeTile.PipeType.ITEM ? ConnectOverride.CONNECT : ConnectOverride.DEFAULT; } } diff --git a/common/buildcraft/transport/FacadePluggable.java b/common/buildcraft/transport/FacadePluggable.java index d009e65d..74822b2e 100644 --- a/common/buildcraft/transport/FacadePluggable.java +++ b/common/buildcraft/transport/FacadePluggable.java @@ -7,7 +7,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.IPipePluggableRenderer; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.core.utils.MatrixTranformations; @@ -44,7 +44,7 @@ public class FacadePluggable extends PipePluggable { } @Override - public ItemStack[] getDropItems(IPipeContainer pipe) { + public ItemStack[] getDropItems(IPipeTile pipe) { if (states != null) { return new ItemStack[] { ItemFacade.getFacade(states) }; } else { @@ -53,7 +53,7 @@ public class FacadePluggable extends PipePluggable { } @Override - public boolean isBlocking(IPipeContainer pipe, ForgeDirection direction) { + public boolean isBlocking(IPipeTile pipe, ForgeDirection direction) { return isHollow(); } @@ -83,7 +83,7 @@ public class FacadePluggable extends PipePluggable { } @Override - public boolean isSolidOnSide(IPipeContainer pipe, ForgeDirection direction) { + public boolean isSolidOnSide(IPipeTile pipe, ForgeDirection direction) { return !isHollow(); } diff --git a/common/buildcraft/transport/LensFilterHandler.java b/common/buildcraft/transport/LensFilterHandler.java index 44cb2b2e..add60104 100644 --- a/common/buildcraft/transport/LensFilterHandler.java +++ b/common/buildcraft/transport/LensFilterHandler.java @@ -1,10 +1,9 @@ package buildcraft.transport; -import java.util.HashSet; import java.util.LinkedList; import net.minecraftforge.common.util.ForgeDirection; import buildcraft.api.transport.IPipe; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.transport.pipes.events.PipeEventItem; import buildcraft.transport.pluggable.LensPluggable; @@ -20,7 +19,7 @@ public class LensFilterHandler { } public void eventHandler(PipeEventItem.FindDest event) { - IPipeContainer container = pipe.getTile(); + IPipeTile container = pipe.getTile(); LinkedList correctColored = new LinkedList(); LinkedList notColored = new LinkedList(); boolean encounteredColor = false; @@ -39,7 +38,7 @@ public class LensFilterHandler { // (2/2) From the other pipe's outpost IPipe otherPipe = container.getNeighborPipe(dir); if (otherPipe != null && otherPipe.getTile() != null) { - IPipeContainer otherContainer = otherPipe.getTile(); + IPipeTile otherContainer = otherPipe.getTile(); pluggable = otherContainer.getPipePluggable(dir.getOpposite()); if (pluggable != null && pluggable instanceof LensPluggable && ((LensPluggable) pluggable).isFilter) { int otherColor = ((LensPluggable) pluggable).color; diff --git a/common/buildcraft/transport/Pipe.java b/common/buildcraft/transport/Pipe.java index 9d5e2c7a..33509a25 100644 --- a/common/buildcraft/transport/Pipe.java +++ b/common/buildcraft/transport/Pipe.java @@ -31,7 +31,7 @@ import buildcraft.api.gates.IGate; import buildcraft.api.statements.ActionState; import buildcraft.api.statements.IActionInternal; import buildcraft.api.transport.IPipe; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.PipeWire; import buildcraft.core.IDropControlInventory; import buildcraft.core.inventory.InvUtils; @@ -556,7 +556,7 @@ public abstract class Pipe implements IDropControlInven } @Override - public IPipeContainer getTile() { + public IPipeTile getTile() { return container; } diff --git a/common/buildcraft/transport/PipeTransport.java b/common/buildcraft/transport/PipeTransport.java index ec174199..d4609a08 100644 --- a/common/buildcraft/transport/PipeTransport.java +++ b/common/buildcraft/transport/PipeTransport.java @@ -17,7 +17,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.utils.BitSetUtils; public abstract class PipeTransport { @@ -34,7 +34,7 @@ public abstract class PipeTransport { } } - public abstract IPipeContainer.PipeType getPipeType(); + public abstract IPipeTile.PipeType getPipeType(); public World getWorld() { return container.getWorldObj(); diff --git a/common/buildcraft/transport/PipeTransportFluids.java b/common/buildcraft/transport/PipeTransportFluids.java index e161a5eb..75da4559 100644 --- a/common/buildcraft/transport/PipeTransportFluids.java +++ b/common/buildcraft/transport/PipeTransportFluids.java @@ -25,7 +25,7 @@ import net.minecraftforge.fluids.IFluidHandler; import buildcraft.BuildCraftCore; import buildcraft.BuildCraftTransport; import buildcraft.api.core.SafeTimeTracker; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.DefaultProps; import buildcraft.core.utils.MathUtils; import buildcraft.transport.network.PacketFluidUpdate; @@ -184,8 +184,8 @@ public class PipeTransportFluids extends PipeTransport implements IFluidHandler } @Override - public IPipeContainer.PipeType getPipeType() { - return IPipeContainer.PipeType.FLUID; + public IPipeTile.PipeType getPipeType() { + return IPipeTile.PipeType.FLUID; } public int getCapacity() { diff --git a/common/buildcraft/transport/PipeTransportItems.java b/common/buildcraft/transport/PipeTransportItems.java index d99dd5e0..bfe6d121 100644 --- a/common/buildcraft/transport/PipeTransportItems.java +++ b/common/buildcraft/transport/PipeTransportItems.java @@ -28,14 +28,13 @@ import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.core.BCLog; import buildcraft.api.core.Position; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.DefaultProps; import buildcraft.core.inventory.Transactor; import buildcraft.core.utils.BlockUtils; import buildcraft.core.utils.MathUtils; import buildcraft.transport.network.PacketPipeTransportItemStackRequest; import buildcraft.transport.network.PacketPipeTransportTraveler; -import buildcraft.transport.pipes.events.PipeEvent; import buildcraft.transport.pipes.events.PipeEventItem; import buildcraft.transport.utils.TransportUtils; @@ -47,8 +46,8 @@ public class PipeTransportItems extends PipeTransport { public final TravelerSet items = new TravelerSet(this); @Override - public IPipeContainer.PipeType getPipeType() { - return IPipeContainer.PipeType.ITEM; + public IPipeTile.PipeType getPipeType() { + return IPipeTile.PipeType.ITEM; } public void readjustSpeed(TravelingItem item) { diff --git a/common/buildcraft/transport/PipeTransportPower.java b/common/buildcraft/transport/PipeTransportPower.java index 3e518f19..79ed67da 100644 --- a/common/buildcraft/transport/PipeTransportPower.java +++ b/common/buildcraft/transport/PipeTransportPower.java @@ -22,7 +22,7 @@ import buildcraft.BuildCraftCore; import buildcraft.BuildCraftTransport; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.power.IEngine; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.DefaultProps; import buildcraft.core.TileBuildCraft; import buildcraft.transport.network.PacketPowerUpdate; @@ -75,8 +75,8 @@ public class PipeTransportPower extends PipeTransport { } @Override - public IPipeContainer.PipeType getPipeType() { - return IPipeContainer.PipeType.POWER; + public IPipeTile.PipeType getPipeType() { + return IPipeTile.PipeType.POWER; } public void initFromPipe(Class pipeClass) { diff --git a/common/buildcraft/transport/PipeTransportStructure.java b/common/buildcraft/transport/PipeTransportStructure.java index 8200a25b..84165138 100644 --- a/common/buildcraft/transport/PipeTransportStructure.java +++ b/common/buildcraft/transport/PipeTransportStructure.java @@ -12,13 +12,13 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; public class PipeTransportStructure extends PipeTransport { @Override - public IPipeContainer.PipeType getPipeType() { - return IPipeContainer.PipeType.STRUCTURE; + public IPipeTile.PipeType getPipeType() { + return IPipeTile.PipeType.STRUCTURE; } @Override diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 21b5e907..63a5dfd8 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -39,7 +39,7 @@ import buildcraft.api.core.Position; import buildcraft.api.gates.IGateExpansion; import buildcraft.api.transport.IPipe; import buildcraft.api.transport.IPipeConnection; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.PipeManager; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.api.transport.PipeWire; @@ -62,7 +62,7 @@ import buildcraft.transport.pluggable.PlugPluggable; import buildcraft.transport.pluggable.RobotStationPluggable; public class TileGenericPipe extends TileEntity implements IFluidHandler, - IPipeContainer, ITileBufferHolder, IEnergyHandler, IDropControlInventory, + IPipeTile, ITileBufferHolder, IEnergyHandler, IDropControlInventory, ISyncedTile, ISolidSideTile, IGuiReturnHandler { public boolean initialized = false; @@ -1185,8 +1185,8 @@ public class TileGenericPipe extends TileEntity implements IFluidHandler, @Override public IPipe getNeighborPipe(ForgeDirection dir) { TileEntity neighborTile = getTile(dir); - if (neighborTile instanceof IPipeContainer) { - return ((IPipeContainer) neighborTile).getPipe(); + if (neighborTile instanceof IPipeTile) { + return ((IPipeTile) neighborTile).getPipe(); } else { return null; } diff --git a/common/buildcraft/transport/gates/GatePluggable.java b/common/buildcraft/transport/gates/GatePluggable.java index 1f43be36..531ee1b6 100644 --- a/common/buildcraft/transport/gates/GatePluggable.java +++ b/common/buildcraft/transport/gates/GatePluggable.java @@ -11,7 +11,7 @@ import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; import buildcraft.api.gates.GateExpansions; import buildcraft.api.gates.IGateExpansion; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.IPipePluggableRenderer; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.core.CoreConstants; @@ -98,7 +98,7 @@ public class GatePluggable extends PipePluggable { } @Override - public ItemStack[] getDropItems(IPipeContainer pipe) { + public ItemStack[] getDropItems(IPipeTile pipe) { ItemStack gate = ItemGate.makeGateItem(material, logic); for (IGateExpansion expansion : expansions) { ItemGate.addGateExpansion(gate, expansion); @@ -107,7 +107,7 @@ public class GatePluggable extends PipePluggable { } @Override - public void update(IPipeContainer pipe, ForgeDirection direction) { + public void update(IPipeTile pipe, ForgeDirection direction) { if (isPulsing || pulseStage > 0.11F) { // if it is moving, or is still in a moved state, then complete // the current movement @@ -118,7 +118,7 @@ public class GatePluggable extends PipePluggable { } @Override - public void onAttachedPipe(IPipeContainer pipe, ForgeDirection direction) { + public void onAttachedPipe(IPipeTile pipe, ForgeDirection direction) { TileGenericPipe pipeReal = (TileGenericPipe) pipe; if (!pipeReal.getWorld().isRemote) { if (instantiatedGate != null) { @@ -139,7 +139,7 @@ public class GatePluggable extends PipePluggable { } @Override - public void onDetachedPipe(IPipeContainer pipe, ForgeDirection direction) { + public void onDetachedPipe(IPipeTile pipe, ForgeDirection direction) { TileGenericPipe pipeReal = (TileGenericPipe) pipe; if (!pipeReal.getWorld().isRemote) { Gate gate = pipeReal.pipe.gates[direction.ordinal()]; @@ -152,7 +152,7 @@ public class GatePluggable extends PipePluggable { } @Override - public boolean isBlocking(IPipeContainer pipe, ForgeDirection direction) { + public boolean isBlocking(IPipeTile pipe, ForgeDirection direction) { return true; } diff --git a/common/buildcraft/transport/pipes/PipeFluidsWood.java b/common/buildcraft/transport/pipes/PipeFluidsWood.java index 5d8c49ff..4ec9eee2 100644 --- a/common/buildcraft/transport/pipes/PipeFluidsWood.java +++ b/common/buildcraft/transport/pipes/PipeFluidsWood.java @@ -25,8 +25,7 @@ import cofh.api.energy.IEnergyHandler; import buildcraft.BuildCraftTransport; import buildcraft.api.core.IIconProvider; -import buildcraft.api.transport.IPipeContainer; -import buildcraft.api.transport.PipeManager; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.RFBattery; import buildcraft.api.core.ISerializable; import buildcraft.transport.Pipe; @@ -46,7 +45,7 @@ public class PipeFluidsWood extends Pipe implements IEnergy private PipeLogicWood logic = new PipeLogicWood(this) { @Override protected boolean isValidConnectingTile(TileEntity tile) { - if (tile instanceof IPipeContainer) { + if (tile instanceof IPipeTile) { return false; } if (!(tile instanceof IFluidHandler)) { diff --git a/common/buildcraft/transport/pipes/PipeItemsClay.java b/common/buildcraft/transport/pipes/PipeItemsClay.java index 136cc0e5..5b6f96f9 100644 --- a/common/buildcraft/transport/pipes/PipeItemsClay.java +++ b/common/buildcraft/transport/pipes/PipeItemsClay.java @@ -16,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.core.IIconProvider; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.transport.Pipe; import buildcraft.transport.PipeIconProvider; import buildcraft.transport.PipeTransportItems; @@ -49,7 +49,7 @@ public class PipeItemsClay extends Pipe { if (!event.item.blacklist.contains(o) && container.pipe.outputOpen(o)) { if (container.isPipeConnected(o)) { TileEntity entity = container.getTile(o); - if (entity instanceof IPipeContainer) { + if (entity instanceof IPipeTile) { pipesList.add(o); } else { nonPipesList.add(o); diff --git a/common/buildcraft/transport/pipes/PipeItemsWood.java b/common/buildcraft/transport/pipes/PipeItemsWood.java index 51897ede..37e2194f 100644 --- a/common/buildcraft/transport/pipes/PipeItemsWood.java +++ b/common/buildcraft/transport/pipes/PipeItemsWood.java @@ -25,8 +25,7 @@ import cofh.api.energy.IEnergyHandler; import buildcraft.BuildCraftTransport; import buildcraft.api.core.IIconProvider; import buildcraft.api.core.Position; -import buildcraft.api.transport.IPipeContainer; -import buildcraft.api.transport.PipeManager; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.RFBattery; import buildcraft.core.inventory.InvUtils; import buildcraft.core.inventory.InventoryWrapper; @@ -46,7 +45,7 @@ public class PipeItemsWood extends Pipe implements IEnergyHa private PipeLogicWood logic = new PipeLogicWood(this) { @Override protected boolean isValidConnectingTile(TileEntity tile) { - if (tile instanceof IPipeContainer) { + if (tile instanceof IPipeTile) { return false; } if (!(tile instanceof IInventory)) { diff --git a/common/buildcraft/transport/pipes/PipePowerWood.java b/common/buildcraft/transport/pipes/PipePowerWood.java index daff644b..ff0ff12f 100644 --- a/common/buildcraft/transport/pipes/PipePowerWood.java +++ b/common/buildcraft/transport/pipes/PipePowerWood.java @@ -17,7 +17,7 @@ import net.minecraftforge.common.util.ForgeDirection; import cofh.api.energy.IEnergyHandler; import buildcraft.BuildCraftTransport; import buildcraft.api.core.IIconProvider; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.core.RFBattery; import buildcraft.transport.IPipeTransportPowerHook; import buildcraft.transport.Pipe; @@ -157,7 +157,7 @@ public class PipePowerWood extends Pipe implements IPipeTran @Override public int requestEnergy(ForgeDirection from, int amount) { - if (container.getTile(from) instanceof IPipeContainer) { + if (container.getTile(from) instanceof IPipeTile) { requestedEnergy += amount; return amount; } else { diff --git a/common/buildcraft/transport/pluggable/ItemLens.java b/common/buildcraft/transport/pluggable/ItemLens.java index eb0f8962..dc20436a 100755 --- a/common/buildcraft/transport/pluggable/ItemLens.java +++ b/common/buildcraft/transport/pluggable/ItemLens.java @@ -20,7 +20,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraftforge.common.util.ForgeDirection; import buildcraft.api.transport.IPipe; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.IPipePluggableItem; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.core.ItemBuildCraft; @@ -89,7 +89,7 @@ public class ItemLens extends ItemBuildCraft implements IPipePluggableItem { @Override public PipePluggable createPipePluggable(IPipe pipe, ForgeDirection side, ItemStack stack) { - if (pipe.getTile().getPipeType() == IPipeContainer.PipeType.ITEM) { + if (pipe.getTile().getPipeType() == IPipeTile.PipeType.ITEM) { return new LensPluggable(stack); } else { return null; diff --git a/common/buildcraft/transport/pluggable/ItemPowerAdapter.java b/common/buildcraft/transport/pluggable/ItemPowerAdapter.java index 6e8e2210..4126244e 100755 --- a/common/buildcraft/transport/pluggable/ItemPowerAdapter.java +++ b/common/buildcraft/transport/pluggable/ItemPowerAdapter.java @@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraftforge.common.util.ForgeDirection; import cofh.api.energy.IEnergyHandler; import buildcraft.api.transport.IPipe; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.IPipePluggableItem; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.core.ItemBuildCraft; @@ -52,7 +52,7 @@ public class ItemPowerAdapter extends ItemBuildCraft implements IPipePluggableIt @Override public PipePluggable createPipePluggable(IPipe pipe, ForgeDirection side, ItemStack stack) { - if (pipe.getTile().getPipeType() != IPipeContainer.PipeType.POWER && pipe instanceof IEnergyHandler) { + if (pipe.getTile().getPipeType() != IPipeTile.PipeType.POWER && pipe instanceof IEnergyHandler) { return new PowerAdapterPluggable(); } else { return null; diff --git a/common/buildcraft/transport/pluggable/LensPluggable.java b/common/buildcraft/transport/pluggable/LensPluggable.java index 4044bdf4..37c1c9bc 100644 --- a/common/buildcraft/transport/pluggable/LensPluggable.java +++ b/common/buildcraft/transport/pluggable/LensPluggable.java @@ -12,7 +12,7 @@ import buildcraft.BuildCraftTransport; import buildcraft.api.core.EnumColor; import buildcraft.api.core.render.ITextureStates; import buildcraft.api.transport.IPipe; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.IPipePluggableRenderer; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.core.utils.ColorUtils; @@ -28,7 +28,7 @@ public class LensPluggable extends PipePluggable { public int color; public boolean isFilter; - protected IPipeContainer container; + protected IPipeTile container; private ForgeDirection side; public class LensPluggableRenderer implements IPipePluggableRenderer { @@ -83,7 +83,7 @@ public class LensPluggable extends PipePluggable { } @Override - public void validate(IPipeContainer pipe, ForgeDirection direction) { + public void validate(IPipeTile pipe, ForgeDirection direction) { this.container = pipe; this.side = direction; } @@ -95,12 +95,12 @@ public class LensPluggable extends PipePluggable { } @Override - public ItemStack[] getDropItems(IPipeContainer pipe) { + public ItemStack[] getDropItems(IPipeTile pipe) { return new ItemStack[]{ new ItemStack(BuildCraftTransport.lensItem, 1, color | (isFilter ? 16 : 0)) }; } @Override - public boolean isBlocking(IPipeContainer pipe, ForgeDirection direction) { + public boolean isBlocking(IPipeTile pipe, ForgeDirection direction) { return false; } diff --git a/common/buildcraft/transport/pluggable/PlugPluggable.java b/common/buildcraft/transport/pluggable/PlugPluggable.java index e291ed06..36711ae8 100644 --- a/common/buildcraft/transport/pluggable/PlugPluggable.java +++ b/common/buildcraft/transport/pluggable/PlugPluggable.java @@ -11,7 +11,7 @@ import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.core.render.ITextureStates; import buildcraft.api.transport.IPipe; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.IPipePluggableRenderer; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.core.utils.MatrixTranformations; @@ -84,12 +84,12 @@ public class PlugPluggable extends PipePluggable { } @Override - public ItemStack[] getDropItems(IPipeContainer pipe) { + public ItemStack[] getDropItems(IPipeTile pipe) { return new ItemStack[] { new ItemStack(BuildCraftTransport.plugItem) }; } @Override - public boolean isBlocking(IPipeContainer pipe, ForgeDirection direction) { + public boolean isBlocking(IPipeTile pipe, ForgeDirection direction) { return true; } diff --git a/common/buildcraft/transport/pluggable/PowerAdapterPluggable.java b/common/buildcraft/transport/pluggable/PowerAdapterPluggable.java index d3ad7c61..88c717ea 100644 --- a/common/buildcraft/transport/pluggable/PowerAdapterPluggable.java +++ b/common/buildcraft/transport/pluggable/PowerAdapterPluggable.java @@ -12,7 +12,7 @@ import cofh.api.energy.IEnergyHandler; import buildcraft.BuildCraftTransport; import buildcraft.api.core.render.ITextureStates; import buildcraft.api.transport.IPipe; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.IPipePluggableRenderer; import buildcraft.api.transport.pluggable.PipePluggable; import buildcraft.core.utils.MatrixTranformations; @@ -22,7 +22,7 @@ public class PowerAdapterPluggable extends PipePluggable implements IEnergyHandl @SideOnly(Side.CLIENT) public final PowerAdapterPluggableRenderer RENDERER = new PowerAdapterPluggableRenderer(); - private IPipeContainer container; + private IPipeTile container; public class PowerAdapterPluggableRenderer implements IPipePluggableRenderer { private float zFightOffset = 1 / 4096.0F; @@ -77,7 +77,7 @@ public class PowerAdapterPluggable extends PipePluggable implements IEnergyHandl } @Override - public void validate(IPipeContainer pipe, ForgeDirection direction) { + public void validate(IPipeTile pipe, ForgeDirection direction) { this.container = pipe; } @@ -97,12 +97,12 @@ public class PowerAdapterPluggable extends PipePluggable implements IEnergyHandl } @Override - public ItemStack[] getDropItems(IPipeContainer pipe) { + public ItemStack[] getDropItems(IPipeTile pipe) { return new ItemStack[] { new ItemStack(BuildCraftTransport.plugItem) }; } @Override - public boolean isBlocking(IPipeContainer pipe, ForgeDirection direction) { + public boolean isBlocking(IPipeTile pipe, ForgeDirection direction) { return true; } diff --git a/common/buildcraft/transport/pluggable/RobotStationPluggable.java b/common/buildcraft/transport/pluggable/RobotStationPluggable.java index 205dc693..f300930f 100644 --- a/common/buildcraft/transport/pluggable/RobotStationPluggable.java +++ b/common/buildcraft/transport/pluggable/RobotStationPluggable.java @@ -11,7 +11,7 @@ import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftTransport; import buildcraft.api.core.render.ITextureStates; import buildcraft.api.transport.IPipe; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.pluggable.IPipePluggableItem; import buildcraft.api.transport.pluggable.IPipePluggableRenderer; import buildcraft.api.transport.pluggable.PipePluggable; @@ -169,7 +169,7 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab } @Override - public ItemStack[] getDropItems(IPipeContainer pipe) { + public ItemStack[] getDropItems(IPipeTile pipe) { return new ItemStack[] { new ItemStack(BuildCraftTransport.robotStationItem) }; } @@ -178,7 +178,7 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab } @Override - public boolean isBlocking(IPipeContainer pipe, ForgeDirection direction) { + public boolean isBlocking(IPipeTile pipe, ForgeDirection direction) { return true; } @@ -193,7 +193,7 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab } @Override - public void validate(IPipeContainer pipe, ForgeDirection direction) { + public void validate(IPipeTile pipe, ForgeDirection direction) { TileGenericPipe gPipe = (TileGenericPipe) pipe; if (!isValid && !gPipe.getWorld().isRemote) { station = (DockingStation) diff --git a/common/buildcraft/transport/render/PipeRendererTESR.java b/common/buildcraft/transport/render/PipeRendererTESR.java index ed65b073..f50cebc3 100644 --- a/common/buildcraft/transport/render/PipeRendererTESR.java +++ b/common/buildcraft/transport/render/PipeRendererTESR.java @@ -36,7 +36,7 @@ import buildcraft.BuildCraftCore.RenderMode; import buildcraft.BuildCraftTransport; import buildcraft.api.core.EnumColor; import buildcraft.api.gates.IGateExpansion; -import buildcraft.api.transport.IPipeContainer; +import buildcraft.api.transport.IPipeTile; import buildcraft.api.transport.PipeWire; import buildcraft.core.CoreConstants; import buildcraft.core.DefaultProps; @@ -280,14 +280,14 @@ public class PipeRendererTESR extends TileEntitySpecialRenderer { renderGatesWires(pipe, x, y, z); renderGates(pipe, x, y, z); - IPipeContainer.PipeType pipeType = pipe.getPipeType(); + IPipeTile.PipeType pipeType = pipe.getPipeType(); // do not use switch. we will be transitioning away from the enum - if (pipeType == IPipeContainer.PipeType.ITEM) { + if (pipeType == IPipeTile.PipeType.ITEM) { renderSolids(pipe.pipe, x, y, z); - } else if (pipeType == IPipeContainer.PipeType.FLUID) { + } else if (pipeType == IPipeTile.PipeType.FLUID) { renderFluids(pipe.pipe, x, y, z); - } else if (pipeType == IPipeContainer.PipeType.POWER) { + } else if (pipeType == IPipeTile.PipeType.POWER) { renderPower(pipe.pipe, x, y, z); } /* else if (pipeType == PipeType.STRUCTURE) { // no object to render in a structure pipe;