Class BackpackStowEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
forestry.api.storage.BackpackEvent
forestry.api.storage.BackpackStowEvent

public class BackpackStowEvent extends BackpackEvent
Use @SubscribeEvent on a method taking this event as an argument. Will fire whenever a backpack tries to store an item. Processing will stop if the stacksize of stackToStow drops to 0 or less or the event is canceled.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final net.minecraft.world.item.ItemStack
     

    Fields inherited from class forestry.api.storage.BackpackEvent

    backpackDefinition, backpackInventory, player
  • Constructor Summary

    Constructors
    Constructor
    Description
    BackpackStowEvent(net.minecraft.world.entity.player.Player player, IBackpackDefinition backpackDefinition, net.minecraft.world.Container backpackInventory, net.minecraft.world.item.ItemStack stackToStow)
     
  • Method Summary

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • stackToStow

      public final net.minecraft.world.item.ItemStack stackToStow
  • Constructor Details

    • BackpackStowEvent

      public BackpackStowEvent(net.minecraft.world.entity.player.Player player, IBackpackDefinition backpackDefinition, net.minecraft.world.Container backpackInventory, net.minecraft.world.item.ItemStack stackToStow)