public class KeyPacket extends AbstractPixelmonPacket
Constructor and Description |
---|
KeyPacket()
Empty constructor for packet registration.
|
KeyPacket(int selectedPixelmon)
Initializes a packet to send out a Pokémon.
|
KeyPacket(int selectedPixelmon,
int moveIndex,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction side)
Initializes a packet to use an external move on a block.
|
KeyPacket(int selectedPixelmon,
int entityId,
EnumKeyPacketMode mode)
Initializes a hotkey action packet.
|
KeyPacket(int selectedPixelmon,
int moveIndex,
int entityId)
Initializes a packet to use an external move on an entity.
|
KeyPacket(int selectedPixelmon,
java.lang.String moveName,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction side)
Initializes a packet to use an external move on a block.
|
KeyPacket(int selectedPixelmon,
java.lang.String moveName,
int entityId)
Initializes a packet to use an external move on an entity.
|
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 KeyPacket()
public KeyPacket(int selectedPixelmon)
selectedPixelmon
- The slot of the Pokémon to send out.public KeyPacket(int selectedPixelmon, int entityId, EnumKeyPacketMode mode)
selectedPixelmon
- The slot of the selected Pokémon for the action.entityId
- The ID of the entity targeted by the action.mode
- The type of action to take.public KeyPacket(int selectedPixelmon, int moveIndex, int entityId)
selectedPixelmon
- The slot of the selected Pokémon for the move.moveIndex
- The index of the external move being used.entityId
- The ID of the entity targeted by the move.public KeyPacket(int selectedPixelmon, java.lang.String moveName, int entityId)
selectedPixelmon
- The slot of the selected Pokémon for the move.moveName
- The index of the external move being used.entityId
- The ID of the entity targeted by the move.public KeyPacket(int selectedPixelmon, int moveIndex, net.minecraft.util.math.BlockPos pos, net.minecraft.util.Direction side)
selectedPixelmon
- The slot of the selected Pokémon for the move.moveIndex
- The index of the external move being used.pos
- The position of the targeted block.side
- The targeted side of the block.public KeyPacket(int selectedPixelmon, java.lang.String moveName, net.minecraft.util.math.BlockPos pos, net.minecraft.util.Direction side)
selectedPixelmon
- The slot of the selected Pokémon for the move.moveName
- The index of the external move being used.pos
- The position of the targeted block.side
- The targeted side of the block.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