Class BagItemEvent.CollectItems.Pre
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent
com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent.CollectItems
com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent.CollectItems.Pre
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
BagItemEvent.CollectItems
public static class BagItemEvent.CollectItems.Pre
extends BagItemEvent.CollectItems
implements net.neoforged.bus.api.ICancellableEvent
Fired just before the response packet is sent to the client
Cancelling this means the client will say there is 0 use-able items in the player's inventory for this bag section
Editing the list means items that aren't in the inventory will show up (so to then take the items you'd want to
modify logic in BagItemEvent.SelectItem.Pre
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent.CollectItems
BagItemEvent.CollectItems.Post, BagItemEvent.CollectItems.Pre
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent
BagItemEvent.CollectItems, BagItemEvent.Identifiers, BagItemEvent.SelectItem
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent.CollectItems
items
Fields inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
battleController
-
Constructor Summary
ConstructorsConstructorDescriptionPre
(BattleController battleController, String identifier, net.minecraft.server.level.ServerPlayer player, BagSection section) Pre
(BattleController battleController, String identifier, net.minecraft.server.level.ServerPlayer player, BagSection section, List<ItemData> items) -
Method Summary
Methods inherited from class com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent.CollectItems
getItems, getSection
Methods inherited from class com.pixelmonmod.pixelmon.api.events.battles.BagItemEvent
getIdentifier, getPlayer, isIdentifier, isNormalBattle
Methods inherited from class com.pixelmonmod.pixelmon.api.events.battles.BattleEvent
getBattleController
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Constructor Details
-
Pre
public Pre(BattleController battleController, String identifier, net.minecraft.server.level.ServerPlayer player, BagSection section, List<ItemData> items) -
Pre
public Pre(BattleController battleController, String identifier, net.minecraft.server.level.ServerPlayer player, BagSection section)
-
-
Method Details
-
setItems
-
addItems
-