Package net.minecraft.src

Examples of net.minecraft.src.ItemStack


       
        if (owner == null || owner.equalsIgnoreCase("")) {
            owner = entityplayer.username;
        }
       
        ItemStack equippedItem = entityplayer.getCurrentEquippedItem();
       
        if (equippedItem != null) {
           
            if (mod_AdditionalPipes.isPipe(equippedItem.getItem()))  {
                return false;
            }

            if (equippedItem.getItem() == BuildCraftCore.wrenchItem && !mod_AdditionalPipes.wrenchOpensGui) {
                return false;
            }
        }

        entityplayer.openGui(mod_AdditionalPipes.instance, guiId,
View Full Code Here


        }

        if (tile instanceof IInventory) {
            IInventory inventory = (IInventory) tile;

            ItemStack stack = checkExtract(inventory, true,
                                           pos.orientation.reverse());

            if (stack == null || stack.stackSize == 0) {
                powerProvider.useEnergy(1, 1, false);
                return;
View Full Code Here

        //    if (inventory instanceof ISpecialInventory) {
        //      //At the moment we are going to let special inventorys handle there own. Might change if popular demand
        //      return ((ISpecialInventory) inventory).extractItem(doRemove, from);
        //    }
        IInventory inv = Utils.getInventory(inventory);
        ItemStack result = checkExtractGeneric(inv, doRemove, from);
        return result;
    }
View Full Code Here

                                         boolean doRemove, Orientations from) {
        for (int k = 0; k < inventory.getSizeInventory(); ++k) {
            if (inventory.getStackInSlot(k) != null
                    && inventory.getStackInSlot(k).stackSize > 0) {

                ItemStack slot = inventory.getStackInSlot(k);

                if (slot != null && slot.stackSize > 0 && CanExtract(slot)) {
                    if (doRemove) {
                        return inventory.decrStackSize(k, powerProvider.useEnergy(1, slot.stackSize, true));
                    }
View Full Code Here

        return null;
    }
    public boolean CanExtract(ItemStack item) {
        for (int i = 0; i < logic.getSizeInventory(); i++) {
            ItemStack stack = logic.getStackInSlot(i);

            if (stack != null && stack.itemID == item.itemID) {
                if ((Item.itemsList[item.itemID].isDamageable())) {
                    return !((PipeLogicAdvancedWood)this.logic).exclude;
                }
                else if (stack.getItemDamage() == item.getItemDamage()) {
                    return !((PipeLogicAdvancedWood)this.logic).exclude;
                }
            }
        }
View Full Code Here

public class WoodOreHandler implements IOreHandler {

  @Override
  public void registerOre(String oreClass, ItemStack ore) {
    if (oreClass.equals("woodAcacia"))
      Proxy.addRecipe(new ItemStack(BunyanBlock.planks, 4,
          CustomWood.metaAcacia), new Object[] { "#",
          Character.valueOf('#'), ore });
    else if (oreClass.equals("woodFir"))
      Proxy.addRecipe(new ItemStack(BunyanBlock.planks, 4,
          CustomWood.metaFir),
          new Object[] { "#", Character.valueOf('#'), ore });
    else if (oreClass.equals("woodRedWood"))
      Proxy.addRecipe(new ItemStack(BunyanBlock.planks, 4,
          CustomWood.metaRedwood), new Object[] { "#",
          Character.valueOf('#'), ore });
  }
View Full Code Here

import bunyan.blocks.WideLogBarkOnTop;

public class ConfigureBlocks {

  private static void addCustomLogNames() {
    Proxy.addName(new ItemStack(BunyanBlock.wood, 1,
        CustomLog.metaFir), "Fir Log");
    Proxy.addName(new ItemStack(BunyanBlock.wood, 1,
        CustomLog.metaAcacia), "Acacia Log");
  }
View Full Code Here

    Proxy.addName(new ItemStack(BunyanBlock.wood, 1,
        CustomLog.metaAcacia), "Acacia Log");
  }

  private static void addDirectionalCustomLogNames() {
    String name = Proxy.getObjectDisplayName(new ItemStack(
        BunyanBlock.wood, 1, CustomLog.metaAcacia));
    Proxy.addName(new ItemStack(BunyanBlock.turnableCustomWood, 1,
        TurnableCustomLog.metaAcacia), name);
    name = Proxy.getObjectDisplayName(new ItemStack(
        BunyanBlock.wood, 1, CustomLog.metaFir));
    Proxy.addName(new ItemStack(BunyanBlock.turnableCustomWood, 1,
        TurnableCustomLog.metaFir), name);
  }
View Full Code Here

    Proxy.addName(new ItemStack(BunyanBlock.turnableCustomWood, 1,
        TurnableCustomLog.metaFir), name);
  }

  private static void addDirectionalVanillaLogNames() {
    String name = Proxy.getObjectDisplayName(new ItemStack(
        Block.wood, 1, 0));
    Proxy.addName(new ItemStack(BunyanBlock.turnableVanillaWood, 1,
        TurnableVanillaLog.metaOak), name);
    name = Proxy.getObjectDisplayName(new ItemStack(Block.wood, 1,
        1));
    Proxy.addName(new ItemStack(BunyanBlock.turnableVanillaWood, 1,
        TurnableVanillaLog.metaPine), name);
    name = Proxy.getObjectDisplayName(new ItemStack(Block.wood, 1,
        2));
    Proxy.addName(new ItemStack(BunyanBlock.turnableVanillaWood, 1,
        TurnableVanillaLog.metaBirch), name);
    name = Proxy.getObjectDisplayName(new ItemStack(Block.wood, 1,
        3));
    Proxy.addName(new ItemStack(BunyanBlock.turnableVanillaWood, 1,
        TurnableVanillaLog.metaJungle), name);
  }
View Full Code Here

    addDirectionalVanillaLogNames();
    addDirectionalCustomLogNames();
  }

  private static void addPlankNames() {
    Proxy.addName(new ItemStack(BunyanBlock.planks, 1,
        CustomWood.metaRedwood), "Redwood Planks");
    Proxy.addName(new ItemStack(BunyanBlock.planks, 1,
        CustomWood.metaFir), "Fir Planks");
    Proxy.addName(new ItemStack(BunyanBlock.planks, 1,
        CustomWood.metaAcacia), "Acacia Planks");
  }
View Full Code Here

TOP

Related Classes of net.minecraft.src.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.