Package net.minecraft.item

Examples of net.minecraft.item.Item


        if (metadata == 3 || metadata == 8)
        {
            int count = quantityDropped(metadata, fortune, world.rand);
            for (int i = 0; i < count; i++)
            {
                Item id = getItemDropped(metadata, world.rand, 0);
                if (id != null)
                {
                    ret.add(new ItemStack(id, 1, damageDropped(metadata)));
                }
            }
View Full Code Here


public class MRFRegistering
{
    public static void registerWithMFR ()
    { //items
        Item seedsId = NContent.seeds;
        Item berryItemId = NContent.berryItem ;
        Item netherBerryItemId = NContent.netherBerryItem ;
        Item saguaroFruitId = NContent.seedFood ;
        Item cottonItemId = NContent.plantItem ;

        //blocks -- tried to imitate the sorting of PHNatura, but grabbed the block IDs from NContent
        Block saguaroId = NContent.saguaro  ;

        Block netherBerryBushId = NContent.netherBerryBush  ;
View Full Code Here

    }

    @Override
    protected void dropFewItems (boolean par1, int par2)
    {
        Item j = this.getDropItem();

        if (Item.getIdFromItem(j) > 0)
        {
            int k = this.rand.nextInt(3) + 2;
View Full Code Here

    }

    @Override
    protected void dropFewItems (boolean par1, int par2)
    {
        Item j = this.getDropItem();

        if (j != null)
        {
            int k = this.rand.nextInt(4) + 2;
View Full Code Here

    }

    @Override
    protected void dropFewItems (boolean par1, int par2)
    {
        Item j = this.getDropItem();

        if (j != null)
        {
            int k = this.rand.nextInt(3) + 2;
View Full Code Here

  public static void registerBoxable(Item item, IBoxable boxable) {
    boxableItems.put(item, boxable);
  }
 
  public static boolean canBeStoredInToolbox(ItemStack stack) {
    Item item = stack.getItem();
    // use customs first to allow for overriding behavior
    for (IBoxable boxable : boxableItems.get(item)) {
      if (boxable.canBeStoredInToolbox(stack)) return true;
    }
   
View Full Code Here

  public static void registerMetalArmor(Item item, IMetalArmor armor) {
    metalArmorItems.put(item, armor);
  }
 
  public static boolean isMetalArmor(ItemStack stack, EntityPlayer player) {
    Item item = stack.getItem();
    // use customs first to allow for overriding behavior
    for (IMetalArmor metalArmor : metalArmorItems.get(item)) {
      if (metalArmor.isMetalArmor(stack, player)) return true;
    }
   
View Full Code Here

      return null;
    }

    prop.set(id);

    Item item = null;
    try {
      item = clazz.getConstructor(int.class).newInstance(id);
    } catch (Throwable t) {
      t.printStackTrace();
    }

    if (item == null)
      return item;

    item.setUnlocalizedName(clazz.getSimpleName());
    GameRegistry.registerItem(item, item.getUnlocalizedName().replace("item.", ""));
    LanguageRegistry.addName(item, descr);

    addReceipe(item, 1, ingredient1, ingredient2, ingredient3);

    return item;
View Full Code Here

     */
    public static boolean isPlayerHoldingWrench(EntityPlayer player) {
      if(player.inventory.getCurrentItem() == null) {
        return false;
      }
      Item currentItem = player.inventory.getCurrentItem().getItem();
      return (ModHelperBase.useCofh && currentItem instanceof IToolHammer) ||
          (ModHelperBase.useBuildcraftTools && currentItem instanceof IToolWrench);
    }
View Full Code Here

    try
    {
      Class<?> forestryItems = Class.forName("forestry.core.config.ForestryItem");
      if(forestryItems != null)
      {
        Item peat = (Item)forestryItems.getField("peat").get(null);
        MFRRegistry.registerSludgeDrop(5, new ItemStack(peat));
      }
     
      MFRRegistry.registerPlantable(new PlantableForestryTree());
      MFRRegistry.registerFertilizable(new FertilizableForestryTree());
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.