Package forestry.api.core.backpacks
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
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 Summary
FieldsFields inherited from class forestry.api.core.backpacks.BackpackEvent
backpackDefinition, backpackInventory, player -
Constructor Summary
ConstructorsConstructorDescriptionBackpackStowEvent(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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
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)
-