From fd3555a56a96c4c62454cbcb8843822ef4490d48 Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Sat, 27 Jul 2013 23:00:04 -0700 Subject: [PATCH] Fix injectItems Closes #1064 --- common/buildcraft/transport/TileGenericPipe.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/common/buildcraft/transport/TileGenericPipe.java b/common/buildcraft/transport/TileGenericPipe.java index 280fb4b9..dc03881b 100644 --- a/common/buildcraft/transport/TileGenericPipe.java +++ b/common/buildcraft/transport/TileGenericPipe.java @@ -334,16 +334,11 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, IFlui public int injectItem(ItemStack payload, boolean doAdd, ForgeDirection from) { if (BlockGenericPipe.isValid(pipe) && pipe.transport instanceof PipeTransportItems && isPipeConnected(from)) { if (doAdd) { - Position itemPos = new Position(xCoord, yCoord, zCoord, from.getOpposite()); - itemPos.moveBackwards(1.0); - - itemPos.x += 0.5; - itemPos.y += Utils.getPipeFloorOf(payload); - itemPos.z += 0.5; - itemPos.moveForwards(0.5); + Position itemPos = new Position(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, from.getOpposite()); + itemPos.moveBackwards(0.4); TravelingItem pipedItem = new TravelingItem(itemPos.x, itemPos.y, itemPos.z, payload); - ((PipeTransportItems) pipe.transport).injectItem(pipedItem, from.getOpposite()); + ((PipeTransportItems) pipe.transport).injectItem(pipedItem, itemPos.orientation); } return payload.stackSize; }