Package net.minecraft.item

Examples of net.minecraft.item.Item


    @VersionSpecific(version = "[1.7.2]")
    public void discharge(ItemStack itemStack)
    {
        if (itemStack != null)
        {
            Item item = itemStack.getItem();
            float energyToDischarge = this.getRequest(ForgeDirection.UNKNOWN);

            if (item instanceof IItemElectric)
            {
                this.storage.receiveEnergyGC(ElectricItemHelper.dischargeItem(itemStack, energyToDischarge));
View Full Code Here


    @AltForVersion(version = "[1.7.10]")
    public void dischargeB(ItemStack itemStack)
    {
        if (itemStack != null)
        {
            Item item = itemStack.getItem();
            float energyToDischarge = this.getRequest(ForgeDirection.UNKNOWN);

            if (item instanceof IItemElectric)
            {
                this.storage.receiveEnergyGC(ElectricItemHelper.dischargeItem(itemStack, energyToDischarge));
View Full Code Here

        if (toolstack == null) {
            percentscrolled = 0;
            return;
        }

        Item item = toolstack.getItem();
        int enchantablity = item.getItemEnchantability();
        if (enchantablity == 0 && validate) {
            percentscrolled = 0;
            return;
        }
View Full Code Here

    {
        Class<?> buildCraftClass = null;

        Block bcOilID1 = null;
        Block bcOilID2 = null;
        Item bcOilBucket = null;

        try
        {
            if ((buildCraftClass = Class.forName("buildcraft.BuildCraftEnergy")) != null)
            {
View Full Code Here

            {
                for (final Field f : buildCraftClass.getFields())
                {
                    if (f.getName().equals("bucketOil"))
                    {
                        final Item item = (Item) f.get(null);

                        if (par1ItemStack.getItem() == item)
                        {
                            return true;
                        }
View Full Code Here

     */
    public void recharge(ItemStack itemStack)
    {
        if (itemStack != null)
        {
            Item item = itemStack.getItem();
            float maxExtractSave = this.storage.getMaxExtract();
            if (this.tierGC > 1)
            {
                this.storage.setMaxExtract(maxExtractSave * 2.5F);
            }
View Full Code Here

        {
            ItemStack itemstack1 = p_77569_1_.getStackInSlot(i);

            if (itemstack1 != null)
            {
                Item testItem = itemstack1.getItem();
                if (testItem instanceof ItemCanisterLiquidOxygen || testItem == GCItems.oxygenCanisterInfinite)
                {
                    if (itemCanister != null)
                    {
                        //Two canisters
View Full Code Here

        {
            ItemStack itemstack1 = inv.getStackInSlot(i);

            if (itemstack1 != null)
            {
                Item testItem = itemstack1.getItem();
                if (testItem instanceof ItemCanisterLiquidOxygen || testItem == GCItems.oxygenCanisterInfinite)
                {
                    if (itemCanister != null)
                    {
                        //Two canisters
View Full Code Here

                  {
                      Block b = (Block) Block.blockRegistry.getObject((String)iterator.next());
                      if (b instanceof BlockBush)
                      {
                          try {
                        Item item = Item.getItemFromBlock(b);
                          if (item != null)
                          {
                            //item.getSubItems(item, null, subItemsList); - can't use because clientside only
                            ContainerTerraformer.saplingList.add(new ItemStack(item, 1, 0));
                            String basicName = item.getUnlocalizedName(new ItemStack(item, 1, 0));
                          for (int i = 1; i < 16; i++)
                          {
                            ItemStack testStack = new ItemStack(item, 1, i);
                            String testName = item.getUnlocalizedName(testStack);
                            if (testName == null || testName.equals("") || testName.equals(basicName))
                              break;
                            ContainerTerraformer.saplingList.add(testStack);
                          }                      
                          }
View Full Code Here

    }

    @Override
    public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
    {
        Item item = itemstack.getItem();
        switch (slotID)
        {
        case 0:
            return ItemElectricBase.isElectricItem(item);
        case 1:
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.