Class BackpackStowEvent

java.lang.Object
net.neoforged.bus.api.Event
forestry.api.core.backpacks.BackpackEvent
forestry.api.core.backpacks.BackpackStowEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

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.
  • 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)