public abstract class UpdateEditedPokemonPacket extends AbstractPixelmonPacket
Modifier and Type | Field and Description |
---|---|
Pokemon |
data
The updated Pokémon data.
|
int |
slot
The new party slot for this Pokémon.
|
Modifier | Constructor and Description |
---|---|
protected |
UpdateEditedPokemonPacket() |
protected |
UpdateEditedPokemonPacket(Pokemon data)
Initializes an update packet.
|
protected |
UpdateEditedPokemonPacket(Pokemon data,
int slot)
Initializes an update 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
|
static void |
updatePokemon(UpdateEditedPokemonPacket message,
net.minecraft.entity.player.ServerPlayerEntity player,
PartyStorage storage)
Updates a Pokémon server-side.
|
handle, handlePacket, reply
public Pokemon data
public int slot
protected UpdateEditedPokemonPacket()
protected UpdateEditedPokemonPacket(Pokemon data)
data
- The updated Pokémon data.protected UpdateEditedPokemonPacket(Pokemon data, int slot)
data
- The updated Pokémon data.slot
- The slot to move this Pokémon to.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 decodedpublic static void updatePokemon(UpdateEditedPokemonPacket message, net.minecraft.entity.player.ServerPlayerEntity player, PartyStorage storage)
message
- The update packet with updated Pokémon data.player
- The player who edited the Pokémon.storage
- The Pokémon storage to update.