From 047882ef59f0e8d768cc816a82c6e8e530baa881 Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 16 Mar 2014 00:11:13 +0100 Subject: [PATCH] fixed basic stripe function, for #1491 --- .../transport/pipes/PipeItemsStripes.java | 15 ++++++--------- .../transport/pipes/events/PipeEventItem.java | 5 +---- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/common/buildcraft/transport/pipes/PipeItemsStripes.java b/common/buildcraft/transport/pipes/PipeItemsStripes.java index 9e207291..e91dfa15 100755 --- a/common/buildcraft/transport/pipes/PipeItemsStripes.java +++ b/common/buildcraft/transport/pipes/PipeItemsStripes.java @@ -8,6 +8,7 @@ */ package buildcraft.transport.pipes; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; @@ -62,21 +63,17 @@ public class PipeItemsStripes extends Pipe { }*/ public void eventHandler(PipeEventItem.DropItem event) { - System.out.println ("EVENT " + event.direction); - Position p = new Position(container.xCoord, container.yCoord, - container.zCoord, ForgeDirection.UP); + container.zCoord, event.direction); Position from = new Position (p); p.moveForwards(1.0); - //if (getWorld().getBlock((int) p.x, (int) p.y, (int) p.z) == Blocks.air) { - System.out.println ("TRY PLACE"); - + if (getWorld().getBlock((int) p.x, (int) p.y, (int) p.z) == Blocks.air) { event.entity.getEntityItem().tryPlaceItemIntoWorld( CoreProxy.proxy.getBuildCraftPlayer(getWorld()), - getWorld(), - (int) p.x, (int) p.y - 1, (int) p.z, 1, 0.0f, 0.0f, 0.0f); - //} + getWorld(), (int) p.x, (int) p.y, (int) p.z, 1, 0.0f, 0.0f, + 0.0f); + } /*if (convertPipe(pipe, data)) { BuildCraftTransport.pipeItemsStipes.onItemUse(new ItemStack( diff --git a/common/buildcraft/transport/pipes/events/PipeEventItem.java b/common/buildcraft/transport/pipes/events/PipeEventItem.java index e8309e5a..65ba104a 100644 --- a/common/buildcraft/transport/pipes/events/PipeEventItem.java +++ b/common/buildcraft/transport/pipes/events/PipeEventItem.java @@ -59,13 +59,10 @@ public abstract class PipeEventItem extends PipeEvent { super(item); this.entity = entity; - System.out.println ("OUTPUT = " + item.output); - System.out.println ("INPUT = " + item.output); - if (item.output != ForgeDirection.UNKNOWN) { this.direction = item.output; } else { - this.direction = item.input.getOpposite(); + this.direction = item.input; } } }