Class BagItemEvent.CollectItems.Pre
java.lang.Object
net.minecraftforge.eventbus.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
- Enclosing class:
- BagItemEvent.CollectItems
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
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 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
ConstructorDescriptionPre
(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 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
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
-