From c386c08c02cbc1b3e3e5165e7a4af2797cece01a Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 6 Jan 2015 15:10:21 -0500 Subject: [PATCH] #1595 All buffers show as Item Buffer in WAILA TODO: fix this for all machines in a less hacky way --- .../crazypants/enderio/machine/buffer/BlockBuffer.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/crazypants/enderio/machine/buffer/BlockBuffer.java b/src/main/java/crazypants/enderio/machine/buffer/BlockBuffer.java index 43804c29..d6cbaafb 100644 --- a/src/main/java/crazypants/enderio/machine/buffer/BlockBuffer.java +++ b/src/main/java/crazypants/enderio/machine/buffer/BlockBuffer.java @@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -148,6 +149,12 @@ public class BlockBuffer extends AbstractMachineBlock implements IFa } return super.removedByPlayer(world, player, x, y, z, willHarvest); } + + // TODO refactor machines so all have this functionality + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) { + return createDrop((TileBuffer) world.getTileEntity(x, y, z)); + } private ItemStack createDrop(TileBuffer te) { ItemStack stack = new ItemStack(this, 1, BlockItemBuffer.Type.get(te).ordinal());