public class DeleteTrainerPokemonPacket extends AbstractPixelmonPacket
Constructor and Description |
---|
DeleteTrainerPokemonPacket()
Empty constructor for packet registration.
|
DeleteTrainerPokemonPacket(int trainerID,
int position)
Initializes a delete packet.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(net.minecraft.network.PacketBuffer buffer)
Decodes the information from the buffer to the packet instance
|
static void |
deletePokemon(int trainerID,
int position,
net.minecraftforge.fml.network.NetworkEvent.Context context,
boolean updateClient)
Deletes a Pokémon from an NPC Trainer's party.
|
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 DeleteTrainerPokemonPacket()
public DeleteTrainerPokemonPacket(int trainerID, int position)
trainerID
- The ID of the NPC Trainer to delete from.position
- The position of the Pokémon to delete.public void encode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacket
encode
in interface PixelmonPacket
encode
in class AbstractPixelmonPacket
buffer
- The buffer being encodedpublic void decode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacket
decode
in interface PixelmonPacket
decode
in class AbstractPixelmonPacket
buffer
- The buffer being decodedprotected void handlePacket(net.minecraftforge.fml.network.NetworkEvent.Context context)
handlePacket
in class AbstractPixelmonPacket
public static void deletePokemon(int trainerID, int position, net.minecraftforge.fml.network.NetworkEvent.Context context, boolean updateClient)
trainerID
- The ID of the NPC Trainer to delete from.position
- The position of the Pokémon to delete.context
- The context that the packet was sent from.updateClient
- Whether to update the client player about the deleted Pokémon.