Package cpw.mods.fml.common.eventhandler

Examples of cpw.mods.fml.common.eventhandler.Event


    ItemBackpack backpack = ((ItemBackpack) backpackStack.getItem());
    ItemInventory inventory = new ItemInventory(ItemBackpack.class, backpack.getBackpackSize(), backpackStack);
    if (backpackStack.getItemDamage() == 1)
      return stack;

    Event event = new BackpackStowEvent(player, backpack.getDefinition(), inventory, stack);
    MinecraftForge.EVENT_BUS.post(event);
    if (stack.stackSize <= 0)
      return null;
    if (event.isCanceled())
      return stack;

    ItemStack remainder = InvTools.moveItemStack(stack, inventory);
    stack.stackSize = remainder == null ? 0 : remainder.stackSize;
View Full Code Here


      }

      // 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;
      // Cycle through their contents
      for (int i = 0; i < backpackinventory.getSizeInventory(); i++) {
View Full Code Here

TOP

Related Classes of cpw.mods.fml.common.eventhandler.Event

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.