Package net.minecraft.item

Examples of net.minecraft.item.ItemStack


  public void getSubItems(Item par1Item, CreativeTabs par2CreativeTabs, List list) {
    super.getSubItems(par1Item, par2CreativeTabs, list);
    for (EnumMobAspect aspect : EnumMobAspect.values()) {
      Class aspClass = aspect.getEntityClass();
      String name = (String) EntityList.classToStringMapping.get(aspClass);
      ItemStack item = new ItemStack(this);
      this.setEntityType(item, name);
      list.add(item);

    }
  }
View Full Code Here


    return true;
  }

  @Override
  public IRegisterableResearch getResearchItem() {
    return (TTResearchItem) new TTResearchItem(LibResearch.KEY_CLEANSING_TALISMAN, new AspectList().add(Aspect.HEAL, 2).add(Aspect.ORDER, 1).add(Aspect.POISON, 1), -3, 4, 3, new ItemStack(this)).setSecondary().setParents(LibResearch.KEY_DARK_QUARTZ)
        .setPages(new ResearchPage("0"), ResearchHelper.infusionPage(LibResearch.KEY_CLEANSING_TALISMAN));

  }
View Full Code Here

  }

  @Override
  public ThaumicTinkererRecipe getRecipeItem() {
    return new ThaumicTinkererInfusionRecipe(LibResearch.KEY_CLEANSING_TALISMAN, new ItemStack(this), 5, new AspectList().add(Aspect.HEAL, 10).add(Aspect.TOOL, 10).add(Aspect.MAN, 20).add(Aspect.LIFE, 10), new ItemStack(Items.ender_pearl),
        new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemDarkQuartz.class)), new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemDarkQuartz.class)), new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemDarkQuartz.class)), new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemDarkQuartz.class)), new ItemStack(Items.ghast_tear), new ItemStack(ConfigItems.itemResource, 1, 1));

  }
View Full Code Here

    if (world.provider instanceof WorldProviderBedrock) {
      for (int k = 0; k < density; k++) {
        int firstBlockXCoord = 16 * chunkX + random.nextInt(16);
        int firstBlockZCoord = 16 * chunkZ + random.nextInt(16);
        ItemStack itemStack = EnumOreFrequency.getRandomOre(random);
        for (int l = 0; l < 200; l++) {
          int firstBlockYCoord = random.nextInt(245) + 6;
          WorldGenMinable mineable = new WorldGenMinable(Block.getBlockFromItem(itemStack.getItem()), itemStack.getItemDamage(), random.nextInt(20), Blocks.bedrock);
          mineable.generate(world, random, firstBlockXCoord, firstBlockYCoord, firstBlockZCoord);
        }
      }
    }
  }
View Full Code Here

    }

    @Override
    public void getSubItems(Item item, CreativeTabs tab, List l) {
        for (Aspect primal : Aspect.getPrimalAspects()) {
            ItemStack itemStack = new ItemStack(item, 1);
            setAspect(itemStack, primal);
            setAspectTendencies(itemStack, new AspectList());
            l.add(itemStack);
        }
    }
View Full Code Here

    public EnumRarity getRarity(ItemStack par1ItemStack) {
        return EnumRarity.rare;
    }

    public static ItemStack getStackFromAspect(Aspect a) {
        ItemStack stack = new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemInfusedSeeds.class));
        setAspect(stack, a);
        return stack;
    }
View Full Code Here

    }

    @Override
    public ThaumicTinkererRecipe getRecipeItem() {
        return new ThaumicTinkererRecipeMulti(
                new ThaumicTinkererInfusionRecipe(LibResearch.KEY_POTIONS + 0, getStackFromAspect(Aspect.AIR), 5, new AspectList().add(Aspect.CROP, 32).add(Aspect.HARVEST, 32), new ItemStack(Items.wheat_seeds), new ItemStack(ConfigItems.itemShard, 1, 0), new ItemStack(ConfigItems.itemShard, 1, 0), new ItemStack(ConfigItems.itemShard, 1, 0), new ItemStack(ConfigItems.itemShard, 1, 0)),

                new ThaumicTinkererInfusionRecipe(LibResearch.KEY_POTIONS + 1, getStackFromAspect(Aspect.FIRE), 5, new AspectList().add(Aspect.CROP, 32).add(Aspect.HARVEST, 32), new ItemStack(Items.wheat_seeds), new ItemStack(ConfigItems.itemShard, 1, 1), new ItemStack(ConfigItems.itemShard, 1, 1), new ItemStack(ConfigItems.itemShard, 1, 1), new ItemStack(ConfigItems.itemShard, 1, 1)),

                new ThaumicTinkererInfusionRecipe(LibResearch.KEY_POTIONS + 2, getStackFromAspect(Aspect.EARTH), 5, new AspectList().add(Aspect.CROP, 32).add(Aspect.HARVEST, 32), new ItemStack(Items.wheat_seeds), new ItemStack(ConfigItems.itemShard, 1, 3), new ItemStack(ConfigItems.itemShard, 1, 3), new ItemStack(ConfigItems.itemShard, 1, 3), new ItemStack(ConfigItems.itemShard, 1, 3)),

                new ThaumicTinkererInfusionRecipe(LibResearch.KEY_POTIONS + 3, getStackFromAspect(Aspect.WATER), 5, new AspectList().add(Aspect.CROP, 32).add(Aspect.HARVEST, 32), new ItemStack(Items.wheat_seeds), new ItemStack(ConfigItems.itemShard, 1, 2), new ItemStack(ConfigItems.itemShard, 1, 2), new ItemStack(ConfigItems.itemShard, 1, 2), new ItemStack(ConfigItems.itemShard, 1, 2)),


                new ThaumicTinkererInfusionRecipe(LibResearch.KEY_POTIONS + 4, getStackFromAspect(Aspect.ORDER), 5, new AspectList().add(Aspect.CROP, 32).add(Aspect.HARVEST, 32), new ItemStack(Items.wheat_seeds), new ItemStack(ConfigItems.itemShard, 1, 4), new ItemStack(ConfigItems.itemShard, 1, 4), new ItemStack(ConfigItems.itemShard, 1, 4), new ItemStack(ConfigItems.itemShard, 1, 4)),
                new ThaumicTinkererInfusionRecipe(LibResearch.KEY_POTIONS + 5, getStackFromAspect(Aspect.ENTROPY), 5, new AspectList().add(Aspect.CROP, 32).add(Aspect.HARVEST, 32), new ItemStack(Items.wheat_seeds), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigItems.itemShard, 1, 5), new ItemStack(ConfigItems.itemShard, 1, 5))
        );
    }
View Full Code Here

        list.addAll(this.list);

    }

    private void addWand() {
        ItemStack wand = new ItemStack(ConfigItems.itemWandCasting);
        ((ItemWandCasting) wand.getItem()).setRod(wand, ConfigItems.WAND_ROD_SILVERWOOD);
        ((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_THAUMIUM);
        ((ItemWandCasting) wand.getItem()).storeAllVis(wand, new AspectList().add(Aspect.AIR, 10000).add(Aspect.EARTH, 10000).add(Aspect.FIRE, 10000).add(Aspect.WATER, 10000).add(Aspect.ORDER, 10000).add(Aspect.ENTROPY, 10000));
        if (list != null)
            list.add(wand);
        displayItem = wand;

        if (ConfigHandler.enableKami) {
            ItemStack wand1 = new ItemStack(ConfigItems.itemWandCasting);
            ((ItemWandCasting) wand1.getItem()).setRod(wand1, ThaumicTinkerer.proxy.rodIchor);
            ((ItemWandCasting) wand1.getItem()).setCap(wand1, ThaumicTinkerer.proxy.capIchor);
            ((ItemWandCasting) wand1.getItem()).storeAllVis(wand1, new AspectList().add(Aspect.AIR, 100000).add(Aspect.EARTH, 100000).add(Aspect.FIRE, 100000).add(Aspect.WATER, 100000).add(Aspect.ORDER, 100000).add(Aspect.ENTROPY, 100000));
            if (list != null)
                list.add(wand1);
            displayItem = wand1;
        }
    }
View Full Code Here

    EntityLivingBase living = (EntityLivingBase) entity;
    isSneak = living != null && living.isSneaking();
    if (living != null && living instanceof EntityPlayer) {
      EntityPlayer player = (EntityPlayer) living;

      ItemStack itemstack = player.inventory.getCurrentItem();
      heldItemRight = itemstack != null ? 1 : 0;

      if (itemstack != null && player.getItemInUseCount() > 0) {
        EnumAction enumaction = itemstack.getItemUseAction();

        if (enumaction == EnumAction.block)
          heldItemRight = 3;
        else if (enumaction == EnumAction.bow)
          aimedBow = true;
View Full Code Here

  @Override
  public boolean matches(InventoryCrafting var1, World var2) {
    boolean foundCloth = false;
    boolean foundEnchanted = false;
    for (int i = 0; i < var1.getSizeInventory(); i++) {
      ItemStack stack = var1.getStackInSlot(i);
      if (stack != null) {
        if (stack.isItemEnchanted() && !(stack.getItem() instanceof INoRemoveEnchant) && !foundEnchanted)
          foundEnchanted = true;

        else if (stack.getItem() == item && !foundCloth)
          foundCloth = true;

        else return false; // Found an invalid item, breaking the recipe
      }
    }
View Full Code Here

TOP

Related Classes of net.minecraft.item.ItemStack

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.