Package net.fabricmc.fabric.api.network
Interface PacketRegistry
- All Known Subinterfaces:
ClientSidePacketRegistry
,ServerSidePacketRegistry
Deprecated.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(Identifier id, PacketConsumer consumer) Deprecated.Register a packet.Packet
<?> toPacket
(Identifier id, PacketByteBuf buf) Deprecated.Turn a (identifier, byte buffer) pair into a "custom payload" packet suitable for sending in the PacketRegistry's sending direction.void
unregister
(Identifier id) Deprecated.Unregister a packet.
-
Method Details
-
toPacket
Deprecated.Turn a (identifier, byte buffer) pair into a "custom payload" packet suitable for sending in the PacketRegistry's sending direction.- Parameters:
id
- The identifier.buf
- The byte buffer.- Returns:
-
register
Deprecated.Register a packet.- Parameters:
id
- The packet Identifier.consumer
- The method used for handling the packet.
-
unregister
Deprecated.Unregister a packet.- Parameters:
id
- The packet Identifier.
-