Interface PokedexStorage

All Known Implementing Classes:
ClientStoredPokedex, DexData, PlayerDexData, ServerStoredPokedex, StoredPokedex

public interface PokedexStorage
Represents the generic methods surrounding a Pokedex.
This interface is used to manage the seen and caught status of Pokémon.
  • Method Details

    • getUniqueId

      UUID getUniqueId()
      Gets the unique identifier for this Pokedex.
      Returns:
      The unique identifier for this Pokedex.
    • getOwner

      net.minecraft.world.entity.player.Player getOwner()
      Gets the player that owns this Pokedex.
      Returns:
      The player that owns this Pokedex.
    • getPercentage

      double getPercentage(PokedexRegistrationStatus status)
      Gets the percentage of the Pokedex that is matching the given status.
      Parameters:
      status - The status to check against.
      Returns:
      The percentage of the Pokedex that matches the given status.
    • getPercentage

      double getPercentage(Region region, PokedexRegistrationStatus status)
      Gets the percentage of Pokémon in a specific region that match the given status.
      Parameters:
      region - The region to check.
      status - The status to check against.
      Returns:
      The percentage of Pokémon in the region that matches the given status.
    • getSeenCount

      int getSeenCount(Region region)
      Gets the count of Pokémon seen in a specific region.
      Parameters:
      region - The region to check.
      Returns:
      The count of Pokémon seen in the region.
    • getCaughtCount

      int getCaughtCount(Region region)
      Gets the count of Pokémon caught in a specific region.
      Parameters:
      region - The region to check.
      Returns:
      The count of Pokémon caught in the region.
    • getSeenCount

      default int getSeenCount(Pokemon pokemon)
      Gets the count of Pokémon seen.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      The count of Pokémon seen.
    • getSeenCount

      int getSeenCount(PokemonBase species)
      Gets the count of Pokémon seen for a specific species.
      Parameters:
      species - The species to check.
      Returns:
      The count of Pokémon seen for the species.
    • getCaughtCount

      default int getCaughtCount(Pokemon pokemon)
      Gets the count of Pokémon caught.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      The count of Pokémon caught.
    • getCaughtCount

      int getCaughtCount(PokemonBase species)
      Gets the count of Pokémon caught for a specific species.
      Parameters:
      species - The species to check.
      Returns:
      The count of Pokémon caught for the species.
    • getLargest

      default double getLargest(Pokemon pokemon)
      Gets the largest size of the Pokémon that has been captured.
      This method will return the largest size of the Pokémon species that was captured with this dex.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      The largest size of the Pokémon.
    • getLargest

      double getLargest(PokemonBase species)
      Gets the largest size of the Pokémon species that has been captured.
      This method will return the largest size of the Pokémon species that was captured with this dex.
      Parameters:
      species - The species to check.
      Returns:
      The largest size of the Pokémon species.
    • getSmallest

      default double getSmallest(Pokemon pokemon)
      Gets the smallest size of the Pokémon that has been captured.
      This method will return the smallest size of the Pokémon species that was captured with this dex.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      The smallest size of the Pokémon.
    • getSmallest

      double getSmallest(PokemonBase species)
      Gets the smallest size of the Pokémon species that has been captured.
      This method will return the smallest size of the Pokémon species that was captured with this dex.
      Parameters:
      species - The species to check.
      Returns:
      The smallest size of the Pokémon species.
    • hasSeen

      default boolean hasSeen(Pokemon pokemon)
      Checks if the Pokémon has been seen.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      true if the Pokémon has been seen, false otherwise.
    • hasCaught

      default boolean hasCaught(Pokemon pokemon)
      Checks if the Pokémon has been caught.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      true if the Pokémon has been caught, false otherwise.
    • getStatus

      PokedexRegistrationStatus getStatus(Pokemon pokemon)
      Gets the registration status of the Pokémon.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      The registration status of the Pokémon.
    • hasSeen

      default boolean hasSeen(PokemonBase species)
      Checks if the species has been seen.
      Parameters:
      species - The species to check.
      Returns:
      true if the species has been seen, false otherwise.
    • hasCaught

      default boolean hasCaught(PokemonBase species)
      Checks if the species has been caught.
      Parameters:
      species - The species to check.
      Returns:
      true if the species has been caught, false otherwise.
    • getStatus

      Gets the registration status of the species.
      Parameters:
      species - The species to check.
      Returns:
      The registration status of the species.
    • getUnlockedSections

      default List<PokedexSection> getUnlockedSections(Pokemon pokemon)
      Gets the unlocked sections for a Pokémon.
      This method will return the sections that are unlocked for the given Pokémon.
      Parameters:
      pokemon - The Pokémon to check.
      Returns:
      A list of unlocked sections for the Pokémon.
    • getUnlockedSections

      List<PokedexSection> getUnlockedSections(PokemonBase species)
      Gets the unlocked sections for a Pokémon species.
      This method will return the sections that are unlocked for the given Pokémon species.
      Parameters:
      species - The Pokémon species to check.
      Returns:
      A list of unlocked sections for the Pokémon species.
    • unlockSections

      default void unlockSections(Pokemon pokemon, Collection<PokedexSection> sections)
      Unlocks the given sections for a Pokémon.
      This method will unlock the sections for the given Pokémon.
      Parameters:
      pokemon - The Pokémon to unlock sections for.
      sections - The sections to unlock.
    • unlockSections

      default void unlockSections(Pokemon pokemon, PokedexSection... sections)
      Unlocks the given sections for a Pokémon.
      This method will unlock the sections for the given Pokémon.
      Parameters:
      pokemon - The Pokémon to unlock sections for.
      sections - The sections to unlock.
    • unlockSections

      default void unlockSections(PokemonBase species, Collection<PokedexSection> sections)
      Unlocks the given sections for a Pokémon species.
      This method will unlock the sections for the given Pokémon species.
      Parameters:
      species - The Pokémon species to unlock sections for.
      sections - The sections to unlock.
    • unlockSections

      default void unlockSections(PokemonBase species, PokedexSection... sections)
      Unlocks the given sections for a Pokémon species.
      This method will unlock the sections for the given Pokémon species.
      Parameters:
      species - The Pokémon species to unlock sections for.
      sections - The sections to unlock.
    • unlockSection

      default void unlockSection(Pokemon pokemon, PokedexSection section)
      Unlocks a section for a Pokémon.
      This method will unlock the section for the given Pokémon.
      Parameters:
      pokemon - The Pokémon to unlock the section for.
      section - The section to unlock.
    • unlockSection

      void unlockSection(PokemonBase species, PokedexSection section)
      Unlocks a section for a Pokémon species.
      This method will unlock the section for the given Pokémon species.
      Parameters:
      species - The Pokémon species to unlock the section for.
      section - The section to unlock.
    • hasUnlocked

      default boolean hasUnlocked(Pokemon pokemon, PokedexSection section)
      Checks if the Pokémon has unlocked the given section.
      This method will return true if the Pokémon has caught the species or has unlocked the section.
      Parameters:
      pokemon - The Pokémon to check.
      section - The section to check.
      Returns:
      true if the Pokémon has unlocked the section, false otherwise.
    • hasUnlocked

      default boolean hasUnlocked(PokemonBase species, PokedexSection section)
      Checks if the Pokémon species has unlocked the given section.
      This method will return true if the Pokémon has caught the species or has unlocked the section.
      Parameters:
      species - The Pokémon species to check.
      section - The section to check.
      Returns:
      true if the Pokémon species has unlocked the section, false otherwise.
    • setSeen

      void setSeen(Pokemon pokemon, String cause)
      Sets the Pokémon as seen.
      This method will not change the status if the Pokémon has already been caught or seen.
      Parameters:
      pokemon - The Pokémon to set as seen.
    • setCaught

      void setCaught(Pokemon pokemon, String cause)
      Sets the Pokémon as caught.
      This method will not change the status if the Pokémon has already been caught or seen.
      Parameters:
      pokemon - The Pokémon to set as caught.
    • countSeen

      int countSeen()
      Counts the number of Pokémon seen.
      Returns:
      The count of seen Pokémon.
    • countCaught

      int countCaught()
      Counts the number of Pokémon caught.
      Returns:
      The count of caught Pokémon.
    • clear

      void clear()
      Gets the type of the Pokedex.
    • save

      net.minecraft.nbt.CompoundTag save(net.minecraft.core.RegistryAccess registryAccess)
      Saves the Pokedex data to a CompoundTag.
      Parameters:
      registryAccess - The registry access for saving.
      Returns:
      The CompoundTag containing the Pokedex data.
    • load

      void load(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.RegistryAccess registryAccess)
      Loads the Pokedex data from a CompoundTag.
      Parameters:
      nbt - The CompoundTag containing the Pokedex data.
      registryAccess - The registry access for loading.
    • initialize

      default void initialize(net.minecraft.world.entity.player.Player player)
      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.