Package net.minecraft.item

Examples of net.minecraft.item.Item


  {
    if(player.inventory.getCurrentItem() == null)
    {
      return false;
    }
    Item currentItem = Item.itemsList[player.inventory.getCurrentItem().itemID];
    if(currentItem instanceof IToolHammerAdvanced)
    {
      return ((IToolHammerAdvanced)currentItem).isActive(player.inventory.getCurrentItem());
    }
    else if(currentItem instanceof IToolHammer)
View Full Code Here


  {
    if(player.inventory.getCurrentItem() == null)
    {
      return false;
    }
    Item currentItem = Item.itemsList[player.inventory.getCurrentItem().itemID];
    if(currentItem != null && itemClass.isAssignableFrom(currentItem.getClass()))
    {
      return true;
    }
    return false;
  }
View Full Code Here

      }
      LiquidStack liquid = LiquidDictionary.getLiquid(ret, 0);
      if (liquid != null)
      {
        ItemStack q = liquid.asItemStack();
        Item temp = Item.itemsList[q.itemID];
        if (temp != null) ret = temp.getItemDisplayName(q);
      }
      _prefix = true;
      t = super.getItemDisplayName(item);
      _prefix = false;
      t = t != null ? t.trim() : "";
View Full Code Here

  private static void registerCinnamon()
  {
    try
    {
      Block fruit = (Block)Class.forName("mods.PamHarvestCraft.trees.cinnamon.PamHCCinnamon").getField("pamCinnamon").get(null);
      Item cinnamon = (Item)Class.forName("mods.PamHarvestCraft.trees.cinnamon.PamHCCinnamon").getField("cinnamonItem").get(null);
      MFRRegistry.registerFruit(new PamFruitCinnamon(fruit.blockID, cinnamon.itemID));
      MFRRegistry.registerFruitLogBlockId(fruit.blockID);
    }
    catch(Exception x)
    {
View Full Code Here

        MFRRegistry.registerPlantable(new PlantableCropPlant(seedId, blockId));
        MFRRegistry.registerHarvestable(new HarvestableCropPlant(blockId, 7));
        MFRRegistry.registerFertilizable(new FertilizableMagicalCropReflection(blockId, fertilize, 7));
      }
     
      Item magicalFertilizer = (Item)mod.getField("magicFertilizer").get(null);
      if(magicalFertilizer != null)
      {
        MFRRegistry.registerFertilizer(new FertilizerStandard(magicalFertilizer.itemID, 0, FertilizerType.GrowMagicalCrop));
      }
     
View Full Code Here

        boolean useBaubles = i >= invSize;
        IInventory inv = useBaubles ? baublesInv : mainInv;
        ItemStack stack = inv.getStackInSlot(i - (useBaubles ? invSize : 0));

        if(stack != null) {
          Item item = stack.getItem();
          if(item instanceof IManaUsingItem)
            anyRequest = anyRequest || ((IManaUsingItem) item).usesMana(stack);

          if(item instanceof IManaItem) {
            if(!((IManaItem) item).isNoExport(stack)) {
View Full Code Here

      for(EntityItem item : items) {
        if(item.age < 60 || item.isDead)
          continue;

        ItemStack stack = item.getEntityItem();
        Item stackItem = stack.getItem();
        if(stackItem instanceof ItemBlock || stackItem instanceof ItemReed) {
          if(!scanned) {
            for(int i = -rangePlace; i < rangePlace + 1; i++)
              for(int j = -rangePlaceY; j < rangePlaceY + 1; j++)
                for(int l = -rangePlace; l < rangePlace + 1; l++) {
View Full Code Here

    manaQuartzRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.quartz, 1, 1), new ItemStack(Items.quartz), 250);
    tinyPotatoRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.tinyPotato), new ItemStack(Items.potato), 1337);

    if(Botania.thaumcraftLoaded) {
      Item inkwell = (Item) Item.itemRegistry.getObject("Thaumcraft:ItemInkwell");
      manaInkwellRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaInkwell), new ItemStack(inkwell), 35000);
    }

    managlassRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.manaGlass), new ItemStack(Blocks.glass), 150);
   
View Full Code Here

    GameRegistry.addShapelessRecipe(new ItemStack(ModItems.manaResource, 9, 4), new ItemStack(ModBlocks.storage, 1, 1));
    GameRegistry.addShapelessRecipe(new ItemStack(ModItems.manaResource, 9, 7), new ItemStack(ModBlocks.storage, 1, 2));

    // Revealing Helmet Recipes
    if(Botania.thaumcraftLoaded) {
      Item goggles = (Item) Item.itemRegistry.getObject("Thaumcraft:ItemGoggles");
      GameRegistry.addShapelessRecipe(new ItemStack(ModItems.manasteelHelmRevealing), new ItemStack(ModItems.manasteelHelm), new ItemStack(goggles));
      recipeHelmetOfRevealing = BotaniaAPI.getLatestAddedRecipe();
      GameRegistry.addShapelessRecipe(new ItemStack(ModItems.terrasteelHelmRevealing), new ItemStack(ModItems.terrasteelHelm), new ItemStack(goggles));
      GameRegistry.addShapelessRecipe(new ItemStack(ModItems.elementiumHelmRevealing), new ItemStack(ModItems.elementiumHelm), new ItemStack(goggles));
    }
View Full Code Here

    nightVisionBrew = BotaniaAPI.registerBrewRecipe(ModBrews.nightVision, new ItemStack(Items.nether_wart), new ItemStack(Items.spider_eye), new ItemStack(Items.golden_carrot));
    absorptionBrew = BotaniaAPI.registerBrewRecipe(ModBrews.absorption, new ItemStack(Items.nether_wart), new ItemStack(Items.golden_apple), new ItemStack(Items.potato));
  }
 
  public static void initTC() {
    Item resource = (Item) Item.itemRegistry.getObject("Thaumcraft:ItemResource");
    Item bathSalts = (Item) Item.itemRegistry.getObject("Thaumcraft:ItemBathSalts");

    warpWardBrew = BotaniaAPI.registerBrewRecipe(ModBrews.warpWard, new ItemStack(Items.nether_wart), new ItemStack(resource, 1, 14), new ItemStack(bathSalts), new ItemStack(resource, 1, 6));
  }
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.