From 9330dd18d954de86e70648ac62ecaf894e8de0ca Mon Sep 17 00:00:00 2001 From: AEnterprise Date: Thu, 18 Sep 2014 17:25:28 +0200 Subject: [PATCH] also need coordinates for the pipe placement location --- api/buildcraft/api/events/PipePlacedEvent.java | 6 +++++- common/buildcraft/builders/BlockFiller.java | 4 ++-- common/buildcraft/transport/BlockGenericPipe.java | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api/buildcraft/api/events/PipePlacedEvent.java b/api/buildcraft/api/events/PipePlacedEvent.java index 720a4c09..3f7c7ace 100644 --- a/api/buildcraft/api/events/PipePlacedEvent.java +++ b/api/buildcraft/api/events/PipePlacedEvent.java @@ -7,10 +7,14 @@ import cpw.mods.fml.common.eventhandler.Event; public class PipePlacedEvent extends Event { public EntityPlayer player; public String pipeType; + public int x, y, z; - public PipePlacedEvent(EntityPlayer player, String pipeType) { + public PipePlacedEvent(EntityPlayer player, String pipeType, int x, int y, int z) { this.player = player; this.pipeType = pipeType; + this.x = x; + this.y = y; + this.z = z; } } diff --git a/common/buildcraft/builders/BlockFiller.java b/common/buildcraft/builders/BlockFiller.java index 33e2ae03..b5894e2a 100644 --- a/common/buildcraft/builders/BlockFiller.java +++ b/common/buildcraft/builders/BlockFiller.java @@ -9,7 +9,6 @@ package buildcraft.builders; import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -27,11 +26,12 @@ import net.minecraftforge.common.util.ForgeDirection; import buildcraft.BuildCraftBuilders; import buildcraft.api.events.BlockInteractionEvent; import buildcraft.api.filler.IFillerPattern; +import buildcraft.core.BlockBuildCraft; import buildcraft.core.CreativeTabBuildCraft; import buildcraft.core.GuiIds; import buildcraft.core.utils.Utils; -public class BlockFiller extends BlockContainer { +public class BlockFiller extends BlockBuildCraft { public IFillerPattern currentPattern; private IIcon textureSides; diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index 4069a58f..7cd3935b 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -1133,7 +1133,7 @@ public class BlockGenericPipe extends BlockBuildCraft { TileGenericPipe tilePipe = (TileGenericPipe) tile; tilePipe.initialize(pipe); tilePipe.sendUpdateToClient(); - FMLCommonHandler.instance().bus().post(new PipePlacedEvent(player, pipe.item.getUnlocalizedName())); + FMLCommonHandler.instance().bus().post(new PipePlacedEvent(player, pipe.item.getUnlocalizedName(), i, j, k)); } }