Package com.pixelmonmod.tcg.api.events
Class PackOpenEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.tcg.api.events.PackOpenEvent
- Direct Known Subclasses:
PackOpenEvent.Post
,PackOpenEvent.Pre
public abstract class PackOpenEvent
extends net.minecraftforge.eventbus.api.Event
PackOpenEvent - Fired when right-clicking on a pack to open it. This event fires before cards from the pack are chosen.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fires after a pack has been opened.static class
Fired before a pack is opened, before cards in the pack are calculated.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
Modifier and TypeFieldDescriptionprotected ImmutableCard[]
protected final net.minecraft.world.item.ItemStack
protected final net.minecraft.server.level.ServerPlayer
-
Constructor Summary
ConstructorDescriptionPackOpenEvent
(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack packItem, ImmutableCard[] cards) -
Method Summary
Modifier and TypeMethodDescriptiongetCards()
net.minecraft.world.item.ItemStack
net.minecraft.server.level.ServerPlayer
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
player
protected final net.minecraft.server.level.ServerPlayer player -
packItem
protected final net.minecraft.world.item.ItemStack packItem -
cards
-
-
Constructor Details
-
PackOpenEvent
public PackOpenEvent(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack packItem, ImmutableCard[] cards)
-
-
Method Details
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer()- Returns:
- - The player that right-clicked the pack
-
getPackItem
public net.minecraft.world.item.ItemStack getPackItem()- Returns:
- - The itemstack of the pack right-clicked
-
getCards
-