public class PlayerStats
extends java.lang.Object
Constructor and Description |
---|
PlayerStats()
Initializes an empty set of stats.
|
Modifier and Type | Method and Description |
---|---|
void |
addCaughtType(Element type) |
void |
addCaughtTypes(java.util.List<Element> types) |
void |
addExp(int amount)
Adds an amount of experience to the player's experience totals.
|
void |
addHatched()
Increments the total amount of Pokémon the player has hatched.
|
void |
addKill()
Adds a wild Pokémon defeat to the player's stats.
|
void |
addLoss()
Adds a loss to the player's loss count.
|
void |
addToTotalBred()
Increments the total amount of Pokémon the player has bred.
|
void |
addWin()
Adds a win to the player's win count.
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getCaughtTypeCount() |
int |
getCurrentExp()
Gets the current amount of experience the player's Pokémon have.
|
int |
getCurrentKills()
Gets the current amount of wild Pokémon the player has defeated.
|
int |
getLosses()
Gets the amount of times the player has lost battles against other players.
|
static void |
getNBTTags(java.util.HashMap<java.lang.String,java.lang.Class> tags)
Gets the NBT tags associated with player stats.
|
int |
getTotalBred()
Gets the total amount of Pokémon the player has bred.
|
int |
getTotalEvolved()
Gets the total amount of Pokémon the player has Evolved.
|
int |
getTotalExp()
Gets the total amount of experience the player's Pokémon have earned.
|
int |
getTotalHatched()
Gets the total amount of Pokémon the player has hatched.
|
int |
getTotalKills()
Gets the total amount of wild Pokémon the player has defeated.
|
int |
getWins()
Gets the amount of times the player has won battles against other players.
|
void |
readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
Reads stats from NBT.
|
void |
resetWinLoss()
Resets the player's win and loss counts to 0.
|
void |
setCaughtTypeCount(java.util.HashMap<java.lang.String,java.lang.Integer> caughtTypeCount) |
void |
setCurrentExp(int currentExp)
Sets current amount of experience the player's Pokémon have.
|
void |
setCurrentKills(int currentKills)
Sets the current amount of wild Pokémon the player has defeated.
|
void |
setExp(int exp)
Sets the current amount of experience the player's Pokémon have.
|
void |
setLosses(int losses)
Sets the player's loss count.
|
void |
setTotalBred(int totalBred)
Sets the total amount of Pokémon the player has bred.
|
void |
setTotalEvolved(int totalEvolved)
Sets the total amount of Pokémon the player has bred.
|
void |
setTotalExp(int totalExp)
Sets the total amount of experience the player's Pokémon have earned.
|
void |
setTotalHatched(int totalHatched)
Sets the total amount of Pokémon the player has hatched.
|
void |
setTotalKills(int totalKills)
Sets the total amount of wild Pokémon the player has defeated.
|
void |
setWins(int wins)
Sets the player's win count.
|
void |
writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
Writes the stats to NBT.
|
public static void getNBTTags(java.util.HashMap<java.lang.String,java.lang.Class> tags)
tags
- A map of tags to add the player stat tags to.public void writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
nbt
- The NBT tag to write to.public void readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
nbt
- The NBT tag to read from.public void addWin()
public void addLoss()
public void addKill()
public int getCurrentKills()
public void setCurrentKills(int currentKills)
currentKills
- The new amount of wild Pokémon defeats.public int getTotalExp()
public void setTotalExp(int totalExp)
totalExp
- The new current amount of experience the player's Pokémon have earned.public int getTotalKills()
public void setTotalKills(int totalKills)
totalKills
- The new total amount of wild Pokémon the player has defeated.public int getCurrentExp()
public void setCurrentExp(int currentExp)
currentExp
- The new current amount of experience the player's Pokémon have.public int getWins()
public void setWins(int wins)
wins
- The new win count.public int getLosses()
public void setLosses(int losses)
losses
- The new loss count.public void addExp(int amount)
amount
- The amount of experience to add.public void setExp(int exp)
exp
- The new current amount of experience the player's Pokémon have.public void resetWinLoss()
public int getTotalBred()
public void setTotalBred(int totalBred)
public void addToTotalBred()
public int getTotalHatched()
public void setTotalHatched(int totalHatched)
public void addHatched()
public int getTotalEvolved()
public void setTotalEvolved(int totalEvolved)
totalEvolved
- The new total amount of Pokémon the player has bred.public java.util.HashMap<java.lang.String,java.lang.Integer> getCaughtTypeCount()
public void setCaughtTypeCount(java.util.HashMap<java.lang.String,java.lang.Integer> caughtTypeCount)
public void addCaughtType(Element type)
public void addCaughtTypes(java.util.List<Element> types)