Class PlayerDexData
java.lang.Object
com.pixelmonmod.pixelmon.api.pokedex.data.DexData
com.pixelmonmod.pixelmon.api.pokedex.data.PlayerDexData
- All Implemented Interfaces:
PokedexStorage
-
Field Summary
FieldsFields inherited from class com.pixelmonmod.pixelmon.api.pokedex.data.DexData
caughtCount, pokedexType, seenCount, status -
Constructor Summary
ConstructorsConstructorDescriptionPlayerDexData(UUID playerId, net.minecraft.resources.ResourceKey<Pokedex> pokedexType) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.entity.player.PlayergetOwner()Gets the player that owns this Pokedex.Gets the unique identifier for this Pokedex.voidinitialize(net.minecraft.world.entity.player.Player player) Initializes the Pokedex for a player.voidSets the Pokémon as caught.voidSets the Pokémon as seen.voidsetStatus(PokemonBase dexId, PokedexState state, int seenCount, int caughtCount) voidunlockSection(PokemonBase pokemon, PokedexSection section) Unlocks a section for a Pokémon species.protected booleanupdateState(PokemonBase base, UnaryOperator<PokedexState> stateConsumer) Methods inherited from class com.pixelmonmod.pixelmon.api.pokedex.data.DexData
clear, countCaught, countSeen, getCaughtCount, getCaughtCount, getLargest, getPercentage, getPercentage, getSeenCount, getSeenCount, getSmallest, getState, getStatus, getStatus, getUnlockedSections, load, saveMethods 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, getSeenCount, getSmallest, getUnlockedSections, hasCaught, hasCaught, hasSeen, hasSeen, hasUnlocked, hasUnlocked, unlockSection, unlockSections, unlockSections, unlockSections, unlockSections
-
Field Details
-
playerId
-
-
Constructor Details
-
PlayerDexData
-
-
Method Details
-
getUniqueId
Description copied from interface:PokedexStorageGets the unique identifier for this Pokedex.- Returns:
- The unique identifier for this Pokedex.
-
getOwner
public net.minecraft.world.entity.player.Player getOwner()Description copied from interface:PokedexStorageGets the player that owns this Pokedex.- Returns:
- The player that owns this Pokedex.
-
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- Overrides:
setSeenin classDexData- 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- Overrides:
setCaughtin classDexData- Parameters:
pokemon- The Pokémon to set as caught.
-
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- Overrides:
unlockSectionin classDexData- Parameters:
pokemon- The Pokémon species to unlock the section for.section- The section to unlock.
-
updateState
- Overrides:
updateStatein classDexData
-
setStatus
-
initialize
public void initialize(net.minecraft.world.entity.player.Player player) Description copied from interface:PokedexStorageInitializes 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.
-