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.Player
getOwner()
Gets the player that owns this Pokedex.Gets the unique identifier for this Pokedex.void
initialize
(net.minecraft.world.entity.player.Player player) Initializes the Pokedex for a player.void
Sets the Pokémon as caught.void
Sets the Pokémon as seen.void
setStatus
(PokemonBase dexId, PokedexState state, int seenCount, int caughtCount) void
unlockSection
(PokemonBase pokemon, PokedexSection section) Unlocks a section for a Pokémon species.protected boolean
updateState
(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, save
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, 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:PokedexStorage
Gets 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:PokedexStorage
Gets the player that owns this Pokedex.- Returns:
- The player that owns this Pokedex.
-
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
- Overrides:
setSeen
in classDexData
- 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
- Overrides:
setCaught
in classDexData
- Parameters:
pokemon
- The Pokémon to set as caught.
-
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
- Overrides:
unlockSection
in classDexData
- Parameters:
pokemon
- The Pokémon species to unlock the section for.section
- The section to unlock.
-
updateState
- Overrides:
updateState
in classDexData
-
setStatus
-
initialize
public void initialize(net.minecraft.world.entity.player.Player player) Description copied from interface:PokedexStorage
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.
-