Package org.moddingx.libx.network
Interface PacketSerializer<T>
- All Known Subinterfaces:
LoginPacketSerializer<T>
public interface PacketSerializer<T>
An interface implementing the logic on how to serialise and deserialize a message.
-
Method Summary
Modifier and TypeMethodDescriptiondecode
(net.minecraft.network.FriendlyByteBuf buffer) Decodes a message from aFriendlyByteBuf
.void
Encodes the message to aFriendlyByteBuf
.The class of the message serialised by this serializer.
-
Method Details
-
messageClass
The class of the message serialised by this serializer. -
encode
Encodes the message to aFriendlyByteBuf
. -
decode
Decodes a message from aFriendlyByteBuf
.
-