public class EnforcedSwitchTask extends BattleMessagePacket
| Constructor and Description |
|---|
EnforcedSwitchTask()
Empty constructor for packet registration.
|
EnforcedSwitchTask(int switchPosition)
Initializes a packet to switch out a Pokémon at a specified position.
|
EnforcedSwitchTask(int switchPosition,
boolean preventFleeOnSwitch) |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(net.minecraft.network.PacketBuffer buffer)
Decodes the information from the buffer to the packet instance
|
void |
encode(net.minecraft.network.PacketBuffer buffer)
Encodes the buffer with the packet information
|
net.minecraft.util.text.ITextComponent |
getMessage() |
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.
|
isRead, markAsReadhandlePacket, shouldRunParallelhandle, replypublic EnforcedSwitchTask()
public EnforcedSwitchTask(int switchPosition)
switchPosition - The position of the Pokémon switching out.public EnforcedSwitchTask(int switchPosition,
boolean preventFleeOnSwitch)
public net.minecraft.util.text.ITextComponent getMessage()
getMessage in class BattleMessagePacketpublic boolean process(ClientBattleManager bm)
BattleTaskPacketprocess in class BattleMessagePacket@Nullable public java.util.UUID getPokemonID()
BattleTaskPacketPokemon this message affectsgetPokemonID in class BattleMessagePacketpublic void encode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacketencode in interface PixelmonPacketencode in class BattleMessagePacketbuffer - The buffer being encodedpublic void decode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacketdecode in interface PixelmonPacketdecode in class BattleMessagePacketbuffer - The buffer being decoded