ClientToClientPacketDefinition
class ClientToClientPacketDefinition<T : Any>(id: ResourceLocation, binaryFormat: BinaryFormat, deserializer: KSerializer<T>) : AbstractPacketDefinition<T, ClientPacketContext> (source)
See c2cPacket function, which constructs this packet definition class.
Types
Functions
Link copied to clipboard
Deserializes this serialized packet to an instance of its original class.
Link copied to clipboard
Specifies the forward logic (on the server, as it is the instance which forwards this packet). The returned player will receive the packet. Return null if you do not wish to forward this packet.
Link copied to clipboard
Executes the given receiver as a callback when this packet is received on the client-side.
Link copied to clipboard
Sends the given value as a packet to the server, which will then forward it to players selected by the forwarder. You can specify the forwarder using forwardOnServer.