com/spacechase0/minecraft/componentequipment/item/HarvesterToolItem.java
// I modified it to do the slot above though
I modified it to do the slot above though
I modified it to do the slot above though
@Override
    public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float clickX, float clickY, float clickZ)
    {
        /*if (world.isRemote)
            return true;*/
        int posX = x;
        int posY = y;
        int posZ = z;
        int playerPosX = (int) Math.floor(player.posX);
        int playerPosY = (int) Math.floor(player.posY);
        int playerPosZ = (int) Math.floor(player.posZ);
        if (side == 0)
        {
            --posY;
        }
        if (side == 1)
        {
            ++posY;
        }
        if (side == 2)
        {
            --posZ;
        }
        if (side == 3)
        {
            ++posZ;
        }
        if (side == 4)
        {
            --posX;
        }
        if (side == 5)
        {
            ++posX;
        }
        if (posX == playerPosX && (posY == playerPosY || posY == playerPosY + 1 || posY == playerPosY - 1) && posZ == playerPosZ)
        {
            return false;
        }
        boolean used = false;
        int hotbarSlot = player.inventory.currentItem;
        int itemSlot = hotbarSlot + ( InventoryPlayer.getHotbarSize() * 3 );
        ItemStack nearbyStack = null;
        {
            nearbyStack = player.inventory.getStackInSlot(itemSlot);
            if (nearbyStack != null && nearbyStack.getItem() instanceof ItemBlock)
            {
                used = nearbyStack.getItem().onItemUse(nearbyStack, player, world, x, y, z, side, clickX, clickY, clickZ);
                if (nearbyStack.stackSize < 1)
                {
                    nearbyStack = null;
                    player.inventory.setInventorySlotContents(itemSlot, null);
                }
            }
        }
        /*if (used) //Update client
        {
            Packet103SetSlot packet = new Packet103SetSlot(player.openContainer.windowId, itemSlot, nearbyStack);
            ((EntityPlayerMP)player).playerNetServerHandler.sendPacketToPlayer(packet);
        }*/
        return used;
    }
@ Override public boolean onItemUse ( ItemStack stack , EntityPlayer player , World world , int x , int y , int z , int side , float clickX , float clickY , float clickZ ) { /*if (world.isRemote)
            return true;*/ int posX = x ; int posY = y ; int posZ = z ; int playerPosX = ( int ) Math . floor ( player . posX ) ; int playerPosY = ( int ) Math . floor ( player . posY ) ; int playerPosZ = ( int ) Math . floor ( player . posZ ) ; if ( side == 0 ) { -- posY ; } if ( side == 1 ) { ++ posY ; } if ( side == 2 ) { -- posZ ; } if ( side == 3 ) { ++ posZ ; } if ( side == 4 ) { -- posX ; } if ( side == 5 ) { ++ posX ; } if ( posX == playerPosX && ( posY == playerPosY || posY == playerPosY + 1 || posY == playerPosY - 1 ) && posZ == playerPosZ ) { return false ; } boolean used = false ; int hotbarSlot = player . inventory . currentItem ; int itemSlot = hotbarSlot + ( InventoryPlayer . getHotbarSize ( ) * 3 ) ; ItemStack nearbyStack = null ; { nearbyStack = player . inventory . getStackInSlot ( itemSlot ) ; if ( nearbyStack != null && nearbyStack . getItem ( ) instanceof ItemBlock ) { used = nearbyStack . getItem ( ) . onItemUse ( nearbyStack , player , world , x , y , z , side , clickX , clickY , clickZ ) ; if ( nearbyStack . stackSize < 1 ) { nearbyStack = null ; player . inventory . setInventorySlotContents ( itemSlot , null ) ; } } } /*if (used) //Update client
        {
            Packet103SetSlot packet = new Packet103SetSlot(player.openContainer.windowId, itemSlot, nearbyStack);
            ((EntityPlayerMP)player).playerNetServerHandler.sendPacketToPlayer(packet);
        }*/ return used ; }
I modified it to do the slot above though
I modified it to do the slot above though
//hotbarSlot == 0 ? 8 : hotbarSlot + 1; //if (hotbarSlot < 8)