also need coordinates for the pipe placement location
This commit is contained in:
parent
fb706ae1ab
commit
9330dd18d9
3 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue