public class Pokemon extends PokemonBase
Modifier and Type | Field and Description |
---|---|
protected AbilityBase |
ability |
protected int |
abilitySlot |
protected BonusStats |
bonusStats |
protected EnumPokeballs |
caughtBall |
protected java.lang.String |
customTexture |
protected int |
dimension |
protected EnumRibbonType |
displayedRibbon |
protected boolean |
doesLevel |
protected DataSync<java.lang.String> |
dsCustomTexture |
protected DataSync<java.lang.Integer> |
dsExp |
protected DataSync<java.lang.Byte> |
dsGrowth |
protected DataSync<java.lang.Float> |
dsHealth |
protected DataSync<java.lang.Integer> |
dsLevel |
protected DataSync<java.lang.String> |
dsNickname |
protected DataSync<com.google.common.base.Optional<java.util.UUID>> |
dsOwner |
protected DataSync<java.lang.Integer> |
dsRibbon |
protected DataSync<java.lang.Boolean> |
dsShiny |
protected DataSync<com.google.common.base.Optional<java.util.UUID>> |
dsUUID |
protected int |
dynamaxLevel |
protected java.lang.Integer |
eggCycles |
protected java.lang.Integer |
eggSteps |
protected int |
entityID |
protected int |
experience |
protected ExtraStats |
extraStats |
protected int |
friendship |
protected boolean |
gigantamaxFactor |
protected EnumGrowth |
growth |
protected int |
health |
protected net.minecraft.item.ItemStack |
heldItem |
protected boolean |
inRanch |
protected boolean |
isShiny |
int |
lastBattleCrits |
protected int |
level |
protected Level |
levelContainer |
protected EnumNature |
mintNature |
protected Moveset |
moveset |
protected java.util.HashMap<java.lang.String,net.minecraft.util.Tuple<java.lang.Long,java.lang.Long>> |
moveSkillCooldownData |
protected EnumNature |
nature |
protected java.lang.String |
nickname |
protected java.lang.String |
originalTrainerName |
protected java.util.UUID |
originalTrainerUUID |
protected net.minecraft.nbt.NBTTagCompound |
persistentData |
protected Pokerus |
pokerus |
protected StoragePosition |
position |
protected java.util.ArrayList<java.lang.Integer> |
relearnableMoves |
protected java.util.Set<EnumRibbonType> |
ribbons |
protected java.util.ArrayList<java.lang.String> |
specFlags |
protected Stats |
stats |
protected StatusPersist |
status |
protected PokemonStorage |
storage |
protected java.util.UUID |
uuid |
dataSyncMap, dsForm, dsGender, dsSpecies, form, formEnum, gender, species
Modifier | Constructor and Description |
---|---|
protected |
Pokemon()
This constructor is STRONGLY discouraged, and exists only for JSON deserialization.
|
protected |
Pokemon(EnumSpecies species) |
protected |
Pokemon(java.util.UUID uuid) |
protected |
Pokemon(java.util.UUID uuid,
EnumSpecies species) |
Modifier and Type | Method and Description |
---|---|
void |
addEggSteps(int steps,
int cycleMultiplier) |
boolean |
addRibbon(EnumRibbonType ribbon)
Adds a ribbon to this Pokémon and sets it as the displayed ribbon.
|
boolean |
addRibbon(EnumRibbonType ribbon,
boolean displayRibbon)
Adds a ribbon to this Pokémon
|
void |
addSpecFlag(java.lang.String key) |
boolean |
canBattle() |
boolean |
canGigantamax() |
void |
changeDynamaxLevel(int dynamaxLevel) |
void |
decreaseFriendship(int amount) |
boolean |
doesLevel() |
void |
evolve(PokemonSpec to) |
AbilityBase |
getAbility() |
java.lang.String |
getAbilityName() |
int |
getAbilitySlot() |
EnumNature |
getBaseNature() |
BaseStats |
getBaseStats() |
BonusStats |
getBonusStats() |
EnumPokeballs |
getCaughtBall() |
java.lang.String |
getCustomTexture() |
EnumRibbonType |
getDisplayedRibbon() |
java.lang.String |
getDisplayName() |
int |
getDynamaxLevel() |
int |
getEggCycles() |
java.lang.String |
getEggDescription()
Gets the PokéChecker description translation key of an Egg.
|
int |
getEggSteps() |
int |
getEntityID() |
<T extends Evolution> |
getEvolutions(java.lang.Class<T> type) |
EVStore |
getEVs() |
int |
getExperience() |
float |
getExperienceFraction() |
int |
getExperienceToLevelUp() |
ExtraStats |
getExtraStats() |
<T extends ExtraStats> |
getExtraStats(java.lang.Class<T> type)
Gets the extra stats for this Pokémon.
|
int |
getFriendship() |
EnumGrowth |
getGrowth() |
int |
getHealth() |
float |
getHealthPercentage() |
net.minecraft.item.ItemStack |
getHeldItem() |
ItemHeld |
getHeldItemAsItemHeld()
Gets the ItemHeld type of the item the Pokémon is holding.
|
int |
getHighestOffensiveStat() |
IVStore |
getIVs() |
int |
getLevel() |
Level |
getLevelContainer() |
int |
getMaxHealth() |
EnumNature |
getMintNature() |
Moveset |
getMoveset() |
double |
getMoveSkillCooldownRatio(MoveSkill moveSkill) |
int |
getMoveSkillCooldownTicks(MoveSkill moveSkill) |
EnumNature |
getNature()
Gives the active nature of this pokemon, Use either
getBaseNature()
or getMintNature() if you need a specific value. |
EnumNature |
getNature(boolean mintOverride)
Deprecated.
|
java.lang.String |
getNickname() |
java.lang.String |
getOriginalTrainer() |
java.util.UUID |
getOriginalTrainerUUID() |
EntityPixelmon |
getOrSpawnPixelmon(net.minecraft.entity.Entity parent) |
EntityPixelmon |
getOrSpawnPixelmon(net.minecraft.world.World world,
double x,
double y,
double z) |
EntityPixelmon |
getOrSpawnPixelmon(net.minecraft.world.World world,
double x,
double y,
double z,
float rotationYaw,
float rotationPitch)
Gets the entity attached to this Pokémon, or spawns it if it does not exist in the given world.
|
java.lang.String |
getOwnerName() |
net.minecraft.entity.player.EntityPlayerMP |
getOwnerPlayer() |
java.util.UUID |
getOwnerPlayerUUID() |
NPCTrainer |
getOwnerTrainer() |
java.util.UUID |
getOwnerTrainerUUID() |
net.minecraft.nbt.NBTTagCompound |
getPersistentData() |
EntityPixelmon |
getPixelmonIfExists() |
PixelmonWrapper |
getPixelmonWrapperIfExists() |
Pokerus |
getPokerus() |
StoragePosition |
getPosition() |
java.util.ArrayList<java.lang.Integer> |
getRelearnableMoves() |
java.util.ArrayList<EnumRibbonType> |
getRibbons()
Deprecated.
14/12/21 Use
getRibbonsSet() |
java.util.Set<EnumRibbonType> |
getRibbonsSet() |
int |
getStat(StatsType stat) |
Stats |
getStats() |
StatusPersist |
getStatus() |
PokemonStorage |
getStorage() |
net.minecraft.util.Tuple<PokemonStorage,StoragePosition> |
getStorageAndPosition() |
java.util.UUID |
getUUID() |
net.minecraft.world.World |
getWorld() |
boolean |
hasGigantamaxFactor() |
boolean |
hasSpecFlag(java.lang.String key) |
void |
hatchEgg() |
void |
heal() |
boolean |
ifEntityExists(java.util.function.Consumer<EntityPixelmon> action)
Executes code if the entity representing this Pokémon exists.
|
void |
increaseFriendship(int amount) |
Pokemon |
initialize(EnumInitializeCategory... initializeCategories) |
boolean |
isEgg()
Gets whether or not the Pokémon is an egg.
|
boolean |
isFriendshipHighEnoughToEvolve() |
boolean |
isInRanch() |
boolean |
isLegendary() |
boolean |
isMoveSkillCoolingDown(MoveSkill moveSkill) |
boolean |
isOriginalTrainer(net.minecraft.entity.player.EntityPlayer player) |
boolean |
isShiny() |
Pokemon |
makeEgg() |
void |
markDirty(EnumUpdateType... dataTypes) |
Pokemon |
readFromByteBuffer(io.netty.buffer.ByteBuf buf,
EnumUpdateType... data) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
void |
registerDataParameters(java.util.Map<java.lang.String,net.minecraft.network.datasync.DataParameter<?>> map) |
void |
removeRibbon(EnumRibbonType ribbon) |
void |
removeSpecFlag(java.lang.String key) |
void |
rerollMoveset() |
void |
retrieve() |
void |
setAbility(AbilityBase ability) |
void |
setAbility(java.lang.String abilityName)
Sets the Pokémon's Ability.
|
void |
setAbilitySlot(int abilitySlot) |
void |
setBonusStats(BonusStats bonusStats) |
void |
setCaughtBall(EnumPokeballs caughtBall) |
void |
setCustomTexture(java.lang.String specialTexture) |
void |
setDisplayedRibbon(EnumRibbonType sel) |
void |
setDoesLevel(boolean doesLevel) |
void |
setDynamaxLevel(int dynamaxLevel) |
void |
setEggCycles(java.lang.Integer eggCycles) |
void |
setEggSteps(java.lang.Integer eggSteps) |
void |
setExperience(int experience) |
void |
setForm(IEnumForm form) |
void |
setForm(int form) |
void |
setFriendship(int friendship) |
void |
setGender(Gender gender) |
void |
setGigantamaxFactor(boolean gigantamaxFactor) |
void |
setGrowth(EnumGrowth growth) |
void |
setHealth(int health) |
void |
setHealthPercentage(float healthPercentage) |
void |
setHeldItem(net.minecraft.item.ItemStack stack)
Sets the Pokémon's held item after firing
HeldItemChangedEvent . |
void |
setInRanch(boolean inRanch) |
void |
setLevel(int level) |
void |
setLevelNum(int level) |
void |
setMintNature(EnumNature nature) |
void |
setMoveset(Moveset moveset) |
void |
setMoveSkillCooldown(MoveSkill moveSkill,
int cooldownTicks) |
void |
setNature(EnumNature nature) |
void |
setNickname(java.lang.String nickname) |
void |
setOriginalTrainer(net.minecraft.entity.player.EntityPlayer player) |
void |
setOriginalTrainer(java.util.UUID originalTrainerUUID,
java.lang.String originalTrainerName) |
void |
setPokerus(Pokerus pokerus) |
void |
setShiny(boolean isShiny) |
void |
setSpecies(EnumSpecies species,
boolean doSpeciesInitialization) |
void |
setStatus(StatusPersist status) |
void |
setStorage(PokemonStorage storage,
StoragePosition position) |
Pokemon |
setUUID(java.util.UUID uuid) |
java.lang.String |
toString() |
void |
tryEvolution()
Attempts to evolve the Pokémon if possible.
|
void |
updateDimensionAndEntityID(int dimension,
int entityID) |
void |
writeToByteBuffer(io.netty.buffer.ByteBuf buf,
EnumUpdateType... data) |
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
copyBase, dataManagerChange, getForm, getFormEnum, getGender, getSpecies, getUnlocalizedName, isPokemon, setSpecies
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocalizedName, getTranslatedName
protected java.util.UUID uuid
protected Moveset moveset
protected boolean isShiny
protected EnumNature nature
protected EnumNature mintNature
protected EnumGrowth growth
protected int friendship
protected Level levelContainer
protected int level
protected int experience
protected int dynamaxLevel
protected boolean gigantamaxFactor
protected Stats stats
protected BonusStats bonusStats
protected java.lang.Integer eggCycles
protected java.lang.Integer eggSteps
protected net.minecraft.item.ItemStack heldItem
protected StatusPersist status
protected ExtraStats extraStats
protected AbilityBase ability
protected int abilitySlot
protected java.lang.String nickname
protected java.lang.String customTexture
protected EnumPokeballs caughtBall
protected java.lang.String originalTrainerName
protected java.util.UUID originalTrainerUUID
protected Pokerus pokerus
protected boolean inRanch
protected int health
protected boolean doesLevel
protected java.util.ArrayList<java.lang.Integer> relearnableMoves
protected volatile java.util.HashMap<java.lang.String,net.minecraft.util.Tuple<java.lang.Long,java.lang.Long>> moveSkillCooldownData
protected java.util.ArrayList<java.lang.String> specFlags
protected java.util.Set<EnumRibbonType> ribbons
protected EnumRibbonType displayedRibbon
protected net.minecraft.nbt.NBTTagCompound persistentData
public int lastBattleCrits
protected transient int dimension
protected transient int entityID
protected transient PokemonStorage storage
protected transient StoragePosition position
protected final transient DataSync<com.google.common.base.Optional<java.util.UUID>> dsUUID
protected final transient DataSync<java.lang.Byte> dsGrowth
protected final transient DataSync<java.lang.Integer> dsLevel
protected final transient DataSync<java.lang.Integer> dsExp
protected final transient DataSync<java.lang.Boolean> dsShiny
protected final transient DataSync<java.lang.String> dsCustomTexture
protected final transient DataSync<java.lang.String> dsNickname
protected final transient DataSync<java.lang.Integer> dsRibbon
protected final transient DataSync<java.lang.Float> dsHealth
protected final transient DataSync<com.google.common.base.Optional<java.util.UUID>> dsOwner
protected Pokemon()
protected Pokemon(java.util.UUID uuid)
protected Pokemon(java.util.UUID uuid, EnumSpecies species)
protected Pokemon(EnumSpecies species)
public BaseStats getBaseStats()
getBaseStats
in class PokemonBase
@Nullable public EntityPixelmon getPixelmonIfExists()
@Nullable public PixelmonWrapper getPixelmonWrapperIfExists()
public EntityPixelmon getOrSpawnPixelmon(net.minecraft.world.World world, double x, double y, double z, float rotationYaw, float rotationPitch)
Caveats:
world
- The world the entity is needed in.world
is null.public EntityPixelmon getOrSpawnPixelmon(net.minecraft.world.World world, double x, double y, double z)
public EntityPixelmon getOrSpawnPixelmon(net.minecraft.entity.Entity parent)
public void updateDimensionAndEntityID(int dimension, int entityID)
public int getEntityID()
public net.minecraft.world.World getWorld()
public boolean ifEntityExists(java.util.function.Consumer<EntityPixelmon> action)
action
- The action to carry out if the entity exists.public Pokemon initialize(EnumInitializeCategory... initializeCategories)
public Pokemon makeEgg()
public void evolve(PokemonSpec to)
public java.util.UUID getUUID()
public Pokemon setUUID(java.util.UUID uuid)
public java.util.UUID getOwnerTrainerUUID()
public NPCTrainer getOwnerTrainer()
public java.util.UUID getOwnerPlayerUUID()
public net.minecraft.entity.player.EntityPlayerMP getOwnerPlayer()
public java.lang.String getDisplayName()
@Nullable public java.lang.String getNickname()
public void setNickname(java.lang.String nickname)
public java.lang.String getOwnerName()
public void setSpecies(EnumSpecies species, boolean doSpeciesInitialization)
setSpecies
in class PokemonBase
public void setForm(int form)
setForm
in class PokemonBase
public void setForm(IEnumForm form)
setForm
in class PokemonBase
public void setGender(Gender gender)
setGender
in class PokemonBase
public boolean isEgg()
public int getEggCycles()
public void setEggCycles(java.lang.Integer eggCycles)
public int getEggSteps()
public void setEggSteps(java.lang.Integer eggSteps)
public void addEggSteps(int steps, int cycleMultiplier)
public void hatchEgg()
public java.lang.String getEggDescription()
@Nonnull public net.minecraft.item.ItemStack getHeldItem()
@Nonnull public ItemHeld getHeldItemAsItemHeld()
NoItem
if this is not holding anything.public void setHeldItem(net.minecraft.item.ItemStack stack)
HeldItemChangedEvent
.
For out-of-battle use only; use the PixelmonWrapper
version for in-battle.stack
- The held item to set. Null or ItemStack.EMPTY to remove.public EnumGrowth getGrowth()
public void setGrowth(EnumGrowth growth)
public EnumNature getNature()
getBaseNature()
or getMintNature()
if you need a specific value.@Deprecated public EnumNature getNature(boolean mintOverride)
getBaseNature()
or getMintNature()
public EnumNature getBaseNature()
public EnumNature getMintNature()
public void setNature(EnumNature nature)
public void setMintNature(EnumNature nature)
public Pokerus getPokerus()
public void setPokerus(Pokerus pokerus)
public AbilityBase getAbility()
public java.lang.String getAbilityName()
public void setAbility(AbilityBase ability)
public void setAbility(java.lang.String abilityName)
abilityName
- The name of the Ability to give to the Pokémon.public int getAbilitySlot()
public void setAbilitySlot(int abilitySlot)
public IVStore getIVs()
public EVStore getEVs()
public BonusStats getBonusStats()
public void setBonusStats(BonusStats bonusStats)
public int getHighestOffensiveStat()
public int getStat(StatsType stat)
public Stats getStats()
public ExtraStats getExtraStats()
public <T extends ExtraStats> T getExtraStats(java.lang.Class<T> type)
public void setExperience(int experience)
public int getExperience()
public int getExperienceToLevelUp()
public float getExperienceFraction()
@Nonnull public StatusPersist getStatus()
public void setStatus(StatusPersist status)
public int getLevel()
public Level getLevelContainer()
public void setLevelNum(int level)
public void setLevel(int level)
public int getDynamaxLevel()
public void setDynamaxLevel(int dynamaxLevel)
public void changeDynamaxLevel(int dynamaxLevel)
public boolean hasGigantamaxFactor()
public boolean canGigantamax()
public void setGigantamaxFactor(boolean gigantamaxFactor)
public boolean canBattle()
public boolean isLegendary()
public boolean isShiny()
public void setShiny(boolean isShiny)
public Moveset getMoveset()
public void setMoveset(Moveset moveset)
public void rerollMoveset()
public java.lang.String getCustomTexture()
public void setCustomTexture(java.lang.String specialTexture)
public int getFriendship()
public void setFriendship(int friendship)
public void increaseFriendship(int amount)
public void decreaseFriendship(int amount)
public boolean isFriendshipHighEnoughToEvolve()
@Nullable public java.lang.String getOriginalTrainer()
@Nullable public java.util.UUID getOriginalTrainerUUID()
public void setOriginalTrainer(java.util.UUID originalTrainerUUID, java.lang.String originalTrainerName)
public void setOriginalTrainer(net.minecraft.entity.player.EntityPlayer player)
public boolean isOriginalTrainer(net.minecraft.entity.player.EntityPlayer player)
public EnumPokeballs getCaughtBall()
public void setCaughtBall(EnumPokeballs caughtBall)
public int getHealth()
public float getHealthPercentage()
public void heal()
public void setHealth(int health)
public void setHealthPercentage(float healthPercentage)
public int getMaxHealth()
public boolean doesLevel()
public void setDoesLevel(boolean doesLevel)
public boolean isInRanch()
public void setInRanch(boolean inRanch)
public java.util.ArrayList<java.lang.Integer> getRelearnableMoves()
public <T extends Evolution> java.util.ArrayList<T> getEvolutions(java.lang.Class<T> type)
public void tryEvolution()
public net.minecraft.nbt.NBTTagCompound getPersistentData()
public void retrieve()
public void setStorage(PokemonStorage storage, StoragePosition position)
@Nullable public PokemonStorage getStorage()
@Nullable public StoragePosition getPosition()
@Nullable public net.minecraft.util.Tuple<PokemonStorage,StoragePosition> getStorageAndPosition()
public boolean isMoveSkillCoolingDown(MoveSkill moveSkill)
public int getMoveSkillCooldownTicks(MoveSkill moveSkill)
public double getMoveSkillCooldownRatio(MoveSkill moveSkill)
public void setMoveSkillCooldown(MoveSkill moveSkill, int cooldownTicks)
public void addSpecFlag(java.lang.String key)
public void removeSpecFlag(java.lang.String key)
public boolean hasSpecFlag(java.lang.String key)
public void markDirty(EnumUpdateType... dataTypes)
public EnumRibbonType getDisplayedRibbon()
public boolean addRibbon(EnumRibbonType ribbon)
ribbon
- The ribbon type to add.public boolean addRibbon(EnumRibbonType ribbon, boolean displayRibbon)
ribbon
- The ribbon type to add.displayRibbon
- If the ribbon added should be immediately displayed (defaults = true)public void removeRibbon(EnumRibbonType ribbon)
public void writeToByteBuffer(io.netty.buffer.ByteBuf buf, EnumUpdateType... data)
public Pokemon readFromByteBuffer(io.netty.buffer.ByteBuf buf, EnumUpdateType... data)
public void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
readFromNBT
in class PokemonBase
public net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound nbt)
writeToNBT
in class PokemonBase
public void registerDataParameters(java.util.Map<java.lang.String,net.minecraft.network.datasync.DataParameter<?>> map)
registerDataParameters
in class PokemonBase
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set<EnumRibbonType> getRibbonsSet()
@Deprecated public java.util.ArrayList<EnumRibbonType> getRibbons()
getRibbonsSet()
public void setDisplayedRibbon(EnumRibbonType sel)