Class WildPixelmonParticipant
java.lang.Object
com.pixelmonmod.pixelmon.battles.controller.participants.BattleParticipant
com.pixelmonmod.pixelmon.battles.controller.participants.WildPixelmonParticipant
A wild Pokémon in battle.
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.battles.controller.participants.BattleParticipant
allPokemon, ashNinja, bc, controlledPokemon, dynamax, evolution, isDefeated, lastFailedCapture, lastFaintedTurn, lastMoveTime, numControlledPokemon, startedBattle, switchingIn, switchingOut, team, totalFainted, ultraBurst, usedZ, wait
-
Constructor Summary
ConstructorDescriptionWildPixelmonParticipant
(boolean isGrassBattleParticipant, PixelmonEntity... pixelmon) Initializes a wild Pokémon participantWildPixelmonParticipant
(int size, Pokemon... pokemon) WildPixelmonParticipant
(Pokemon... pokemon) WildPixelmonParticipant
(PixelmonEntity... pixelmon) Initializes a wild Pokémon participant. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the participant is allowed to Dynamax Pokémon.boolean
Checks if the participant's Pokémon can give experience.boolean
Checks if the participant's Pokémon are in a valid state.void
endBattle
(BattleEndCause cause) Ends the battle the participant is in.Returns the name of the entity the participant is representing.net.minecraft.world.entity.Mob
Gets the entity that this participant is representing.Gets the move to be used by the specified Pokémon.net.minecraft.network.chat.Component
getName()
Gets the name of the participant.void
getNextPokemon
(int position) Sends out the next unfainted Pokémon in the participant's party.Gets the UUID of the next Pokémon in the participant's party that can battle;getType()
Gets the type of participant that this participant is.boolean
Checks if the participant has Pokémon that can battleboolean
For use with switching in new Pokémon.void
Adds the participant to a battle.switchPokemon
(PixelmonWrapper oldPokemon, UUID newPixelmonUUID) Switches the participant's Pokémon for another one.void
Updates the opponent's Pokémon client-side.void
Updates the specified Pokémon client-side.Methods inherited from class com.pixelmonmod.pixelmon.battles.controller.participants.BattleParticipant
addSwitchingOut, canMegaEvolve, canSwitch, clearTurnVariables, countAblePokemon, countHealthPercent, countTeam, faintedLastTurn, getActiveUnfaintedPokemon, getAllies, getBattleAI, getCurrentTime, getFaintedPokemon, getOpponentPokemon, getOpponents, getPartyPokemonFromUUID, getPartyPosition, getPokemonFromParty, getPokemonFromParty, getPokemonFromUUID, getRandomPartyPokemon, getStorage, getTeamPokemon, getTotalFainted, getTurnTimeSeconds, getWait, getWorld, hasRemainingPokemon, incrementFaintCount, loadParty, loadParty, loadSingle, onAddStatus, onEndTurn, onHit, onOpponentKO, onSwitchIn, onTakeTurn, onTargeted, onUseAttack, onUseAttackOther, onUseAttackPost, resetMoveTimer, retrieveEntityDuringBattleUnlessRiding, selectAction, sendDamagePacket, sendHealPacket, sendMessage, setBattleAI, setNumControlledPokemon, switchAllFainted, tick, updateLastFaintedTurn
-
Constructor Details
-
WildPixelmonParticipant
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
Initializes a wild Pokémon participant.- Parameters:
pixelmon
- The Pokémon that the participant is representing.
-
WildPixelmonParticipant
-
WildPixelmonParticipant
-
-
Method Details
-
getType
Description copied from class:BattleParticipant
Gets the type of participant that this participant is.- Specified by:
getType
in classBattleParticipant
- 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 classBattleParticipant
- 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 classBattleParticipant
- 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 classBattleParticipant
- 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 classBattleParticipant
-
endBattle
Description copied from class:BattleParticipant
Ends the battle the participant is in.- Specified by:
endBattle
in classBattleParticipant
-
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 classBattleParticipant
- Parameters:
position
- The position to send out the Pokémon at.
-
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 classBattleParticipant
- 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 classBattleParticipant
- Returns:
- The name of the participant.
-
getMove
Description copied from class:BattleParticipant
Gets the move to be used by the specified Pokémon.- Specified by:
getMove
in classBattleParticipant
- Parameters:
pw
- The Pokémon to get a move for.- Returns:
- The move to be used by the specified Pokémon.
-
switchPokemon
Description copied from class:BattleParticipant
Switches the participant's Pokémon for another one.- Specified by:
switchPokemon
in classBattleParticipant
- 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 classBattleParticipant
- Returns:
- Whether the participant's Pokémon are in a valid state.
-
updatePokemon
Description copied from class:BattleParticipant
Updates the specified Pokémon client-side.- Specified by:
updatePokemon
in classBattleParticipant
- 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 classBattleParticipant
- Returns:
- The entity that this participant is representing.
-
asWrapper
-
updateOtherPokemon
public void updateOtherPokemon()Description copied from class:BattleParticipant
Updates the opponent's Pokémon client-side.- Specified by:
updateOtherPokemon
in classBattleParticipant
-
canDynamax
public boolean canDynamax()Description copied from class:BattleParticipant
Checks if the participant is allowed to Dynamax Pokémon.- Overrides:
canDynamax
in classBattleParticipant
- Returns:
- Whether the participant is allowed to Dynamax Pokémon.
-
getDisplayName
Description copied from class:BattleParticipant
Returns the name of the entity the participant is representing.- Overrides:
getDisplayName
in classBattleParticipant
- Returns:
- The name of the entity the participant is representing.
-