Examples of BackpackStowEvent


Examples of forestry.api.storage.BackpackStowEvent

    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
TOP
Copyright © 2018 www.massapi.com. 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.