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
ConstructorsModifierConstructorDescriptionprotectedStoredPokedex(net.minecraft.resources.ResourceKey<Pokedex> defaultPokedexKey) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Gets the type of the Pokedex.intCounts the number of Pokémon caught.intcountCaught(net.minecraft.resources.ResourceKey<Pokedex> key) intCounts the number of Pokémon seen.intprotected abstract @NonNull PokedexStoragecreatePokedex(net.minecraft.resources.ResourceKey<Pokedex> key) intgetCaughtCount(Region region) Gets the count of Pokémon caught in a specific region.intgetCaughtCount(PokemonBase pokemon) Gets the count of Pokémon caught for a specific species.intgetCaughtCount(net.minecraft.resources.ResourceKey<Pokedex> key, Region region) intgetCaughtCount(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase pokemon) doublegetLargest(PokemonBase species) Gets the largest size of the Pokémon species that has been captured.doublegetLargest(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase pokemon) doublegetPercentage(Region region, PokedexRegistrationStatus status) Gets the percentage of Pokémon in a specific region that match the given status.doublegetPercentage(Region region, net.minecraft.resources.ResourceKey<Pokedex> key, PokedexRegistrationStatus status) doubleGets the percentage of the Pokedex that is matching the given status.doublegetPercentage(net.minecraft.resources.ResourceKey<Pokedex> key, PokedexRegistrationStatus status) protected PokedexStoragegetPokedex(net.minecraft.resources.ResourceKey<Pokedex> key) intgetSeenCount(Region region) Gets the count of Pokémon seen in a specific region.intgetSeenCount(PokemonBase pokemon) Gets the count of Pokémon seen for a specific species.intgetSeenCount(net.minecraft.resources.ResourceKey<Pokedex> key, Region region) intgetSeenCount(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase pokemon) doublegetSmallest(PokemonBase species) Gets the smallest size of the Pokémon species that has been captured.doublegetSmallest(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) booleanbooleanhasCaught(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species) booleanbooleanhasSeen(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species) booleanhasUnlocked(net.minecraft.resources.ResourceKey<Pokedex> key, PokemonBase species, PokedexSection section) net.minecraft.nbt.CompoundTagsave(net.minecraft.core.RegistryAccess registryAccess) Saves the Pokedex data to a CompoundTag.voidSets the Pokémon as caught.voidSets the Pokémon as seen.voidunlockSection(PokemonBase species, PokedexSection section) Unlocks a section for a Pokémon species.voidunlockSection(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, waitMethods 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:PokedexStorageGets the percentage of the Pokedex that is matching the given status.- Specified by:
getPercentagein interfacePokedexStorage- Parameters:
status- The status to check against.- Returns:
- The percentage of the Pokedex that matches the given status.
-
getPercentage
Description copied from interface:PokedexStorageGets the percentage of Pokémon in a specific region that match the given status.- Specified by:
getPercentagein 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:PokedexStorageGets the count of Pokémon seen in a specific region.- Specified by:
getSeenCountin interfacePokedexStorage- Parameters:
region- The region to check.- Returns:
- The count of Pokémon seen in the region.
-
getCaughtCount
Description copied from interface:PokedexStorageGets the count of Pokémon caught in a specific region.- Specified by:
getCaughtCountin interfacePokedexStorage- Parameters:
region- The region to check.- Returns:
- The count of Pokémon caught in the region.
-
getCaughtCount
Description copied from interface:PokedexStorageGets the count of Pokémon caught for a specific species.- Specified by:
getCaughtCountin interfacePokedexStorage- Parameters:
pokemon- The species to check.- Returns:
- The count of Pokémon caught for the species.
-
getSeenCount
Description copied from interface:PokedexStorageGets the count of Pokémon seen for a specific species.- Specified by:
getSeenCountin interfacePokedexStorage- Parameters:
pokemon- The species to check.- Returns:
- The count of Pokémon seen for the species.
-
getLargest
Description copied from interface:PokedexStorageGets 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:
getLargestin interfacePokedexStorage- Parameters:
species- The species to check.- Returns:
- The largest size of the Pokémon species.
-
getSmallest
Description copied from interface:PokedexStorageGets 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:
getSmallestin interfacePokedexStorage- Parameters:
species- The species to check.- Returns:
- The smallest size of the Pokémon species.
-
setSeen
Description copied from interface:PokedexStorageSets the Pokémon as seen.
This method will not change the status if the Pokémon has already been caught or seen.- Specified by:
setSeenin interfacePokedexStorage- Parameters:
pokemon- The Pokémon to set as seen.
-
setCaught
Description copied from interface:PokedexStorageSets the Pokémon as caught.
This method will not change the status if the Pokémon has already been caught or seen.- Specified by:
setCaughtin 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:PokedexStorageGets 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:
getUnlockedSectionsin 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:PokedexStorageUnlocks a section for a Pokémon species.
This method will unlock the section for the given Pokémon species.- Specified by:
unlockSectionin 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:PokedexStorageGets the registration status of the Pokémon.- Specified by:
getStatusin interfacePokedexStorage- Parameters:
pokemon- The Pokémon to check.- Returns:
- The registration status of the Pokémon.
-
getStatus
Description copied from interface:PokedexStorageGets the registration status of the species.- Specified by:
getStatusin interfacePokedexStorage- Parameters:
species- The species to check.- Returns:
- The registration status of the species.
-
countSeen
public int countSeen()Description copied from interface:PokedexStorageCounts the number of Pokémon seen.- Specified by:
countSeenin interfacePokedexStorage- Returns:
- The count of seen Pokémon.
-
countCaught
public int countCaught()Description copied from interface:PokedexStorageCounts the number of Pokémon caught.- Specified by:
countCaughtin interfacePokedexStorage- Returns:
- The count of caught Pokémon.
-
clear
public void clear()Description copied from interface:PokedexStorageGets the type of the Pokedex.- Specified by:
clearin interfacePokedexStorage
-
save
public net.minecraft.nbt.CompoundTag save(net.minecraft.core.RegistryAccess registryAccess) Description copied from interface:PokedexStorageSaves the Pokedex data to a CompoundTag.- Specified by:
savein 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
-