Package net.minecraft.item

Examples of net.minecraft.item.Item


        renderBlocks.setOverrideBlockTexture(EnderIO.blockPainter.getInvisibleIcon());
      } else {
        renderBlocks.setOverrideBlockTexture(renderBlocks.getBlockIconFromSideAndMetadata(block, 2, meta));
      }
    }
    Item i = item.getItem();
    if(i instanceof ItemBlock) {
      renderBlocks.renderBlockAsItem(((ItemBlock) i).field_150939_a, item.getItemDamage(), 1.0f);
    }

    renderBlocks.clearOverrideBlockTexture();
View Full Code Here


  private static String UPGRADE_NAME = "gogglesRevealing";

  public static final GogglesOfRevealingUpgrade INSTANCE = new GogglesOfRevealingUpgrade();

  public static ItemStack getGoggles() {
    Item i = GameRegistry.findItem("Thaumcraft", "ItemGoggles");
    if(i != null) {
      return new ItemStack(i);
    }
    return null;
  }
View Full Code Here

  }

  private ItemStack getFilledBucket(World world, MovingObjectPosition pos) {

    Block block = world.getBlock(pos.blockX, pos.blockY, pos.blockZ);
    Item bucket = buckets.get(block);
    if(bucket != null && world.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) == 0) {
      world.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ);
      return new ItemStack(bucket);
    } else {
      return null;
View Full Code Here

  }

  public static void addPickable(String mod, String blockName, String itemName) {
    Block cropBlock = GameRegistry.findBlock(mod, blockName);
    if(cropBlock != null) {
      Item seedItem = GameRegistry.findItem(mod, itemName);
      if(seedItem != null) {
        FarmersCommune.joinCommune(new PickableFarmer(cropBlock, new ItemStack(seedItem)));
      }
    }
  }
View Full Code Here

  }

  public static CustomSeedFarmer addSeed(String mod, String blockName, String itemName, Block... extraFarmland) {
    Block cropBlock = GameRegistry.findBlock(mod, blockName);
    if(cropBlock != null) {
      Item seedItem = GameRegistry.findItem(mod, itemName);
      if(seedItem != null) {
        CustomSeedFarmer farmer = new CustomSeedFarmer(cropBlock, new ItemStack(seedItem));
        if(extraFarmland != null) {
          for (Block farmland : extraFarmland) {
            if(farmland != null) {
View Full Code Here

    String mod = "TConstruct";
    String blockName = "ore.berries.two";

    Block cropBlock = GameRegistry.findBlock(mod, blockName);
    if(cropBlock != null) {
      Item seedItem = GameRegistry.findItem(mod, blockName);
      if(seedItem != null) {
        for (int i = 0; i < 2; i++) {
          PickableFarmer farmer = new NaturaBerryFarmer(cropBlock, i, 12 + i, new ItemStack(seedItem, 1, 8 + i));
          farmer.setRequiresFarmland(false);
          FarmersCommune.joinCommune(farmer);
        }
      }
    }

    blockName = "ore.berries.one";
    cropBlock = GameRegistry.findBlock(mod, blockName);
    if(cropBlock != null) {
      Item seedItem = GameRegistry.findItem(mod, blockName);
      if(seedItem != null) {
        for (int i = 0; i < 4; i++) {
          PickableFarmer farmer = new NaturaBerryFarmer(cropBlock, i, 12 + i, new ItemStack(seedItem, 1, 8 + i));
          farmer.setRequiresFarmland(false);
          FarmersCommune.joinCommune(farmer);
View Full Code Here

    String blockName = "N Crops";

    Block cropBlock = GameRegistry.findBlock(mod, blockName);
    if(cropBlock != null) {
      DEFAULT_FARMER.addHarvestExlude(cropBlock);
      Item seedItem = GameRegistry.findItem(mod, "barley.seed");
      if(seedItem != null) {
        //barley
        FarmersCommune.joinCommune(new CustomSeedFarmer(cropBlock, 3, new ItemStack(seedItem)));
        // cotton
        FarmersCommune.joinCommune(new PickableFarmer(cropBlock, 4, 8, new ItemStack(seedItem, 1, 1)));
      }
    }

    blockName = "BerryBush";
    cropBlock = GameRegistry.findBlock(mod, blockName);
    if(cropBlock != null) {
      Item seedItem = GameRegistry.findItem(mod, blockName);
      if(seedItem != null) {
        for (int i = 0; i < 4; i++) {
          PickableFarmer farmer = new NaturaBerryFarmer(cropBlock, i, 12 + i, new ItemStack(seedItem, 1, 12 + i));
          farmer.setRequiresFarmland(false);
          FarmersCommune.joinCommune(farmer);
View Full Code Here

    String modId = getStringValue(AT_MOD_ID, attributes, null);
    String name = getStringValue(AT_ITEM_NAME, attributes, null);

    if(modId != null && name != null) {

      Item i = GameRegistry.findItem(modId, name);
      if(i != null) {
        res = new ItemStack(i, stackSize, useMeta ? itemMeta : 0);
      } else {
        Block b = GameRegistry.findBlock(modId, name);
        if(b != null) {
View Full Code Here

  public boolean isPowerFistEquiped(ItemStack equipped) {
    if(!isMpsInstalled || equipped == null || equipped.getItem() == null) {
      return false;
    }
    Item item = equipped.getItem();
    if(powerFistClass.isAssignableFrom(item.getClass())) {
      return true;
    }
    return false;
  }
View Full Code Here

    TileEntityGasTank tileEntity = (TileEntityGasTank)world.getTileEntity(x, y, z);

    if(entityplayer.getCurrentEquippedItem() != null)
    {
      Item tool = entityplayer.getCurrentEquippedItem().getItem();

      if(MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
      {
        if(entityplayer.isSneaking())
        {
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.