Class DexData
java.lang.Object
com.pixelmonmod.pixelmon.api.pokedex.data.DexData
- All Implemented Interfaces:
PokedexStorage
- Direct Known Subclasses:
PlayerDexData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final net.minecraft.resources.ResourceKey<Pokedex> protected intprotected Map<PokemonBase, PokedexState> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Gets the type of the Pokedex.intCounts the number of Pokémon caught.intCounts the number of Pokémon seen.intgetCaughtCount(Region region) Gets the count of Pokémon caught in a specific region.intgetCaughtCount(PokemonBase species) Gets the count of Pokémon caught for a specific species.doublegetLargest(PokemonBase pokemon) Gets the largest size of the Pokémon species that has been captured.doublegetPercentage(Region region, PokedexRegistrationStatus status) Gets the percentage of Pokémon in a specific region that match the given status.doubleGets the percentage of the Pokedex that is matching the given status.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.doublegetSmallest(PokemonBase pokemon) Gets the smallest size of the Pokémon species that has been captured.getState(PokemonBase species) Gets the registration status of the Pokémon.getStatus(PokemonBase species) Gets the registration status of the species.getUnlockedSections(PokemonBase species) Gets the unlocked sections for a Pokémon species.voidload(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.RegistryAccess registryAccess) Loads the Pokedex data from a CompoundTag.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 pokemon, PokedexSection section) Unlocks a section for a Pokémon species.protected booleanupdateState(PokemonBase base, UnaryOperator<PokedexState> stateConsumer) 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, unlockSection, unlockSections, unlockSections, unlockSections, unlockSections
-
Field Details
-
pokedexType
-
status
-
seenCount
protected int seenCount -
caughtCount
protected int caughtCount
-
-
Constructor Details
-
DexData
-
-
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.
-
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.
-
getCaughtCount
Description copied from interface:PokedexStorageGets the count of Pokémon caught for a specific species.- Specified by:
getCaughtCountin interfacePokedexStorage- Parameters:
species- The species to check.- Returns:
- The count of Pokémon caught 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:
pokemon- 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:
pokemon- The species to check.- Returns:
- The smallest size of the Pokémon species.
-
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.
-
getState
-
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.
-
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.
-
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:
pokemon- The Pokémon species to unlock the section for.section- The section to unlock.
-
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
-
updateState
-
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.
-
load
public void load(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.RegistryAccess registryAccess) Description copied from interface:PokedexStorageLoads the Pokedex data from a CompoundTag.- Specified by:
loadin interfacePokedexStorage- Parameters:
nbt- The CompoundTag containing the Pokedex data.registryAccess- The registry access for loading.
-