Class WrapperLink
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.stats.links.PokemonLink
com.pixelmonmod.pixelmon.api.pokemon.stats.links.WrapperLink
Links to a
PixelmonWrapper
object to get or update data.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustFriendship
(int change) Changes the friendship of the Pokémon.boolean
Checks if the Pokémon can gain experience and pokemonLevel up.Gets the Pokémon's Ability.Gets the battle controller for the battle the Pokémon is in.int
Gets the number of Egg cycles need to hatchEgg an Egg.Gets the Pokémon entity.int
getExp()
Gets the Pokémon's experience.int
Gets the amount of experience needed for the Pokémon to pokemonLevel up.getForm()
Gets the Pokémon's form name.int
Gets the Pokémon's friendship.Gets the Pokémon's gender.int
Gets the Pokémon's current hp.Gets the Pokémon's held item.int
Gets the Pokémon's maximum hp.int
getMaxHealth
(boolean ignoreDynamax) Gets the Pokémon's moves.Gets the Pokémon's Nature.net.minecraft.network.chat.Component
Gets the Pokémon's nickname.net.minecraft.server.level.ServerPlayer
Gets the player who owns the Pokémon.int
Gets the Pokémon's pokemonLevel.Gets the ID of the Pokémon.Gets thePixelmonWrapper
wrapped by the object.net.minecraft.core.BlockPos
getPos()
Gets the world position of the Pokémon.Gets the non-volatile status on the Pokémon.net.minecraft.network.chat.Component
Gets the Pokémon's nickname, ignoring Illusion.getStats()
Gets the numerical stats of the Pokémon.Gets the storage of the Pokémon's owner.getType()
Gets the Pokémon's type.net.minecraft.world.level.Level
getWorld()
Gets the world that the Pokémon is in.boolean
isEgg()
Checks if the Pokémon is an Egg.boolean
removeStatuses
(StatusType... statuses) Removes the specified statuses from the Pokémon.void
sendMessage
(String langKey, Object... data) Sends a message to the client.void
setExp
(int experience) Sets the Pokémon's experience.void
setHealth
(int health) Sets the Pokémon's current hp.void
setHealthDirect
(int health) Directly sets the Pokémon's current hp, ignoring damage/heal processing.void
setHeldItem
(net.minecraft.world.item.ItemStack item) Sets the Pokémon's held item.void
setLevel
(int level) Sets the Pokémon's pokemonLevel.void
setScale
(float scale) Sets the model scale of the Pokémon.void
update
(EnumUpdateType... updateTypes) Updates the Pokémon client-side.void
updateLevelUp
(PixelmonStatsData stats) Updates the Pokémon when it levels up.void
Updates the Pokémon's stats client-side.Methods inherited from class com.pixelmonmod.pixelmon.api.pokemon.stats.links.PokemonLink
getBall, getBaseStats, getGrowth, getHeldItemStack, getSpecies, isFainted, isShiny, toString
-
Constructor Details
-
WrapperLink
The Pokémon to link to.
-
-
Method Details
-
getPokemon
- Specified by:
getPokemon
in classPokemonLink
-
getStats
Description copied from class:PokemonLink
Gets the numerical stats of the Pokémon.- Specified by:
getStats
in classPokemonLink
- Returns:
- The numerical stats of the Pokémon.
-
getHeldItem
Description copied from class:PokemonLink
Gets the Pokémon's held item.- Specified by:
getHeldItem
in classPokemonLink
- Returns:
- The Pokémon's held item.
-
setHeldItem
public void setHeldItem(net.minecraft.world.item.ItemStack item) Description copied from class:PokemonLink
Sets the Pokémon's held item.- Specified by:
setHeldItem
in classPokemonLink
- Parameters:
item
- The Pokémon's new held item.
-
getHealth
public int getHealth()Description copied from class:PokemonLink
Gets the Pokémon's current hp.- Specified by:
getHealth
in classPokemonLink
- Returns:
- The Pokémon's current hp.
-
getMaxHealth
public int getMaxHealth()Description copied from class:PokemonLink
Gets the Pokémon's maximum hp.- Specified by:
getMaxHealth
in classPokemonLink
- Returns:
- The Pokémon's maximum hp.
-
getMaxHealth
public int getMaxHealth(boolean ignoreDynamax) - Specified by:
getMaxHealth
in classPokemonLink
-
setHealth
public void setHealth(int health) Description copied from class:PokemonLink
Sets the Pokémon's current hp.- Specified by:
setHealth
in classPokemonLink
- Parameters:
health
- The Pokémon's current hp.
-
setHealthDirect
public void setHealthDirect(int health) Description copied from class:PokemonLink
Directly sets the Pokémon's current hp, ignoring damage/heal processing.- Overrides:
setHealthDirect
in classPokemonLink
- Parameters:
health
- The Pokémon's current hp.
-
getPokemonLevel
public int getPokemonLevel()Description copied from class:PokemonLink
Gets the Pokémon's pokemonLevel.- Specified by:
getPokemonLevel
in classPokemonLink
- Returns:
- The Pokémon's pokemonLevel.
-
setLevel
public void setLevel(int level) Description copied from class:PokemonLink
Sets the Pokémon's pokemonLevel.- Specified by:
setLevel
in classPokemonLink
- Parameters:
level
- The Pokémon's pokemonLevel.
-
getExp
public int getExp()Description copied from class:PokemonLink
Gets the Pokémon's experience.- Specified by:
getExp
in classPokemonLink
- Returns:
- The Pokémon's experience.
-
setExp
public void setExp(int experience) Description copied from class:PokemonLink
Sets the Pokémon's experience.- Specified by:
setExp
in classPokemonLink
- Parameters:
experience
- The Pokémon's experience.
-
getFriendship
public int getFriendship()Description copied from class:PokemonLink
Gets the Pokémon's friendship.- Specified by:
getFriendship
in classPokemonLink
- Returns:
- The Pokémon's friendship.
-
doesLevel
public boolean doesLevel()Description copied from class:PokemonLink
Checks if the Pokémon can gain experience and pokemonLevel up.- Specified by:
doesLevel
in classPokemonLink
- Returns:
- Whether the Pokémon can gain experience and pokemonLevel up.
-
getPlayerOwner
public net.minecraft.server.level.ServerPlayer getPlayerOwner()Description copied from class:PokemonLink
Gets the player who owns the Pokémon.- Specified by:
getPlayerOwner
in classPokemonLink
- Returns:
- The player who owns the Pokémon, or null if no player owns the Pokémon.
-
getRealNickname
public net.minecraft.network.chat.Component getRealNickname()Description copied from class:PokemonLink
Gets the Pokémon's nickname, ignoring Illusion.- Overrides:
getRealNickname
in classPokemonLink
- Returns:
- The Pokémon's nickname;
-
getBattleController
Description copied from class:PokemonLink
Gets the battle controller for the battle the Pokémon is in.- Specified by:
getBattleController
in classPokemonLink
- Returns:
- The battle controller for the battle the Pokémon is in, or null if the Pokémon is not in a battle.
-
getMoveset
Description copied from class:PokemonLink
Gets the Pokémon's moves.- Specified by:
getMoveset
in classPokemonLink
- Returns:
- The Pokémon's moves.
-
getPokemonUUID
Description copied from class:PokemonLink
Gets the ID of the Pokémon.- Specified by:
getPokemonUUID
in classPokemonLink
- Returns:
- The ID of the Pokémon.
-
getEntity
Description copied from class:PokemonLink
Gets the Pokémon entity. Sends it out if it isn't already out.- Specified by:
getEntity
in classPokemonLink
- Returns:
- The Pokémon entity.
-
setScale
public void setScale(float scale) Description copied from class:PokemonLink
Sets the model scale of the Pokémon.- Specified by:
setScale
in classPokemonLink
- Parameters:
scale
- The model scale of the Pokémon.
-
getWorld
public net.minecraft.world.level.Level getWorld()Description copied from class:PokemonLink
Gets the world that the Pokémon is in.- Specified by:
getWorld
in classPokemonLink
- Returns:
- The world that the Pokémon is in.
-
getGender
Description copied from class:PokemonLink
Gets the Pokémon's gender.- Specified by:
getGender
in classPokemonLink
- Returns:
- The Pokémon's gender.
-
getPos
public net.minecraft.core.BlockPos getPos()Description copied from class:PokemonLink
Gets the world position of the Pokémon.- Specified by:
getPos
in classPokemonLink
- Returns:
- The world position of the Pokémon.
-
getStorage
Description copied from class:PokemonLink
Gets the storage of the Pokémon's owner.- Specified by:
getStorage
in classPokemonLink
- Returns:
- The storage of the Pokémon's owner.
-
update
Description copied from class:PokemonLink
Updates the Pokémon client-side.- Specified by:
update
in classPokemonLink
- Parameters:
updateTypes
- The types of data to update.
-
updateStats
public void updateStats()Description copied from class:PokemonLink
Updates the Pokémon's stats client-side.- Specified by:
updateStats
in classPokemonLink
-
updateLevelUp
Description copied from class:PokemonLink
Updates the Pokémon when it levels up.- Specified by:
updateLevelUp
in classPokemonLink
- Parameters:
stats
- Data about the Pokémon stats after leveling up.
-
sendMessage
Description copied from class:PokemonLink
Sends a message to the client.- Specified by:
sendMessage
in classPokemonLink
- Parameters:
langKey
- The lang key for the message.data
- Additional arguments to pass into the lang string.
-
getNickname
public net.minecraft.network.chat.Component getNickname()Description copied from class:PokemonLink
Gets the Pokémon's nickname.- Specified by:
getNickname
in classPokemonLink
- Returns:
- The Pokémon's nickname.
-
removeStatuses
Description copied from class:PokemonLink
Removes the specified statuses from the Pokémon.- Specified by:
removeStatuses
in classPokemonLink
- Parameters:
statuses
- The statuses to remove.- Returns:
- Whether a status was removed.
-
getNature
Description copied from class:PokemonLink
Gets the Pokémon's Nature.- Specified by:
getNature
in classPokemonLink
- Returns:
- The Pokémon's Nature.
-
getExpToNextLevel
public int getExpToNextLevel()Description copied from class:PokemonLink
Gets the amount of experience needed for the Pokémon to pokemonLevel up.- Specified by:
getExpToNextLevel
in classPokemonLink
- Returns:
- The amount of experience needed for the Pokémon to pokemonLevel up.
-
getPrimaryStatus
Description copied from class:PokemonLink
Gets the non-volatile status on the Pokémon.- Specified by:
getPrimaryStatus
in classPokemonLink
- Returns:
- The non-volatile status on the Pokémon.
-
getAbility
Description copied from class:PokemonLink
Gets the Pokémon's Ability.- Specified by:
getAbility
in classPokemonLink
- Returns:
- The Pokémon's Ability.
-
getType
Description copied from class:PokemonLink
Gets the Pokémon's type.- Specified by:
getType
in classPokemonLink
- Returns:
- A list of the Pokémon's types.
-
getForm
Description copied from class:PokemonLink
Gets the Pokémon's form name.- Specified by:
getForm
in classPokemonLink
- Returns:
- The Pokémon's form name.
-
isEgg
public boolean isEgg()Description copied from class:PokemonLink
Checks if the Pokémon is an Egg.- Specified by:
isEgg
in classPokemonLink
- Returns:
- Whether the Pokémon is an Egg.
-
getEggCycles
public int getEggCycles()Description copied from class:PokemonLink
Gets the number of Egg cycles need to hatchEgg an Egg.- Specified by:
getEggCycles
in classPokemonLink
- Returns:
- The number of Egg cycles need to hatchEgg an Egg.
-
getPokerus
- Specified by:
getPokerus
in classPokemonLink
-
adjustFriendship
public void adjustFriendship(int change) Description copied from class:PokemonLink
Changes the friendship of the Pokémon. Decreases in trust have a negative argument- Specified by:
adjustFriendship
in classPokemonLink
- Parameters:
change
- The change in friendship, negative if it is a decrease of friendship.
-
getPokemonWrapper
Gets thePixelmonWrapper
wrapped by the object.- Returns:
- The
PixelmonWrapper
wrapped by the object.
-