Class PlayerDexData

java.lang.Object
com.pixelmonmod.pixelmon.api.pokedex.data.DexData
com.pixelmonmod.pixelmon.api.pokedex.data.PlayerDexData
All Implemented Interfaces:
PokedexStorage

public class PlayerDexData extends DexData
  • Field Details

    • playerId

      protected final UUID playerId
  • Constructor Details

    • PlayerDexData

      public PlayerDexData(UUID playerId, net.minecraft.resources.ResourceKey<Pokedex> pokedexType)
  • Method Details

    • getUniqueId

      public UUID getUniqueId()
      Description copied from interface: PokedexStorage
      Gets the unique identifier for this Pokedex.
      Returns:
      The unique identifier for this Pokedex.
    • getOwner

      public net.minecraft.world.entity.player.Player getOwner()
      Description copied from interface: PokedexStorage
      Gets the player that owns this Pokedex.
      Returns:
      The player that owns this Pokedex.
    • setSeen

      public void setSeen(Pokemon pokemon, String cause)
      Description copied from interface: PokedexStorage
      Sets the Pokémon as seen.
      This method will not change the status if the Pokémon has already been caught or seen.
      Specified by:
      setSeen in interface PokedexStorage
      Overrides:
      setSeen in class DexData
      Parameters:
      pokemon - The Pokémon to set as seen.
    • setCaught

      public void setCaught(Pokemon pokemon, String cause)
      Description copied from interface: PokedexStorage
      Sets the Pokémon as caught.
      This method will not change the status if the Pokémon has already been caught or seen.
      Specified by:
      setCaught in interface PokedexStorage
      Overrides:
      setCaught in class DexData
      Parameters:
      pokemon - The Pokémon to set as caught.
    • unlockSection

      public void unlockSection(PokemonBase pokemon, PokedexSection section)
      Description copied from interface: PokedexStorage
      Unlocks a section for a Pokémon species.
      This method will unlock the section for the given Pokémon species.
      Specified by:
      unlockSection in interface PokedexStorage
      Overrides:
      unlockSection in class DexData
      Parameters:
      pokemon - The Pokémon species to unlock the section for.
      section - The section to unlock.
    • updateState

      protected boolean updateState(PokemonBase base, UnaryOperator<PokedexState> stateConsumer)
      Overrides:
      updateState in class DexData
    • setStatus

      public void setStatus(PokemonBase dexId, PokedexState state, int seenCount, int caughtCount)
    • initialize

      public void initialize(net.minecraft.world.entity.player.Player player)
      Description copied from interface: PokedexStorage
      Initializes the Pokedex for a player.
      This method is called when the player first joins the game
      Parameters:
      player - The player to initialize the Pokedex for.