Examples of onItemUse()


Examples of net.minecraft.item.Item.onItemUse()

        if (!done)
          item.onItemUseFirst(stack, player, worldObj, coords.posX, coords.posY, coords.posZ, side, 0F, 0F, 0F);
        if (!done)
          done = block != null && block.onBlockActivated(worldObj, coords.posX, coords.posY, coords.posZ, player, side, 0F, 0F, 0F);
        if (!done)
          done = item.onItemUse(stack, player, worldObj, coords.posX, coords.posY, coords.posZ, side, 0F, 0F, 0F);
        if (!done) {
          item.onItemRightClick(stack, worldObj, player);
          done = true;
        }
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

                    Item item=inventorySlots[0].getItem();
                    ItemStack stack=inventorySlots[0];
                    if (!done)
                        item.onItemUseFirst(stack, player, worldObj, x, y, z, ForgeDirection.OPPOSITES[orientation], 0F, 0F, 0F);
                    if (!done)
                        done = item.onItemUse(stack, player, worldObj, x, y, z, ForgeDirection.OPPOSITES[orientation], 0F, 0F, 0F);
                    if (!done) {
                        item.onItemRightClick(stack, worldObj, player);
                        done = true;
                    }
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

    {
      for (int x = -half; x < half; x++)
      {
        for (int z = -half; z < half; z++)
        {
          i.onItemUse( is.copy(), who, worldObj, x + xCoord, y + yCoord - 1, z + zCoord, side, 0.5f, 0.0f, 0.5f );
        }
      }
    }
  }
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

          if ( i instanceof IPlantable || i instanceof ItemSkull || i instanceof ItemReed )
          {
            boolean Worked = false;

            if ( side.offsetX == 0 && side.offsetZ == 0 )
              Worked = i.onItemUse( is, player, w, x + side.offsetX, y + side.offsetY, z + side.offsetZ, side.getOpposite().ordinal(),
                  side.offsetX, side.offsetY, side.offsetZ );

            if ( !Worked && side.offsetX == 0 && side.offsetZ == 0 )
              Worked = i.onItemUse( is, player, w, x - side.offsetX, y - side.offsetY, z - side.offsetZ, side.ordinal(), side.offsetX,
                  side.offsetY, side.offsetZ );
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

            if ( side.offsetX == 0 && side.offsetZ == 0 )
              Worked = i.onItemUse( is, player, w, x + side.offsetX, y + side.offsetY, z + side.offsetZ, side.getOpposite().ordinal(),
                  side.offsetX, side.offsetY, side.offsetZ );

            if ( !Worked && side.offsetX == 0 && side.offsetZ == 0 )
              Worked = i.onItemUse( is, player, w, x - side.offsetX, y - side.offsetY, z - side.offsetZ, side.ordinal(), side.offsetX,
                  side.offsetY, side.offsetZ );

            if ( !Worked && side.offsetY == 0 )
              Worked = i.onItemUse( is, player, w, x, y - 1, z, ForgeDirection.UP.ordinal(), side.offsetX, side.offsetY, side.offsetZ );
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

            if ( !Worked && side.offsetX == 0 && side.offsetZ == 0 )
              Worked = i.onItemUse( is, player, w, x - side.offsetX, y - side.offsetY, z - side.offsetZ, side.ordinal(), side.offsetX,
                  side.offsetY, side.offsetZ );

            if ( !Worked && side.offsetY == 0 )
              Worked = i.onItemUse( is, player, w, x, y - 1, z, ForgeDirection.UP.ordinal(), side.offsetX, side.offsetY, side.offsetZ );

            if ( !Worked )
              i.onItemUse( is, player, w, x, y, z, side.getOpposite().ordinal(), side.offsetX, side.offsetY, side.offsetZ );

            maxStorage = maxStorage - is.stackSize;
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

            if ( !Worked && side.offsetY == 0 )
              Worked = i.onItemUse( is, player, w, x, y - 1, z, ForgeDirection.UP.ordinal(), side.offsetX, side.offsetY, side.offsetZ );

            if ( !Worked )
              i.onItemUse( is, player, w, x, y, z, side.getOpposite().ordinal(), side.offsetX, side.offsetY, side.offsetZ );

            maxStorage = maxStorage - is.stackSize;
          }
          else
          {
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

            maxStorage = maxStorage - is.stackSize;
          }
          else
          {
            i.onItemUse( is, player, w, x, y, z, side.getOpposite().ordinal(), side.offsetX, side.offsetY, side.offsetZ );
            maxStorage = maxStorage - is.stackSize;
          }
        }
        else
          maxStorage = 1;
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

                    int count = nearbyStack.stackSize;
                    if (item == TinkerTools.openBlocksDevNull)
                    {
                      //Openblocks uses current inventory slot, so we have to do this...
                      player.inventory.currentItem=itemSlot;
                      item.onItemUse(nearbyStack, player, world, x, y, z, side, clickX, clickY, clickZ);
                      player.inventory.currentItem=hotbarSlot;
                      player.swingItem();
                    }
                    else
                      used = item.onItemUse(nearbyStack, player, world, x, y, z, side, clickX, clickY, clickZ);
View Full Code Here

Examples of net.minecraft.item.Item.onItemUse()

                      item.onItemUse(nearbyStack, player, world, x, y, z, side, clickX, clickY, clickZ);
                      player.inventory.currentItem=hotbarSlot;
                      player.swingItem();
                    }
                    else
                      used = item.onItemUse(nearbyStack, player, world, x, y, z, side, clickX, clickY, clickZ);

                    // handle creative mode
                    if(player.capabilities.isCreativeMode) {
                        // fun fact: vanilla minecraft does it exactly the same way
                        nearbyStack.setItemDamage(dmg);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.