public class SwitchOutTask extends BattleTaskPacket
Constructor and Description |
---|
SwitchOutTask()
Empty constructor for packet registration.
|
SwitchOutTask(java.util.UUID pix1UUID)
Initializes a packet to remove a Pokémon from battle without replacing it.
|
SwitchOutTask(java.util.UUID pokemonUUID,
PixelmonClientData newPokemon)
Initializes a switch task.
|
SwitchOutTask(java.util.UUID pix1UUID,
PixelmonWrapper newPokemon)
Initializes a packet to switch out a Pokémon for another one
|
Modifier and Type | Method and Description |
---|---|
void |
decode(net.minecraft.network.PacketBuffer buf)
Decodes the information from the buffer to the packet instance
|
void |
encode(net.minecraft.network.PacketBuffer buf)
Encodes the buffer with the packet information
|
java.util.UUID |
getPokemonID()
Gets the UUID of the
Pokemon this message affects |
boolean |
process(ClientBattleManager bm)
Will be called once per frame until you return false.
|
boolean |
shouldRunParallel()
If this returns true the gui will not wait to complete this task before running the next task in queue.
|
handlePacket
handle, reply
public SwitchOutTask()
public SwitchOutTask(java.util.UUID pokemonUUID, PixelmonClientData newPokemon)
pokemonUUID
- The UUID of the Pokémon switching out.newPokemon
- Data for the Pokémon switching in.public SwitchOutTask(java.util.UUID pix1UUID, PixelmonWrapper newPokemon)
pix1UUID
- The UUID of the Pokémon switching out.newPokemon
- The Pokémon switching in.public SwitchOutTask(java.util.UUID pix1UUID)
pix1UUID
- The Pokémon to remove from battle.public boolean process(ClientBattleManager bm)
BattleTaskPacket
process
in class BattleTaskPacket
@Nullable public java.util.UUID getPokemonID()
BattleTaskPacket
Pokemon
this message affectsgetPokemonID
in class BattleTaskPacket
public boolean shouldRunParallel()
BattleTaskPacket
shouldRunParallel
in class BattleTaskPacket
public void decode(net.minecraft.network.PacketBuffer buf)
PixelmonPacket
decode
in interface PixelmonPacket
decode
in class AbstractPixelmonPacket
buf
- The buffer being decodedpublic void encode(net.minecraft.network.PacketBuffer buf)
PixelmonPacket
encode
in interface PixelmonPacket
encode
in class AbstractPixelmonPacket
buf
- The buffer being encoded