java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.stats.links.PokemonLink
com.pixelmonmod.pixelmon.api.pokemon.stats.links.WrapperLink

public class WrapperLink extends PokemonLink
Links to a PixelmonWrapper object to get or update data.
  • Constructor Details

    • WrapperLink

      public WrapperLink(PixelmonWrapper pixelmon)
      The Pokémon to link to.
  • Method Details

    • getPokemon

      public Pokemon getPokemon()
      Specified by:
      getPokemon in class PokemonLink
    • getStats

      public PermanentStats getStats()
      Description copied from class: PokemonLink
      Gets the numerical stats of the Pokémon.
      Specified by:
      getStats in class PokemonLink
      Returns:
      The numerical stats of the Pokémon.
    • getHeldItem

      public HeldItem getHeldItem()
      Description copied from class: PokemonLink
      Gets the Pokémon's held item.
      Specified by:
      getHeldItem in class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      Returns:
      The Pokémon's maximum hp.
    • getMaxHealth

      public int getMaxHealth(boolean ignoreDynamax)
      Specified by:
      getMaxHealth in class PokemonLink
    • setHealth

      public void setHealth(int health)
      Description copied from class: PokemonLink
      Sets the Pokémon's current hp.
      Specified by:
      setHealth in class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      Returns:
      The Pokémon's nickname;
    • getBattleController

      public BattleController getBattleController()
      Description copied from class: PokemonLink
      Gets the battle controller for the battle the Pokémon is in.
      Specified by:
      getBattleController in class PokemonLink
      Returns:
      The battle controller for the battle the Pokémon is in, or null if the Pokémon is not in a battle.
    • getMoveset

      public Moveset getMoveset()
      Description copied from class: PokemonLink
      Gets the Pokémon's moves.
      Specified by:
      getMoveset in class PokemonLink
      Returns:
      The Pokémon's moves.
    • getPokemonUUID

      public UUID getPokemonUUID()
      Description copied from class: PokemonLink
      Gets the ID of the Pokémon.
      Specified by:
      getPokemonUUID in class PokemonLink
      Returns:
      The ID of the Pokémon.
    • getEntity

      public PixelmonEntity getEntity()
      Description copied from class: PokemonLink
      Gets the Pokémon entity. Sends it out if it isn't already out.
      Specified by:
      getEntity in class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      Returns:
      The world that the Pokémon is in.
    • getGender

      public Gender getGender()
      Description copied from class: PokemonLink
      Gets the Pokémon's gender.
      Specified by:
      getGender in class PokemonLink
      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 class PokemonLink
      Returns:
      The world position of the Pokémon.
    • getStorage

      public PartyStorage getStorage()
      Description copied from class: PokemonLink
      Gets the storage of the Pokémon's owner.
      Specified by:
      getStorage in class PokemonLink
      Returns:
      The storage of the Pokémon's owner.
    • update

      public void update(EnumUpdateType... updateTypes)
      Description copied from class: PokemonLink
      Updates the Pokémon client-side.
      Specified by:
      update in class PokemonLink
      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 class PokemonLink
    • updateLevelUp

      public void updateLevelUp(PixelmonStatsData stats)
      Description copied from class: PokemonLink
      Updates the Pokémon when it levels up.
      Specified by:
      updateLevelUp in class PokemonLink
      Parameters:
      stats - Data about the Pokémon stats after leveling up.
    • sendMessage

      public void sendMessage(String langKey, Object... data)
      Description copied from class: PokemonLink
      Sends a message to the client.
      Specified by:
      sendMessage in class PokemonLink
      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 class PokemonLink
      Returns:
      The Pokémon's nickname.
    • getOriginalTrainer

      public String getOriginalTrainer()
      Description copied from class: PokemonLink
      Gets the name of the Pokémon's original Trainer.
      Specified by:
      getOriginalTrainer in class PokemonLink
      Returns:
      The name of the Pokémon's original Trainer.
    • removeStatuses

      public boolean removeStatuses(StatusType... statuses)
      Description copied from class: PokemonLink
      Removes the specified statuses from the Pokémon.
      Specified by:
      removeStatuses in class PokemonLink
      Parameters:
      statuses - The statuses to remove.
      Returns:
      Whether a status was removed.
    • getNature

      public Nature getNature()
      Description copied from class: PokemonLink
      Gets the Pokémon's Nature.
      Specified by:
      getNature in class PokemonLink
      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 class PokemonLink
      Returns:
      The amount of experience needed for the Pokémon to pokemonLevel up.
    • getPrimaryStatus

      public StatusPersist getPrimaryStatus()
      Description copied from class: PokemonLink
      Gets the non-volatile status on the Pokémon.
      Specified by:
      getPrimaryStatus in class PokemonLink
      Returns:
      The non-volatile status on the Pokémon.
    • getAbility

      public Ability getAbility()
      Description copied from class: PokemonLink
      Gets the Pokémon's Ability.
      Specified by:
      getAbility in class PokemonLink
      Returns:
      The Pokémon's Ability.
    • getType

      public List<Element> getType()
      Description copied from class: PokemonLink
      Gets the Pokémon's type.
      Specified by:
      getType in class PokemonLink
      Returns:
      A list of the Pokémon's types.
    • getForm

      public String getForm()
      Description copied from class: PokemonLink
      Gets the Pokémon's form name.
      Specified by:
      getForm in class PokemonLink
      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 class PokemonLink
      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 class PokemonLink
      Returns:
      The number of Egg cycles need to hatchEgg an Egg.
    • getPartyPosition

      public int getPartyPosition()
      Description copied from class: PokemonLink
      Gets the position of the Pokémon in the owner's party.
      Specified by:
      getPartyPosition in class PokemonLink
      Returns:
      The position of the Pokémon in the owner's party.
    • hasOwner

      public boolean hasOwner()
      Description copied from class: PokemonLink
      Checks if the Pokémon has an owner.
      Specified by:
      hasOwner in class PokemonLink
      Returns:
      Whether the Pokémon has an owner.
    • getPokerus

      public Optional<Pokerus> getPokerus()
      Specified by:
      getPokerus in class PokemonLink
    • 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 class PokemonLink
      Parameters:
      change - The change in friendship, negative if it is a decrease of friendship.
    • getPokemonWrapper

      public PixelmonWrapper getPokemonWrapper()
      Gets the PixelmonWrapper wrapped by the object.
      Returns:
      The PixelmonWrapper wrapped by the object.