Package forestry.storage.items

Examples of forestry.storage.items.ItemBackpack


        backpack.setItemDamage(backpack.getItemDamage() + 1);
        continue;
      }

      // Load their inventory
      ItemBackpack packItem = ((ItemBackpack) backpack.getItem());
      ItemInventory backpackinventory = new ItemInventory(ItemBackpack.class, packItem.getBackpackSize(), backpack);
      Event event = new BackpackResupplyEvent(player, packItem.getDefinition(), backpackinventory);
      MinecraftForge.EVENT_BUS.post(event);
      if (event.isCanceled())
        continue;

      boolean inventoryChanged = false;
View Full Code Here


public class BackpackHelper implements IBackpackInterface {

  @Override
  public Item addBackpack(IBackpackDefinition definition, EnumBackpackType type) {
    BackpackManager.definitions.put(definition.getKey(), definition);
    return new ItemBackpack(definition, type);
  }
View Full Code Here

        break;

      if (!(pack.getItem() instanceof ItemBackpack))
        continue;

      ItemBackpack backpack = ((ItemBackpack) pack.getItem());
      if (backpack.getDefinition().isValidItem(player, itemstack))
        backpack.tryStowing(player, pack, itemstack);
    }

    if (itemstack == null || itemstack.stackSize <= 0)
      return false;
    else
View Full Code Here

TOP

Related Classes of forestry.storage.items.ItemBackpack

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.