public class PlayerPokedex
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PlayerPokedex.PokedexSpawnData |
Modifier and Type | Field and Description |
---|---|
com.google.common.collect.Table<java.lang.Integer,java.lang.Short,java.lang.Short> |
formDex
Tracker for unique forms seen by the player.
|
java.util.UUID |
uuid
The player who this Pokédex keeps track of.
|
Constructor and Description |
---|
PlayerPokedex()
Initializes a Pokédex with no owner.
|
PlayerPokedex(java.util.UUID uuid)
Registers a Pokédex to its owner.
|
Modifier and Type | Method and Description |
---|---|
void |
checkForCharms() |
void |
checkForOvalCharm() |
void |
checkForShinyCharm() |
int |
countCaught()
Counts the number of Pokémon the player has caught.
|
int |
countCaught(int generation)
Counts the number of Pokémon the player has caught.
|
int |
countSeen()
Counts the number of Pokémon the player has seen.
|
int |
countSeen(int generation)
Counts the number of Pokémon the player has seen.
|
PokedexRegistrationStatus |
get(int id)
Gets the register status of a Pokémon.
|
float |
getCaughtCompletionPercentage()
Gets the caught completion percentage of the player
|
PokedexEntry |
getEntry(int id)
Gets the entry through the registry status of the Pokemon
|
float |
getSeenCompletionPercentage()
Gets the seen completion percentage of the player
|
java.util.Map<java.lang.Integer,PokedexRegistrationStatus> |
getSeenMap()
Gets the register status map for the Pokédex.
|
boolean |
hasCaught(Species species)
Checks if a Pokémon has been caught.
|
boolean |
hasSeen(Species species)
Checks if a Pokémon has been seen.
|
boolean |
isRegistered(Species species)
Checks if a Pokémon has been seen or caught.
|
net.minecraft.nbt.CompoundNBT |
readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
Reads Pokédex register status from NBT.
|
java.util.Map<java.lang.Short,java.lang.Short> |
seenForms(Species species) |
boolean |
set(int id,
PokedexRegistrationStatus drs)
Sets an entry in the register status map.
|
boolean |
set(Pokemon pokemon,
PokedexRegistrationStatus drs)
Sets an entry in the register status map.
|
static boolean |
set(java.util.UUID playerUUID,
Pokemon id,
PokedexRegistrationStatus drs) |
void |
setSeenList(java.util.HashMap<java.lang.Integer,PokedexRegistrationStatus> data)
Sets the Pokédex's register status map.
|
void |
setSeenMap(java.util.Map<java.lang.Integer,PokedexRegistrationStatus> seenMap)
Don't use this
|
PlayerPokedex |
setUUID(java.util.UUID uuid) |
void |
update()
Sends Pokédex data to the client player.
|
void |
wipe() |
net.minecraft.nbt.CompoundNBT |
writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
Writes the register status map to NBT.
|
public java.util.UUID uuid
public com.google.common.collect.Table<java.lang.Integer,java.lang.Short,java.lang.Short> formDex
public PlayerPokedex()
public PlayerPokedex(java.util.UUID uuid)
uuid
- The UUID of the player who this Pokédex keeps track of.public PlayerPokedex setUUID(java.util.UUID uuid)
public net.minecraft.nbt.CompoundNBT readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
nbt
- The NBT tag to read from.public java.util.Map<java.lang.Integer,PokedexRegistrationStatus> getSeenMap()
public float getSeenCompletionPercentage()
public float getCaughtCompletionPercentage()
public net.minecraft.nbt.CompoundNBT writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
nbt
- The NBT tag to write to.public void update()
public boolean set(Pokemon pokemon, PokedexRegistrationStatus drs)
pokemon
- The Pokémon to modify register status for.drs
- The new register status to assign to the Pokémon.public boolean set(int id, PokedexRegistrationStatus drs)
id
- The National Pokédex number of the Pokémon to modify register status for.drs
- The new register status to assign to the Pokémon.public static boolean set(java.util.UUID playerUUID, Pokemon id, PokedexRegistrationStatus drs)
public void wipe()
public PokedexRegistrationStatus get(int id)
id
- The National Pokédex number of the Pokémon.public PokedexEntry getEntry(int id)
id
- The National Pokédex number of the Pokémon.public boolean isRegistered(Species species)
species
- The species to check.public boolean hasSeen(Species species)
species
- The species to check.public boolean hasCaught(Species species)
species
- The species to check.public int countCaught()
public int countCaught(int generation)
generation
- The generation to checkpublic int countSeen()
public int countSeen(int generation)
generation
- The generation to checkpublic void setSeenMap(java.util.Map<java.lang.Integer,PokedexRegistrationStatus> seenMap)
public java.util.Map<java.lang.Short,java.lang.Short> seenForms(Species species)
public void checkForOvalCharm()
public void checkForCharms()
public void checkForShinyCharm()
public void setSeenList(java.util.HashMap<java.lang.Integer,PokedexRegistrationStatus> data)
data
- The new register status map.