Package net.minecraft.item

Examples of net.minecraft.item.Item


      }
    }
  }

  public static IIcon getIconForItem(int itemId, int meta) {
    Item item = Item.getItemById(itemId);
    if(item == null) {
      return null;
    }
    return item.getIconFromDamage(meta);
  }
View Full Code Here


  public static void addDurabilityTooltip(List<String> toolTip, ItemStack itemStack) {
    if(!itemStack.isItemStackDamageable()) {
      return;
    }
    Item item = itemStack.getItem();
    if(item instanceof ItemTool || item instanceof ItemArmor ||
        item instanceof ItemSword || item instanceof ItemHoe || item instanceof ItemBow) {
      toolTip.add(ItemUtil.getDurabilityString(itemStack));
    }
  }
View Full Code Here

  }

  public ItemStack fillContainer(ItemStack container)
  {
    container.stackSize = 1;
    Item item = container.getItem();
    if (FluidContainerRegistry.isEmptyContainer(container))
    {
      ItemStack toReturn = FluidContainerRegistry.fillFluidContainer(new FluidStack(fluid, 1000), container);
      if (toReturn != null)
        if (drainFluid(FluidContainerRegistry.getFluidForFilledItem(toReturn)))
View Full Code Here

            }
            for (int i = 0; i < chest.topStacks.length; i++)
            {
                if (intData[pos + 2] != 0)
                {
                    Item it = Item.getItemById(intData[pos]);
                    ItemStack is = new ItemStack(it, intData[pos + 2], intData[pos + 1]);
                    chest.topStacks[i] = is;
                }
                else
                {
View Full Code Here

    return installCost;
  }

  @Override
  public boolean isValidForItem(ItemStack stack) {
    Item item = stack.getItem();
    return item instanceof IModularItem && this.validItems.contains( item );
  }
View Full Code Here

      FurnaceRecipes.smelting().func_151394_a(new ItemStack(EnderIO.itemPowderIngot, 1, PowderIngot.POWDER_TIN.ordinal()), ingots.get(0), 0);
    }

    ItemStack capacitor = new ItemStack(EnderIO.itemBasicCapacitor, 1, 0);
    ArrayList<ItemStack> copperIngots = OreDictionary.getOres("ingotCopper");
    Item gold;
    if(Config.useHardRecipes) {
      gold = Items.gold_ingot;
    } else {
      gold = Items.gold_nugget;
    }
View Full Code Here

  @Override
  public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {

    Block block = accessor.getBlock();
    TileEntity te = accessor.getTileEntity();
    Item item = Item.getItemFromBlock(block);
    EntityPlayer player = accessor.getPlayer();
    World world = player.worldObj;
    MovingObjectPosition pos = accessor.getPosition();

    int x = pos.blockX, y = pos.blockY, z = pos.blockZ;
View Full Code Here

  {
    ItemStack stack = player.getCurrentEquippedItem();
    if (stack == null) {
      return false;
    }
    Item equipped = stack.getItem();
    if ((equipped instanceof IToolWrench || equipped instanceof IToolHammer) && player.isSneaking() && !world.isRemote) {
      TileEntity te = world.getTileEntity(x, y, z);
      if (te instanceof TileElectricLight) {
        ((TileElectricLight) te).onBlockRemoved();
        world.setBlockToAir(x, y, z);
View Full Code Here

          }
         
          ItemStack equipped = evt.getPlayer().getCurrentEquippedItem();
          if(equipped != null) {
            for (UniqueIdentifier uid : toolBlackList) {
              Item blackListItem = GameRegistry.findItem(uid.modId, uid.name);
              if(blackListItem == equipped.getItem()) {
                return;
              }
            }
          }
View Full Code Here

  private Class<?> treeTap;
  private ItemStack stickyResin;

  public RubberTreeFarmerIC2() {
    super(GameRegistry.findBlock("IC2", "blockRubSapling"), GameRegistry.findBlock("IC2", "blockRubWood"));   
    Item item = GameRegistry.findItem("IC2", "itemTreetap");
    if(item != null) {
      treeTap = item.getClass();
      FarmersCommune.instance.registerToolType(treeTap);
    }
    item = GameRegistry.findItem("IC2", "itemHarz");
    if(item != null) {
      stickyResin = new ItemStack(item)
View Full Code Here

TOP

Related Classes of net.minecraft.item.Item

Copyright © 2018 www.massapicom. 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.