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, updateLastFaintedTurn
public 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()
BattleParticipant
getType
in class BattleParticipant
public boolean canGainXP()
BattleParticipant
canGainXP
in class BattleParticipant
public boolean hasMorePokemonReserve()
BattleParticipant
hasMorePokemonReserve
in class BattleParticipant
public void startBattle()
BattleParticipant
startBattle
in class BattleParticipant
public java.util.ArrayList<PixelmonWrapper> getTeamPokemonList()
public void endBattle(BattleEndCause cause)
BattleParticipant
endBattle
in class BattleParticipant
public void getNextPokemon(int position)
BattleParticipant
getNextPokemon
in class BattleParticipant
position
- The position to send out the Pokémon at.public int getPrizeMoneyMultiplier()
public java.util.UUID getNextPokemonUUID()
BattleParticipant
getNextPokemonUUID
in class BattleParticipant
public net.minecraft.util.text.TextComponent getName()
BattleParticipant
getName
in class BattleParticipant
public void selectAction()
BattleParticipant
selectAction
in class BattleParticipant
public MoveChoice getMove(PixelmonWrapper pokemon)
BattleParticipant
getMove
in class BattleParticipant
pokemon
- The Pokémon to get a move for.public PixelmonWrapper switchPokemon(PixelmonWrapper pw, java.util.UUID newPixelmonUUID)
BattleParticipant
switchPokemon
in class BattleParticipant
pw
- The Pokémon to switch out.newPixelmonUUID
- The UUID of the Pokémon's to switch in.public boolean checkPokemon()
BattleParticipant
checkPokemon
in class BattleParticipant
public void updatePokemon(PixelmonWrapper pw)
BattleParticipant
updatePokemon
in class BattleParticipant
pw
- The Pokémon to update.public net.minecraft.entity.LivingEntity getEntity()
BattleParticipant
getEntity
in class BattleParticipant
public void updateOtherPokemon()
BattleParticipant
updateOtherPokemon
in class BattleParticipant
public java.util.ArrayList<PixelmonWrapper> getAllyData()
public PixelmonClientData[] getOpponentData()
public void updateOpponentPokemon()
public void updatePokemonHealth()
public void checkPlayerItems()
public int getHighestLevel()
public void tick()
BattleParticipant
tick
in class BattleParticipant
public void givePlayerExp(PixelmonWrapper pixelmon)
pixelmon
- The Pokémon that fainted.public void openGui()
public BattleMusicType getBattleMusicType()
public void sendDamagePacket(PixelmonWrapper user, int damage)
BattleParticipant
sendDamagePacket
in class BattleParticipant
user
- The Pokémon who took damage.damage
- The amount of damage dealt.public void sendHealPacket(PixelmonWrapper target, int amount)
BattleParticipant
sendHealPacket
in class BattleParticipant
target
- The Pokémon who healed.amount
- The amount of hp healed.public java.lang.String getDisplayName()
BattleParticipant
getDisplayName
in class BattleParticipant
public PlayerPartyStorage getStorage()
BattleParticipant
getStorage
in class BattleParticipant
public boolean canMegaEvolve()
BattleParticipant
canMegaEvolve
in class BattleParticipant
public boolean canDynamax()
BattleParticipant
canDynamax
in class BattleParticipant
public void sendMessage(PixelmonPacket message)
BattleParticipant
sendMessage
in class BattleParticipant
message
- 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()