From 1a8e2326b91b379277cfa6321cee9fac5578373e Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Mon, 17 Nov 2014 22:40:18 +0000 Subject: [PATCH 1/2] Get rid of IPipeTile since it wasn't working anyway. Fixes #1971, #1975 --- .../multipart/PartLogisticalTransporter.java | 106 +----------------- 1 file changed, 1 insertion(+), 105 deletions(-) diff --git a/src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java b/src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java index 93f570b96..4e67a1bb2 100644 --- a/src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java +++ b/src/main/java/mekanism/common/multipart/PartLogisticalTransporter.java @@ -41,14 +41,12 @@ import cpw.mods.fml.relauncher.SideOnly; import io.netty.buffer.ByteBuf; -import buildcraft.api.gates.IGate; import buildcraft.api.transport.IPipe; import buildcraft.api.transport.IPipeTile; -import buildcraft.api.transport.PipeWire; import codechicken.lib.vec.Vector3; @Interface(iface = "buildcraft.api.transport.IPipeTile", modid = "BuildCraftAPI|transport") -public class PartLogisticalTransporter extends PartSidedPipe implements ILogisticalTransporter, IPipeTile +public class PartLogisticalTransporter extends PartSidedPipe implements ILogisticalTransporter { public static TransmitterIcons transporterIcons = new TransmitterIcons(3, 2); @@ -62,8 +60,6 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti public Set needsSync = new HashSet(); - public TransporterPipeProxy pipe = new TransporterPipeProxy(); - @Override public String getType() { @@ -752,104 +748,4 @@ public class PartLogisticalTransporter extends PartSidedPipe implements ILogisti { return 1; } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public int injectItem(ItemStack stack, boolean doAdd, ForgeDirection from, buildcraft.api.core.EnumColor color) { - return 0; - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public int injectItem(ItemStack stack, boolean doAdd, ForgeDirection from) - { - if(doAdd) - { - TileEntity tile = Coord4D.get(tile()).getFromSide(from).getTileEntity(world()); - - ItemStack rejects = TransporterUtils.insert(tile, this, stack, null, true, 0); - return TransporterManager.getToUse(stack, rejects).stackSize; - } - - return 0; - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public PipeType getPipeType() - { - return PipeType.ITEM; - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public boolean isPipeConnected(ForgeDirection with) - { - return connectionMapContainsSide(getAllCurrentConnections(), with); - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public TileEntity getAdjacentTile(ForgeDirection dir) { - return Coord4D.get(tile()).getFromSide(dir).getTileEntity(world()); - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public IPipe getPipe() { - return pipe; - } - - @Interface(iface = "buildcraft.api.transport.IPipe", modid = "BuildCraftAPI|transport") - public class TransporterPipeProxy implements IPipe - { - - @Override - @Method(modid = "BuildCraftAPI|transport") - public int x() { - return PartLogisticalTransporter.this.x(); - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public int y() { - return PartLogisticalTransporter.this.y(); - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public int z() { - return PartLogisticalTransporter.this.y(); - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public IPipeTile getTile() { - return (IPipeTile)tile(); - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public IGate getGate(ForgeDirection side) { - return null; - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public boolean hasGate(ForgeDirection side) { - return false; - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public boolean isWired(PipeWire wire) { - return false; - } - - @Override - @Method(modid = "BuildCraftAPI|transport") - public boolean isWireActive(PipeWire wire) { - return false; - } - } } From 1f2dd3162ad0d5e799401065947ef47ceabc1c6f Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Mon, 17 Nov 2014 22:40:38 +0000 Subject: [PATCH 2/2] Reorganise trait registration --- .../common/multipart/MultipartMekanism.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/mekanism/common/multipart/MultipartMekanism.java b/src/main/java/mekanism/common/multipart/MultipartMekanism.java index aaca6a239..52d093601 100644 --- a/src/main/java/mekanism/common/multipart/MultipartMekanism.java +++ b/src/main/java/mekanism/common/multipart/MultipartMekanism.java @@ -25,15 +25,15 @@ public class MultipartMekanism implements IPartFactory "mekanism:restrictive_transporter", "mekanism:diversion_transporter", "mekanism:glow_panel"}); - MultipartGenerator.registerPassThroughInterface("mekanism.api.transmitters.ITransmitter"); - MultipartGenerator.registerPassThroughInterface("mekanism.api.energy.IStrictEnergyAcceptor"); - MultipartGenerator.registerPassThroughInterface("mekanism.api.transmitters.IGridTransmitter"); - MultipartGenerator.registerPassThroughInterface("mekanism.common.ILogisticalTransporter"); - MultipartGenerator.registerPassThroughInterface("cofh.api.energy.IEnergyHandler"); MultipartGenerator.registerPassThroughInterface("mekanism.api.IConfigurable"); - MultipartGenerator.registerPassThroughInterface("mekanism.common.ITileNetwork"); - MultipartGenerator.registerPassThroughInterface("mekanism.api.transmitters.IBlockableConnection"); + MultipartGenerator.registerPassThroughInterface("mekanism.api.energy.IStrictEnergyAcceptor"); MultipartGenerator.registerPassThroughInterface("mekanism.api.gas.IGasHandler"); + MultipartGenerator.registerPassThroughInterface("mekanism.api.transmitters.IBlockableConnection"); + MultipartGenerator.registerPassThroughInterface("mekanism.api.transmitters.IGridTransmitter"); + MultipartGenerator.registerPassThroughInterface("mekanism.api.transmitters.ITransmitter"); + MultipartGenerator.registerPassThroughInterface("mekanism.common.ILogisticalTransporter"); + MultipartGenerator.registerPassThroughInterface("mekanism.common.ITileNetwork"); + MultipartGenerator.registerPassThroughInterface("cofh.api.energy.IEnergyHandler"); } @Override