Class DelegateLink
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.stats.links.PokemonLink
com.pixelmonmod.pixelmon.api.pokemon.stats.links.DelegateLink
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustFriendship(int change) Changes the friendship of the Pokémon.booleanChecks 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.intGets the number of Egg cycles need to hatchEgg an Egg.Gets the Pokémon entity.intgetExp()Gets the Pokémon's experience.intGets the amount of experience needed for the Pokémon to pokemonLevel up.getForm()Gets the Pokémon's form name.intGets the Pokémon's friendship.Gets the Pokémon's gender.intGets the Pokémon's current hp.Gets the Pokémon's held item.intGets the Pokémon's maximum hp.intgetMaxHealth(boolean ignoreDynamax) Gets the Pokémon's moves.Gets the Pokémon's Nature.net.minecraft.network.chat.ComponentGets the Pokémon's nickname.net.minecraft.server.level.ServerPlayerGets the player who owns the Pokémon.intGets the Pokémon's pokemonLevel.Gets the ID of the Pokémon.net.minecraft.core.BlockPosgetPos()Gets the world position of the Pokémon.Gets the non-volatile status on the Pokémon.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.LevelgetWorld()Gets the world that the Pokémon is in.booleanisEgg()Checks if the Pokémon is an Egg.booleanremoveStatuses(StatusType... statuses) Removes the specified statuses from the Pokémon.voidsendMessage(String langKey, Object... data) Sends a message to the client.voidsetExp(int experience) Sets the Pokémon's experience.voidsetHealth(int health) Sets the Pokémon's current hp.voidsetHeldItem(net.minecraft.world.item.ItemStack item) Sets the Pokémon's held item.voidsetLevel(int level) Sets the Pokémon's pokemonLevel.voidsetScale(float scale) Sets the model scale of the Pokémon.voidupdate(EnumUpdateType... updateTypes) Updates the Pokémon client-side.voidupdateLevelUp(PixelmonStatsData stats) Updates the Pokémon when it levels up.voidUpdates the Pokémon's stats client-side.Methods inherited from class com.pixelmonmod.pixelmon.api.pokemon.stats.links.PokemonLink
getBall, getBaseStats, getGrowth, getHeldItemStack, getRealNickname, getSpecies, isFainted, isShiny, setHealthDirect, toString
-
Field Details
-
pokemon
-
-
Constructor Details
-
DelegateLink
-
-
Method Details
-
getPokemon
- Specified by:
getPokemonin classPokemonLink
-
getStats
Description copied from class:PokemonLinkGets the numerical stats of the Pokémon.- Specified by:
getStatsin classPokemonLink- Returns:
- The numerical stats of the Pokémon.
-
getHeldItem
Description copied from class:PokemonLinkGets the Pokémon's held item.- Specified by:
getHeldItemin classPokemonLink- Returns:
- The Pokémon's held item.
-
setHeldItem
public void setHeldItem(net.minecraft.world.item.ItemStack item) Description copied from class:PokemonLinkSets the Pokémon's held item.- Specified by:
setHeldItemin classPokemonLink- Parameters:
item- The Pokémon's new held item.
-
getHealth
public int getHealth()Description copied from class:PokemonLinkGets the Pokémon's current hp.- Specified by:
getHealthin classPokemonLink- Returns:
- The Pokémon's current hp.
-
getMaxHealth
public int getMaxHealth()Description copied from class:PokemonLinkGets the Pokémon's maximum hp.- Specified by:
getMaxHealthin classPokemonLink- Returns:
- The Pokémon's maximum hp.
-
getMaxHealth
public int getMaxHealth(boolean ignoreDynamax) - Specified by:
getMaxHealthin classPokemonLink
-
setHealth
public void setHealth(int health) Description copied from class:PokemonLinkSets the Pokémon's current hp.- Specified by:
setHealthin classPokemonLink- Parameters:
health- The Pokémon's current hp.
-
getPokemonLevel
public int getPokemonLevel()Description copied from class:PokemonLinkGets the Pokémon's pokemonLevel.- Specified by:
getPokemonLevelin classPokemonLink- Returns:
- The Pokémon's pokemonLevel.
-
setLevel
public void setLevel(int level) Description copied from class:PokemonLinkSets the Pokémon's pokemonLevel.- Specified by:
setLevelin classPokemonLink- Parameters:
level- The Pokémon's pokemonLevel.
-
getExp
public int getExp()Description copied from class:PokemonLinkGets the Pokémon's experience.- Specified by:
getExpin classPokemonLink- Returns:
- The Pokémon's experience.
-
setExp
public void setExp(int experience) Description copied from class:PokemonLinkSets the Pokémon's experience.- Specified by:
setExpin classPokemonLink- Parameters:
experience- The Pokémon's experience.
-
getFriendship
public int getFriendship()Description copied from class:PokemonLinkGets the Pokémon's friendship.- Specified by:
getFriendshipin classPokemonLink- Returns:
- The Pokémon's friendship.
-
doesLevel
public boolean doesLevel()Description copied from class:PokemonLinkChecks if the Pokémon can gain experience and pokemonLevel up.- Specified by:
doesLevelin classPokemonLink- Returns:
- Whether the Pokémon can gain experience and pokemonLevel up.
-
getPlayerOwner
public net.minecraft.server.level.ServerPlayer getPlayerOwner()Description copied from class:PokemonLinkGets the player who owns the Pokémon.- Specified by:
getPlayerOwnerin classPokemonLink- Returns:
- The player who owns the Pokémon, or null if no player owns the Pokémon.
-
getBattleController
Description copied from class:PokemonLinkGets the battle controller for the battle the Pokémon is in.- Specified by:
getBattleControllerin 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:PokemonLinkGets the Pokémon's moves.- Specified by:
getMovesetin classPokemonLink- Returns:
- The Pokémon's moves.
-
getPokemonUUID
Description copied from class:PokemonLinkGets the ID of the Pokémon.- Specified by:
getPokemonUUIDin classPokemonLink- Returns:
- The ID of the Pokémon.
-
getEntity
Description copied from class:PokemonLinkGets the Pokémon entity. Sends it out if it isn't already out.- Specified by:
getEntityin classPokemonLink- Returns:
- The Pokémon entity.
-
setScale
public void setScale(float scale) Description copied from class:PokemonLinkSets the model scale of the Pokémon.- Specified by:
setScalein classPokemonLink- Parameters:
scale- The model scale of the Pokémon.
-
getWorld
public net.minecraft.world.level.Level getWorld()Description copied from class:PokemonLinkGets the world that the Pokémon is in.- Specified by:
getWorldin classPokemonLink- Returns:
- The world that the Pokémon is in.
-
getGender
Description copied from class:PokemonLinkGets the Pokémon's gender.- Specified by:
getGenderin classPokemonLink- Returns:
- The Pokémon's gender.
-
getPos
public net.minecraft.core.BlockPos getPos()Description copied from class:PokemonLinkGets the world position of the Pokémon.- Specified by:
getPosin classPokemonLink- Returns:
- The world position of the Pokémon.
-
getStorage
Description copied from class:PokemonLinkGets the storage of the Pokémon's owner.- Specified by:
getStoragein classPokemonLink- Returns:
- The storage of the Pokémon's owner.
-
update
Description copied from class:PokemonLinkUpdates the Pokémon client-side.- Specified by:
updatein classPokemonLink- Parameters:
updateTypes- The types of data to update.
-
updateStats
public void updateStats()Description copied from class:PokemonLinkUpdates the Pokémon's stats client-side.- Specified by:
updateStatsin classPokemonLink
-
updateLevelUp
Description copied from class:PokemonLinkUpdates the Pokémon when it levels up.- Specified by:
updateLevelUpin classPokemonLink- Parameters:
stats- Data about the Pokémon stats after leveling up.
-
sendMessage
Description copied from class:PokemonLinkSends a message to the client.- Specified by:
sendMessagein 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:PokemonLinkGets the Pokémon's nickname.- Specified by:
getNicknamein classPokemonLink- Returns:
- The Pokémon's nickname.
-
removeStatuses
Description copied from class:PokemonLinkRemoves the specified statuses from the Pokémon.- Specified by:
removeStatusesin classPokemonLink- Parameters:
statuses- The statuses to remove.- Returns:
- Whether a status was removed.
-
getNature
Description copied from class:PokemonLinkGets the Pokémon's Nature.- Specified by:
getNaturein classPokemonLink- Returns:
- The Pokémon's Nature.
-
getExpToNextLevel
public int getExpToNextLevel()Description copied from class:PokemonLinkGets the amount of experience needed for the Pokémon to pokemonLevel up.- Specified by:
getExpToNextLevelin classPokemonLink- Returns:
- The amount of experience needed for the Pokémon to pokemonLevel up.
-
getPrimaryStatus
Description copied from class:PokemonLinkGets the non-volatile status on the Pokémon.- Specified by:
getPrimaryStatusin classPokemonLink- Returns:
- The non-volatile status on the Pokémon.
-
getAbility
Description copied from class:PokemonLinkGets the Pokémon's Ability.- Specified by:
getAbilityin classPokemonLink- Returns:
- The Pokémon's Ability.
-
getType
Description copied from class:PokemonLinkGets the Pokémon's type.- Specified by:
getTypein classPokemonLink- Returns:
- A list of the Pokémon's types.
-
getForm
Description copied from class:PokemonLinkGets the Pokémon's form name.- Specified by:
getFormin classPokemonLink- Returns:
- The Pokémon's form name.
-
isEgg
public boolean isEgg()Description copied from class:PokemonLinkChecks if the Pokémon is an Egg.- Specified by:
isEggin classPokemonLink- Returns:
- Whether the Pokémon is an Egg.
-
getEggCycles
public int getEggCycles()Description copied from class:PokemonLinkGets the number of Egg cycles need to hatchEgg an Egg.- Specified by:
getEggCyclesin classPokemonLink- Returns:
- The number of Egg cycles need to hatchEgg an Egg.
-
getPokerus
- Specified by:
getPokerusin classPokemonLink
-
adjustFriendship
public void adjustFriendship(int change) Description copied from class:PokemonLinkChanges the friendship of the Pokémon. Decreases in trust have a negative argument- Specified by:
adjustFriendshipin classPokemonLink- Parameters:
change- The change in friendship, negative if it is a decrease of friendship.
-