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, markAsRead
handlePacket, shouldRunParallel
handle, reply
public 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 BattleMessagePacket
public boolean process(ClientBattleManager bm)
BattleTaskPacket
process
in class BattleMessagePacket
@Nullable public java.util.UUID getPokemonID()
BattleTaskPacket
Pokemon
this message affectsgetPokemonID
in class BattleMessagePacket
public void encode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacket
encode
in interface PixelmonPacket
encode
in class BattleMessagePacket
buffer
- The buffer being encodedpublic void decode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacket
decode
in interface PixelmonPacket
decode
in class BattleMessagePacket
buffer
- The buffer being decoded