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

    Nested Classes
    Modifier and Type
    Class
    Description
    static 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

    Fields
    Modifier and Type
    Field
    Description
    protected ImmutableCard[]
     
    protected final net.minecraft.world.item.ItemStack
     
    protected final net.minecraft.server.level.ServerPlayer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PackOpenEvent(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack packItem, ImmutableCard[] cards)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • player

      protected final net.minecraft.server.level.ServerPlayer player
    • packItem

      protected final net.minecraft.world.item.ItemStack packItem
    • cards

      protected ImmutableCard[] 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

      public ImmutableCard[] getCards()