public class PlayerParticipant extends BattleParticipant
| Modifier and Type | Field and Description |
|---|---|
boolean |
enforcedRevive |
boolean |
hasAmuletCoin
Whether an Amulet Coin will double prize money.
|
boolean |
hasHappyHour
Whether Happy Hour will double prize money.
|
PlayerPartyStorage |
party
The player's Pokémon.
|
int |
payDay
The amount of money earned from Pay Day after the battle ends.
|
net.minecraft.entity.player.ServerPlayerEntity |
player
The player that this participant is representing.
|
allPokemon, ashNinja, bc, controlledPokemon, dynamax, evolution, isDefeated, lastFailedCapture, lastFaintedTurn, lastMoveTime, numControlledPokemon, startedBattle, switchingIn, switchingOut, team, totalFainted, ultraBurst, usedZ, wait| Constructor and Description |
|---|
PlayerParticipant(boolean raid,
net.minecraft.entity.player.ServerPlayerEntity p,
PixelmonEntity... startingPixelmon)
Deprecated.
|
PlayerParticipant(boolean raid,
net.minecraft.entity.player.ServerPlayerEntity p,
Pokemon... startingPixelmon)
Initializes the player participant for a raid.
|
PlayerParticipant(net.minecraft.entity.player.ServerPlayerEntity p,
java.util.List<Pokemon> teamSelection,
int numControlledPokemon)
Initializes the player participant.
|
PlayerParticipant(net.minecraft.entity.player.ServerPlayerEntity p,
PixelmonEntity... startingPixelmon)
Deprecated.
|
PlayerParticipant(net.minecraft.entity.player.ServerPlayerEntity p,
Pokemon... startingPixelmon)
Initializes the player participant.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDynamax()
Checks if the participant is allowed to Dynamax Pokémon.
|
boolean |
canGainXP()
Checks if the participant's Pokémon can give experience.
|
boolean |
canMegaEvolve()
Checks if the participant is allowed to Mega Evolve Pokémon.
|
void |
checkPlayerItems()
Increments orbs in the player's inventory upon defeating a Pokémon.
|
boolean |
checkPokemon()
Checks if the participant's Pokémon are in a valid state.
|
void |
endBattle(BattleEndCause cause)
Ends the battle the participant is in.
|
java.util.ArrayList<PixelmonWrapper> |
getAllyData()
Gets data about the player's allied Pokémon.
|
int |
getAmuletCoinMultiplier() |
BattleMusicType |
getBattleMusicType() |
java.lang.String |
getDisplayName()
Returns the name of the entity the participant is representing.
|
net.minecraft.entity.LivingEntity |
getEntity()
Gets the entity that this participant is representing.
|
int |
getHappyHourMultiplier() |
int |
getHighestLevel()
Gets the pokemonLevel of the highest-leveled Pokémon in the player's party.
|
MoveChoice |
getMove(PixelmonWrapper pokemon)
Gets the move to be used by the specified Pokémon.
|
net.minecraft.util.text.TextComponent |
getName()
Gets the name of the participant.
|
void |
getNextPokemon(int position)
Sends out the next unfainted Pokémon in the participant's party.
|
java.util.UUID |
getNextPokemonUUID()
Gets the UUID of the next Pokémon in the participant's party that can battle;
|
PixelmonClientData[] |
getOpponentData()
Gets data about the player's opponents.
|
int |
getPrizeMoneyMultiplier()
Gets the multiplier for end-of-battle prize money awarded.
|
PlayerPartyStorage |
getStorage()
Returns the Pokémon storage of the participant.
|
java.util.ArrayList<PixelmonWrapper> |
getTeamPokemonList()
Finds all Pokémon in the battle allied with the player.
|
ParticipantType |
getType()
Gets the type of participant that this participant is.
|
void |
givePlayerExp(PixelmonWrapper pixelmon)
Awards experience to the player when a Pokémon faints.
|
boolean |
hasMorePokemonReserve()
For use with switching in new Pokémon.
|
void |
openGui()
Opens the battle GUI if it didn't just get opened already.
|
void |
resetPayDay() |
void |
selectAction()
Chooses an action for the participant's Pokémon.
|
void |
sendDamagePacket(PixelmonWrapper user,
int damage)
Updates the client when a Pokémon takes damage.
|
void |
sendHealPacket(PixelmonWrapper target,
int amount)
Updates the client when a Pokémon heals.
|
void |
sendMessage(PixelmonPacket message)
Sends a packet to this participant, wont do anything if its not a player.
|
void |
setAmuletCoinMultiplier(int multiplier) |
void |
setHappyHourMultiplier(int multiplier) |
void |
startBattle()
Adds the participant to a battle.
|
PixelmonWrapper |
switchPokemon(PixelmonWrapper pw,
java.util.UUID newPixelmonUUID)
Switches the participant's Pokémon for another one.
|
void |
tick()
Updates the participant every tick.
|
void |
updateOpponentPokemon()
Updates the player's opponents client-side.
|
void |
updateOtherPokemon()
Updates the opponent's Pokémon client-side.
|
void |
updatePokemon(PixelmonWrapper pw)
Updates the specified Pokémon client-side.
|
void |
updatePokemonHealth()
Updates the health of Pokémon on the opposing side of the battle.
|
addSwitchingOut, animateDynamax, canSwitch, clearTurnVariables, countAblePokemon, countHealthPercent, countTeam, faintedLastTurn, getActiveUnfaintedPokemon, getAllies, getBattleAI, getCurrentTime, getFaintedPokemon, getOpponentPokemon, getOpponents, getPartyPosition, getPokemonFromParty, getPokemonFromParty, getPokemonFromUUID, getRandomPartyPokemon, getTeamPokemon, getTotalFainted, getTurnTimeSeconds, getWait, getWorld, hasMorePokemon, hasRemainingPokemon, incrementFaintCount, loadParty, loadParty, loadSingle, onAddStatus, onEndTurn, onHit, onOpponentKO, onSwitchIn, onTakeTurn, onTargeted, onUseAttack, onUseAttackOther, onUseAttackPost, resetMoveTimer, retrieveEntityDuringBattleUnlessRiding, setBattleAI, setNumControlledPokemon, switchAllFainted, updateLastFaintedTurnpublic net.minecraft.entity.player.ServerPlayerEntity player
public PlayerPartyStorage party
public boolean hasAmuletCoin
public boolean hasHappyHour
public int payDay
public boolean enforcedRevive
@Deprecated
public PlayerParticipant(net.minecraft.entity.player.ServerPlayerEntity p,
PixelmonEntity... startingPixelmon)
p - The player.startingPixelmon - The Pokémon to send out at the start of the battle.public PlayerParticipant(net.minecraft.entity.player.ServerPlayerEntity p,
Pokemon... startingPixelmon)
p - The player.startingPixelmon - The Pokémon to send out at the start of the battle.@Deprecated
public PlayerParticipant(boolean raid,
net.minecraft.entity.player.ServerPlayerEntity p,
PixelmonEntity... startingPixelmon)
raid - Whether this participant is in a raid.p - The player.startingPixelmon - The Pokémon to send out at the start of the battle.public PlayerParticipant(boolean raid,
net.minecraft.entity.player.ServerPlayerEntity p,
Pokemon... startingPixelmon)
raid - Whether this participant is in a raid.p - The player.startingPixelmon - The Pokémon to send out at the start of the battle.public PlayerParticipant(net.minecraft.entity.player.ServerPlayerEntity p,
java.util.List<Pokemon> teamSelection,
int numControlledPokemon)
p - The player.teamSelection - The Pokémon that the player has selected for battle.numControlledPokemon - The number of active Pokémon that the participant has at once.public ParticipantType getType()
BattleParticipantgetType in class BattleParticipantpublic boolean canGainXP()
BattleParticipantcanGainXP in class BattleParticipantpublic boolean hasMorePokemonReserve()
BattleParticipanthasMorePokemonReserve in class BattleParticipantpublic void startBattle()
BattleParticipantstartBattle in class BattleParticipantpublic java.util.ArrayList<PixelmonWrapper> getTeamPokemonList()
public void endBattle(BattleEndCause cause)
BattleParticipantendBattle in class BattleParticipantpublic void getNextPokemon(int position)
BattleParticipantgetNextPokemon in class BattleParticipantposition - The position to send out the Pokémon at.public int getPrizeMoneyMultiplier()
public java.util.UUID getNextPokemonUUID()
BattleParticipantgetNextPokemonUUID in class BattleParticipantpublic net.minecraft.util.text.TextComponent getName()
BattleParticipantgetName in class BattleParticipantpublic void selectAction()
BattleParticipantselectAction in class BattleParticipantpublic MoveChoice getMove(PixelmonWrapper pokemon)
BattleParticipantgetMove in class BattleParticipantpokemon - The Pokémon to get a move for.public PixelmonWrapper switchPokemon(PixelmonWrapper pw, java.util.UUID newPixelmonUUID)
BattleParticipantswitchPokemon in class BattleParticipantpw - The Pokémon to switch out.newPixelmonUUID - The UUID of the Pokémon's to switch in.public boolean checkPokemon()
BattleParticipantcheckPokemon in class BattleParticipantpublic void updatePokemon(PixelmonWrapper pw)
BattleParticipantupdatePokemon in class BattleParticipantpw - The Pokémon to update.public net.minecraft.entity.LivingEntity getEntity()
BattleParticipantgetEntity in class BattleParticipantpublic void updateOtherPokemon()
BattleParticipantupdateOtherPokemon in class BattleParticipantpublic java.util.ArrayList<PixelmonWrapper> getAllyData()
public PixelmonClientData[] getOpponentData()
public void updateOpponentPokemon()
public void updatePokemonHealth()
public void checkPlayerItems()
public int getHighestLevel()
public void tick()
BattleParticipanttick in class BattleParticipantpublic void givePlayerExp(PixelmonWrapper pixelmon)
pixelmon - The Pokémon that fainted.public void openGui()
public BattleMusicType getBattleMusicType()
public void sendDamagePacket(PixelmonWrapper user, int damage)
BattleParticipantsendDamagePacket in class BattleParticipantuser - The Pokémon who took damage.damage - The amount of damage dealt.public void sendHealPacket(PixelmonWrapper target, int amount)
BattleParticipantsendHealPacket in class BattleParticipanttarget - The Pokémon who healed.amount - The amount of hp healed.public java.lang.String getDisplayName()
BattleParticipantgetDisplayName in class BattleParticipantpublic PlayerPartyStorage getStorage()
BattleParticipantgetStorage in class BattleParticipantpublic boolean canMegaEvolve()
BattleParticipantcanMegaEvolve in class BattleParticipantpublic boolean canDynamax()
BattleParticipantcanDynamax in class BattleParticipantpublic void sendMessage(PixelmonPacket message)
BattleParticipantsendMessage in class BattleParticipantmessage - The packet to send to this playerpublic int getAmuletCoinMultiplier()
public void setAmuletCoinMultiplier(int multiplier)
public int getHappyHourMultiplier()
public void setHappyHourMultiplier(int multiplier)
public void resetPayDay()