Package net.minecraft.item

Examples of net.minecraft.item.ItemStack


  }

  @Override
  public ThaumicTinkererRecipe getRecipeItem() {
    return
        new ThaumicTinkererInfusionRecipe(LibResearch.KEY_FOCUS_FLIGHT, new ItemStack(this), 3, new AspectList().add(Aspect.AIR, 15).add(Aspect.MOTION, 20).add(Aspect.TRAVEL, 10), new ItemStack(Items.ender_pearl),
            new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.feather), new ItemStack(Items.feather), new ItemStack(ConfigItems.itemShard, 1, 0));
  }
View Full Code Here


  }

  @Override
  public ThaumicTinkererRecipe getRecipeItem() {

    return new ThaumicTinkererArcaneRecipe(LibResearch.KEY_INTERFACE + "1", LibResearch.KEY_INTERFACE, new ItemStack(this), new AspectList().add(Aspect.ORDER, 2),
        " I ", " WI", "S  ",
        'I', new ItemStack(Items.iron_ingot),
        'W', new ItemStack(Items.stick),
        'S', new ItemStack(ConfigItems.itemShard, 1, 4));
  }
View Full Code Here

    return LibItemNames.FOCUS_TELEKINESIS;
  }

  @Override
  public IRegisterableResearch getResearchItem() {
    return (TTResearchItem) new TTResearchItem(LibResearch.KEY_FOCUS_TELEKINESIS, new AspectList().add(Aspect.ELDRITCH, 2).add(Aspect.MAGIC, 1).add(Aspect.MOTION, 1), -4, -6, 2, new ItemStack(this)).setParents(LibResearch.KEY_FOCUS_FLIGHT).setConcealed()
        .setPages(new ResearchPage("0"), ResearchHelper.infusionPage(LibResearch.KEY_FOCUS_TELEKINESIS)).setSecondary();
  }
View Full Code Here

        .setPages(new ResearchPage("0"), ResearchHelper.infusionPage(LibResearch.KEY_FOCUS_TELEKINESIS)).setSecondary();
  }

  @Override
  public ThaumicTinkererRecipe getRecipeItem() {
    return new ThaumicTinkererInfusionRecipe(LibResearch.KEY_FOCUS_TELEKINESIS, new ItemStack(this), 5, new AspectList().add(Aspect.MOTION, 10).add(Aspect.AIR, 20).add(Aspect.ENTROPY, 20).add(Aspect.MIND, 10), new ItemStack(Items.ender_pearl),
        new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.iron_ingot), new ItemStack(Items.gold_ingot), new ItemStack(ConfigItems.itemShard, 1, 0));

  }
View Full Code Here

    return true;
  }

  @Override
  public IRegisterableResearch getResearchItem() {
    return (IRegisterableResearch) new KamiResearchItem(LibResearch.KEY_ICHOR_POUCH, new AspectList().add(Aspect.VOID, 2).add(Aspect.CLOTH, 1).add(Aspect.ELDRITCH, 1).add(Aspect.MAN, 1), 13, 6, 5, new ItemStack(this)).setParents(LibResearch.KEY_ICHOR_CLOTH)
        .setPages(new ResearchPage("0"), ResearchHelper.infusionPage(LibResearch.KEY_ICHOR_POUCH));

  }
View Full Code Here

  }

  @Override
  public ThaumicTinkererRecipe getRecipeItem() {
    return new ThaumicTinkererInfusionRecipe(LibResearch.KEY_ICHOR_POUCH, new ItemStack(this), 9, new AspectList().add(Aspect.VOID, 64).add(Aspect.MAN, 32).add(Aspect.CLOTH, 32).add(Aspect.ELDRITCH, 32).add(Aspect.AIR, 64), new ItemStack(ConfigItems.itemFocusPouch),
        new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemKamiResource.class), 1, 1), new ItemStack(ConfigItems.itemFocusPortableHole), new ItemStack(Items.diamond), new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemKamiResource.class), 1, 1), new ItemStack(ConfigBlocks.blockChestHungry), new ItemStack(ConfigBlocks.blockJar, 1, 3));

  }
View Full Code Here

  public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
    if (!(par3Entity instanceof EntityPlayer))
      return;

    EntityPlayer player = (EntityPlayer) par3Entity;
    ItemStack currentStack = player.getCurrentEquippedItem();
    if (currentStack == null || !(currentStack.getItem() instanceof IAdvancedTool))
      return;
    IAdvancedTool tool = (IAdvancedTool) currentStack.getItem();

    if (tool.getType().equals("sword"))
      return;

    MovingObjectPosition pos = ToolHandler.raytraceFromEntity(par2World, par3Entity, true, 4.5F);
    String typeToFind = "";

    if (player.isSwingInProgress && pos != null) {
      Block block = par2World.getBlock(pos.blockX, pos.blockY, pos.blockZ);

      if (block != null) {
        Material mat = block.getMaterial();
        if (ToolHandler.isRightMaterial(mat, ToolHandler.materialsPick))
          typeToFind = "pick";
        else if (ToolHandler.isRightMaterial(mat, ToolHandler.materialsShovel))
          typeToFind = "shovel";
        else if (ToolHandler.isRightMaterial(mat, ToolHandler.materialsAxe))
          typeToFind = "axe";
      }
    }

    if (tool.getType().equals(typeToFind) || typeToFind.isEmpty())
      return;

    for (int i = 0; i < player.inventory.getSizeInventory(); i++) {
      ItemStack stackInSlot = player.inventory.getStackInSlot(i);
      if (stackInSlot != null && stackInSlot.getItem() instanceof IAdvancedTool && stackInSlot != currentStack) {
        IAdvancedTool toolInSlot = (IAdvancedTool) stackInSlot.getItem();
        if (toolInSlot.getType().equals(typeToFind)) {
          player.inventory.setInventorySlotContents(player.inventory.currentItem, stackInSlot);
          player.inventory.setInventorySlotContents(i, currentStack);
          break;
        }
View Full Code Here

    return LibItemNames.PROTOCLAY;
  }

  @Override
  public IRegisterableResearch getResearchItem() {
    return (IRegisterableResearch) new KamiResearchItem(LibResearch.KEY_PROTOCLAY, new AspectList().add(Aspect.TOOL, 2).add(Aspect.MINE, 1).add(Aspect.MAN, 1).add(Aspect.MECHANISM, 1), 12, 17, 5, new ItemStack(this)).setParents(LibResearch.KEY_ICHOR_PICK_GEM).setParentsHidden(LibResearch.KEY_ICHOR_SHOVEL_GEM)
        .setPages(new ResearchPage("0"), ResearchHelper.infusionPage(LibResearch.KEY_PROTOCLAY));

  }
View Full Code Here

  }

  @Override
  public ThaumicTinkererRecipe getRecipeItem() {
    return new ThaumicTinkererInfusionRecipe(LibResearch.KEY_PROTOCLAY, new ItemStack(this), 4, new AspectList().add(Aspect.MINE, 16).add(Aspect.TOOL, 16), new ItemStack(Items.clay_ball),

        new ItemStack(Blocks.dirt), new ItemStack(Blocks.stone), new ItemStack(Blocks.log), new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemKamiResource.class), 1, 7));

  }
View Full Code Here

  public void placeAllBlocks(ItemStack stack, EntityPlayer player) {
    ChunkCoordinates[] blocksToPlace = getBlocksToPlace(stack, player);
    if (!hasBlocks(stack, player, blocksToPlace))
      return;

    ItemStack stackToPlace = new ItemStack(getBlock(stack), 1, getBlockMeta(stack));
    for (ChunkCoordinates coords : blocksToPlace)
      placeBlockAndConsume(player, stackToPlace, coords);
    player.worldObj.playSoundAtEntity(player, "thaumcraft:wand", 1F, 1F);
  }
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.