Class StoredPokedex
java.lang.Object
com.pixelmonmod.pixelmon.api.pokedex.StoredPokedex
- All Implemented Interfaces:
PokedexStorage
- Direct Known Subclasses:
ClientStoredPokedex
,ServerStoredPokedex
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.resources.ResourceKey
<Pokedex> protected final Map
<net.minecraft.resources.ResourceKey<Pokedex>, PokedexStorage> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StoredPokedex
(net.minecraft.resources.ResourceKey<Pokedex> defaultPokedexKey) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Gets the type of the Pokedex.int
Counts the number of Pokémon caught.int
countCaught
(net.minecraft.resources.ResourceKey<Pokedex> key) int
Counts the number of Pokémon seen.int
protected abstract @NonNull PokedexStorage
createPokedex
(net.minecraft.resources.ResourceKey<Pokedex> key) int
getCaughtCount
(Region region) Gets the count of Pokémon caught in a specific region.int
getCaughtCount
(PokemonBase pokemon) Gets the count of Pokémon caught for a specific species.int
getCaughtCount
(net.minecraft.resources.ResourceKey<Pokedex> key, Region region) int
getCaughtCount
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase pokemon) double
getLargest
(PokemonBase species) Gets the largest size of the Pokémon species that has been captured.double
getLargest
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase pokemon) double
getPercentage
(Region region, PokedexRegistrationStatus status) Gets the percentage of Pokémon in a specific region that match the given status.double
getPercentage
(Region region, net.minecraft.resources.ResourceKey<Pokedex> key, PokedexRegistrationStatus status) double
Gets the percentage of the Pokedex that is matching the given status.double
getPercentage
(net.minecraft.resources.ResourceKey<Pokedex> key, PokedexRegistrationStatus status) protected PokedexStorage
getPokedex
(net.minecraft.resources.ResourceKey<Pokedex> key) int
getSeenCount
(Region region) Gets the count of Pokémon seen in a specific region.int
getSeenCount
(PokemonBase pokemon) Gets the count of Pokémon seen for a specific species.int
getSeenCount
(net.minecraft.resources.ResourceKey<Pokedex> key, Region region) int
getSeenCount
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase pokemon) double
getSmallest
(PokemonBase species) Gets the smallest size of the Pokémon species that has been captured.double
getSmallest
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase pokemon) Gets the registration status of the Pokémon.getStatus
(PokemonBase species) Gets the registration status of the species.getStatus
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species) getUnlockedSections
(PokemonBase species) Gets the unlocked sections for a Pokémon species.getUnlockedSections
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species) boolean
boolean
hasCaught
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species) boolean
boolean
hasSeen
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species) boolean
hasUnlocked
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species, PokedexSection section) 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.void
unlockSection
(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species, PokedexSection section) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.pokedex.PokedexStorage
getCaughtCount, getLargest, getOwner, getSeenCount, getSmallest, getUniqueId, getUnlockedSections, hasCaught, hasCaught, hasSeen, hasSeen, hasUnlocked, hasUnlocked, initialize, load, unlockSection, unlockSections, unlockSections, unlockSections, unlockSections
-
Field Details
-
defaultPokedexKey
-
pokedexes
-
-
Constructor Details
-
StoredPokedex
-
-
Method Details
-
getPercentage
Description copied from interface:PokedexStorage
Gets the percentage of the Pokedex that is matching the given status.- Specified by:
getPercentage
in interfacePokedexStorage
- Parameters:
status
- The status to check against.- Returns:
- The percentage of the Pokedex that matches the given status.
-
getPercentage
Description copied from interface:PokedexStorage
Gets the percentage of Pokémon in a specific region that match the given status.- Specified by:
getPercentage
in interfacePokedexStorage
- 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
Description copied from interface:PokedexStorage
Gets the count of Pokémon seen in a specific region.- Specified by:
getSeenCount
in interfacePokedexStorage
- Parameters:
region
- The region to check.- Returns:
- The count of Pokémon seen in the region.
-
getCaughtCount
Description copied from interface:PokedexStorage
Gets the count of Pokémon caught in a specific region.- Specified by:
getCaughtCount
in interfacePokedexStorage
- Parameters:
region
- The region to check.- Returns:
- The count of Pokémon caught in the region.
-
getCaughtCount
Description copied from interface:PokedexStorage
Gets the count of Pokémon caught for a specific species.- Specified by:
getCaughtCount
in interfacePokedexStorage
- Parameters:
pokemon
- The species to check.- Returns:
- The count of Pokémon caught for the species.
-
getSeenCount
Description copied from interface:PokedexStorage
Gets the count of Pokémon seen for a specific species.- Specified by:
getSeenCount
in interfacePokedexStorage
- Parameters:
pokemon
- The species to check.- Returns:
- The count of Pokémon seen for the species.
-
getLargest
Description copied from interface:PokedexStorage
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.- Specified by:
getLargest
in interfacePokedexStorage
- Parameters:
species
- The species to check.- Returns:
- The largest size of the Pokémon species.
-
getSmallest
Description copied from interface:PokedexStorage
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.- Specified by:
getSmallest
in interfacePokedexStorage
- Parameters:
species
- The species to check.- Returns:
- The smallest size of the Pokémon species.
-
setSeen
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 interfacePokedexStorage
- Parameters:
pokemon
- The Pokémon to set as seen.
-
setCaught
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 interfacePokedexStorage
- Parameters:
pokemon
- The Pokémon to set as caught.
-
getPercentage
public double getPercentage(net.minecraft.resources.ResourceKey<Pokedex> key, PokedexRegistrationStatus status) -
getPercentage
public double getPercentage(Region region, net.minecraft.resources.ResourceKey<Pokedex> key, PokedexRegistrationStatus status) -
getSeenCount
-
getCaughtCount
-
getCaughtCount
-
getSeenCount
-
getLargest
-
getSmallest
-
getStatus
public PokedexRegistrationStatus getStatus(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species) -
hasSeen
-
hasCaught
-
getStatus
public PokedexRegistrationStatus getStatus(net.minecraft.resources.ResourceKey<Pokedex> key, Pokemon pokemon) -
hasSeen
-
hasCaught
-
countSeen
-
countCaught
-
getUnlockedSections
Description copied from interface:PokedexStorage
Gets the unlocked sections for a Pokémon species.
This method will return the sections that are unlocked for the given Pokémon species.- Specified by:
getUnlockedSections
in interfacePokedexStorage
- Parameters:
species
- The Pokémon species to check.- Returns:
- A list of unlocked sections for the Pokémon species.
-
getUnlockedSections
public List<PokedexSection> getUnlockedSections(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species) -
unlockSection
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 interfacePokedexStorage
- Parameters:
species
- The Pokémon species to unlock the section for.section
- The section to unlock.
-
unlockSection
public void unlockSection(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species, PokedexSection section) -
hasUnlocked
public boolean hasUnlocked(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species, PokedexSection section) -
getStatus
Description copied from interface:PokedexStorage
Gets the registration status of the Pokémon.- Specified by:
getStatus
in interfacePokedexStorage
- Parameters:
pokemon
- The Pokémon to check.- Returns:
- The registration status of the Pokémon.
-
getStatus
Description copied from interface:PokedexStorage
Gets the registration status of the species.- Specified by:
getStatus
in interfacePokedexStorage
- Parameters:
species
- The species to check.- Returns:
- The registration status of the species.
-
countSeen
public int countSeen()Description copied from interface:PokedexStorage
Counts the number of Pokémon seen.- Specified by:
countSeen
in interfacePokedexStorage
- Returns:
- The count of seen Pokémon.
-
countCaught
public int countCaught()Description copied from interface:PokedexStorage
Counts the number of Pokémon caught.- Specified by:
countCaught
in interfacePokedexStorage
- Returns:
- The count of caught Pokémon.
-
clear
public void clear()Description copied from interface:PokedexStorage
Gets the type of the Pokedex.- Specified by:
clear
in interfacePokedexStorage
-
save
public net.minecraft.nbt.CompoundTag save(net.minecraft.core.RegistryAccess registryAccess) Description copied from interface:PokedexStorage
Saves the Pokedex data to a CompoundTag.- Specified by:
save
in interfacePokedexStorage
- Parameters:
registryAccess
- The registry access for saving.- Returns:
- The CompoundTag containing the Pokedex data.
-
getPokedex
-
createPokedex
protected abstract @NonNull PokedexStorage createPokedex(net.minecraft.resources.ResourceKey<Pokedex> key) -
getAvailablePokedexes
-