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.
This interface is used to manage the seen and caught status of Pokémon.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Gets the type of the Pokedex.int
Counts the number of Pokémon caught.int
Counts the number of Pokémon seen.int
getCaughtCount
(Region region) Gets the count of Pokémon caught in a specific region.default int
getCaughtCount
(Pokemon pokemon) Gets the count of Pokémon caught.int
getCaughtCount
(PokemonBase species) Gets the count of Pokémon caught for a specific species.default double
getLargest
(Pokemon pokemon) Gets the largest size of the Pokémon that has been captured.double
getLargest
(PokemonBase species) Gets the largest size of the Pokémon species that has been captured.net.minecraft.world.entity.player.Player
getOwner()
Gets the player that owns this Pokedex.double
getPercentage
(Region region, PokedexRegistrationStatus status) Gets the percentage of Pokémon in a specific region that match the given status.double
Gets the percentage of the Pokedex that is matching the given status.int
getSeenCount
(Region region) Gets the count of Pokémon seen in a specific region.default int
getSeenCount
(Pokemon pokemon) Gets the count of Pokémon seen.int
getSeenCount
(PokemonBase species) Gets the count of Pokémon seen for a specific species.default double
getSmallest
(Pokemon pokemon) Gets the smallest size of the Pokémon that has been captured.double
getSmallest
(PokemonBase species) Gets the smallest size of the Pokémon species that has been captured.Gets the registration status of the Pokémon.getStatus
(PokemonBase species) Gets the registration status of the species.Gets the unique identifier for this Pokedex.default List
<PokedexSection> getUnlockedSections
(Pokemon pokemon) Gets the unlocked sections for a Pokémon.getUnlockedSections
(PokemonBase species) Gets the unlocked sections for a Pokémon species.default boolean
Checks if the Pokémon has been caught.default boolean
hasCaught
(PokemonBase species) Checks if the species has been caught.default boolean
Checks if the Pokémon has been seen.default boolean
hasSeen
(PokemonBase species) Checks if the species has been seen.default boolean
hasUnlocked
(PokemonBase species, PokedexSection section) Checks if the Pokémon species has unlocked the given section.default boolean
hasUnlocked
(Pokemon pokemon, PokedexSection section) Checks if the Pokémon has unlocked the given section.default void
initialize
(net.minecraft.world.entity.player.Player player) Initializes the Pokedex for a player.void
load
(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.RegistryAccess registryAccess) Loads the Pokedex data from a CompoundTag.net.minecraft.nbt.CompoundTag
save
(net.minecraft.core.RegistryAccess registryAccess) Saves the Pokedex data to a CompoundTag.void
Sets the Pokémon as caught.void
Sets the Pokémon as seen.void
unlockSection
(PokemonBase species, PokedexSection section) Unlocks a section for a Pokémon species.default void
unlockSection
(Pokemon pokemon, PokedexSection section) Unlocks a section for a Pokémon.default void
unlockSections
(PokemonBase species, PokedexSection... sections) Unlocks the given sections for a Pokémon species.default void
unlockSections
(PokemonBase species, Collection<PokedexSection> sections) Unlocks the given sections for a Pokémon species.default void
unlockSections
(Pokemon pokemon, PokedexSection... sections) Unlocks the given sections for a Pokémon.default void
unlockSections
(Pokemon pokemon, Collection<PokedexSection> sections) Unlocks the given sections for a 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
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
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
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
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
Gets the count of Pokémon seen.- Parameters:
pokemon
- The Pokémon to check.- Returns:
- The count of Pokémon seen.
-
getSeenCount
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
Gets the count of Pokémon caught.- Parameters:
pokemon
- The Pokémon to check.- Returns:
- The count of Pokémon caught.
-
getCaughtCount
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
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
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
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
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
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
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
Gets the registration status of the Pokémon.- Parameters:
pokemon
- The Pokémon to check.- Returns:
- The registration status of the Pokémon.
-
hasSeen
Checks if the species has been seen.- Parameters:
species
- The species to check.- Returns:
- true if the species has been seen, false otherwise.
-
hasCaught
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
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
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
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
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
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
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
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
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
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
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
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
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.
-