Class WildPixelmonParticipant

java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.participants.BattleParticipant
com.pixelmonmod.pixelmon.battles.controller.participants.WildPixelmonParticipant

public class WildPixelmonParticipant extends BattleParticipant
A wild Pokémon in battle.
  • Constructor Details

    • WildPixelmonParticipant

      public WildPixelmonParticipant(boolean isGrassBattleParticipant, PixelmonEntity... pixelmon)
      Initializes a wild Pokémon participant
      Parameters:
      isGrassBattleParticipant - Whether the Pokémon was spawned from Pixelmon Grass.
      pixelmon - The Pokémon that the participant is representing.
    • WildPixelmonParticipant

      public WildPixelmonParticipant(PixelmonEntity... pixelmon)
      Initializes a wild Pokémon participant.
      Parameters:
      pixelmon - The Pokémon that the participant is representing.
    • WildPixelmonParticipant

      public WildPixelmonParticipant(Pokemon... pokemon)
    • WildPixelmonParticipant

      public WildPixelmonParticipant(int size, Pokemon... pokemon)
  • Method Details

    • getType

      public ParticipantType getType()
      Description copied from class: BattleParticipant
      Gets the type of participant that this participant is.
      Specified by:
      getType in class BattleParticipant
      Returns:
      The type of participant that this participant is.
    • hasMorePokemon

      public boolean hasMorePokemon()
      Description copied from class: BattleParticipant
      Checks if the participant has Pokémon that can battle
      Overrides:
      hasMorePokemon in class BattleParticipant
      Returns:
      True if the player has a Pokémon that can battle.
    • hasMorePokemonReserve

      public boolean hasMorePokemonReserve()
      Description copied from class: BattleParticipant
      For use with switching in new Pokémon. Checks if they have Pokémon in reserve. Normally calls countablePokemon.
      Specified by:
      hasMorePokemonReserve in class BattleParticipant
      Returns:
      True if the player has a Pokémon in reserve.
    • canGainXP

      public boolean canGainXP()
      Description copied from class: BattleParticipant
      Checks if the participant's Pokémon can give experience.
      Specified by:
      canGainXP in class BattleParticipant
      Returns:
      Whether the participant's Pokémon can give experience.
    • startBattle

      public void startBattle()
      Description copied from class: BattleParticipant
      Adds the participant to a battle.
      Overrides:
      startBattle in class BattleParticipant
    • endBattle

      public void endBattle(BattleEndCause cause)
      Description copied from class: BattleParticipant
      Ends the battle the participant is in.
      Specified by:
      endBattle in class BattleParticipant
    • getNextPokemon

      public void getNextPokemon(int position)
      Description copied from class: BattleParticipant
      Sends out the next unfainted Pokémon in the participant's party.
      Specified by:
      getNextPokemon in class BattleParticipant
      Parameters:
      position - The position to send out the Pokémon at.
    • getNextPokemonUUID

      public UUID getNextPokemonUUID()
      Description copied from class: BattleParticipant
      Gets the UUID of the next Pokémon in the participant's party that can battle;
      Specified by:
      getNextPokemonUUID in class BattleParticipant
      Returns:
      the UUID of the next Pokémon in the participant's party that can battle, or null if there aren't any.
    • getName

      public net.minecraft.network.chat.Component getName()
      Description copied from class: BattleParticipant
      Gets the name of the participant.
      Specified by:
      getName in class BattleParticipant
      Returns:
      The name of the participant.
    • getMove

      public MoveChoice getMove(PixelmonWrapper pw)
      Description copied from class: BattleParticipant
      Gets the move to be used by the specified Pokémon.
      Specified by:
      getMove in class BattleParticipant
      Parameters:
      pw - The Pokémon to get a move for.
      Returns:
      The move to be used by the specified Pokémon.
    • switchPokemon

      public PixelmonWrapper switchPokemon(PixelmonWrapper oldPokemon, UUID newPixelmonUUID)
      Description copied from class: BattleParticipant
      Switches the participant's Pokémon for another one.
      Specified by:
      switchPokemon in class BattleParticipant
      Parameters:
      oldPokemon - The Pokémon to switch out.
      newPixelmonUUID - The UUID of the Pokémon's to switch in.
      Returns:
      The Pokémon who switched in.
    • checkPokemon

      public boolean checkPokemon()
      Description copied from class: BattleParticipant
      Checks if the participant's Pokémon are in a valid state.
      Specified by:
      checkPokemon in class BattleParticipant
      Returns:
      Whether the participant's Pokémon are in a valid state.
    • updatePokemon

      public void updatePokemon(PixelmonWrapper pw)
      Description copied from class: BattleParticipant
      Updates the specified Pokémon client-side.
      Specified by:
      updatePokemon in class BattleParticipant
      Parameters:
      pw - The Pokémon to update.
    • getEntity

      public net.minecraft.world.entity.Mob getEntity()
      Description copied from class: BattleParticipant
      Gets the entity that this participant is representing.
      Specified by:
      getEntity in class BattleParticipant
      Returns:
      The entity that this participant is representing.
    • asWrapper

      public PixelmonWrapper asWrapper()
    • updateOtherPokemon

      public void updateOtherPokemon()
      Description copied from class: BattleParticipant
      Updates the opponent's Pokémon client-side.
      Specified by:
      updateOtherPokemon in class BattleParticipant
    • canDynamax

      public boolean canDynamax()
      Description copied from class: BattleParticipant
      Checks if the participant is allowed to Dynamax Pokémon.
      Overrides:
      canDynamax in class BattleParticipant
      Returns:
      Whether the participant is allowed to Dynamax Pokémon.
    • getDisplayName

      public String getDisplayName()
      Description copied from class: BattleParticipant
      Returns the name of the entity the participant is representing.
      Overrides:
      getDisplayName in class BattleParticipant
      Returns:
      The name of the entity the participant is representing.