public class SwitchPokemonPacket extends AbstractPixelmonPacket
Constructor and Description |
---|
SwitchPokemonPacket()
Empty constructor for packet registration.
|
SwitchPokemonPacket(java.util.UUID newPokemonUUID,
int battleControllerIndex,
java.util.UUID switchingPokemonUUID,
boolean happensInstantly)
Initializes a switching packet.
|
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
|
protected void |
handlePacket(net.minecraftforge.fml.network.NetworkEvent.Context context) |
handle, reply
public SwitchPokemonPacket()
public SwitchPokemonPacket(java.util.UUID newPokemonUUID, int battleControllerIndex, java.util.UUID switchingPokemonUUID, boolean happensInstantly)
newPokemonUUID
- The UUID of the Pokémon switching in.battleControllerIndex
- The index of the battle that the switch is occurring in.switchingPokemonUUID
- The UUID of the switching Pokémon.happensInstantly
- Whether the switch will happen as soon as it is received.public void decode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacket
decode
in interface PixelmonPacket
decode
in class AbstractPixelmonPacket
buffer
- The buffer being decodedpublic void encode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacket
encode
in interface PixelmonPacket
encode
in class AbstractPixelmonPacket
buffer
- The buffer being encodedprotected void handlePacket(net.minecraftforge.fml.network.NetworkEvent.Context context)
handlePacket
in class AbstractPixelmonPacket