Package net.fabricmc.fabric.api.network
Interface PacketRegistry
- All Known Subinterfaces:
ClientSidePacketRegistry
,ServerSidePacketRegistry
Deprecated.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
register(net.minecraft.util.Identifier id, PacketConsumer consumer)
Deprecated.Register a packet.net.minecraft.network.Packet<?>
toPacket(net.minecraft.util.Identifier id, net.minecraft.network.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(net.minecraft.util.Identifier id)
Deprecated.Unregister a packet.
-
Method Details
-
toPacket
net.minecraft.network.Packet<?> toPacket(net.minecraft.util.Identifier id, net.minecraft.network.PacketByteBuf buf)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
void unregister(net.minecraft.util.Identifier id)Deprecated.Unregister a packet.- Parameters:
id
- The packet Identifier.
-