Search in sources :

Example 1 with TileEntityContainer

use of net.mcft.copy.betterstorage.tile.entity.TileEntityContainer in project BetterStorage by copygirl.

the class TileContainerBetterStorage method getPickBlock.

@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
    TileEntityContainer container = getContainer(world, x, y, z);
    if (container instanceof IHasAttachments) {
        ItemStack pick = ((IHasAttachments) container).getAttachments().pick(target);
        if (pick != null)
            return pick;
    }
    ItemStack pick = super.getPickBlock(target, world, x, y, z);
    return container.onPickBlock(pick, target);
}
Also used : TileEntityContainer(net.mcft.copy.betterstorage.tile.entity.TileEntityContainer) ItemStack(net.minecraft.item.ItemStack) IHasAttachments(net.mcft.copy.betterstorage.attachment.IHasAttachments)

Aggregations

IHasAttachments (net.mcft.copy.betterstorage.attachment.IHasAttachments)1 TileEntityContainer (net.mcft.copy.betterstorage.tile.entity.TileEntityContainer)1 ItemStack (net.minecraft.item.ItemStack)1