Class Message
java.lang.Object
me.shedaniel.architectury.networking.simple.Message
- Direct Known Subclasses:
 BaseC2SMessage,BaseS2CMessage
The base class for messages managed by a 
SimpleNetworkManager.- See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionabstract MessageTypegetType()Returns theMessageTypeof this messageabstract voidhandle(NetworkManager.PacketContext context) Handles this message when it is received.final net.minecraft.network.protocol.Packet<?>toPacket()Converts this message into a corresponding vanillaPacket.abstract voidwrite(net.minecraft.network.FriendlyByteBuf buf) Writes this message to a byte buffer. 
- 
Method Details
- 
getType
Returns theMessageTypeof this message- Returns:
 - the 
MessageTypeof this message - See Also:
 
 - 
write
public abstract void write(net.minecraft.network.FriendlyByteBuf buf) Writes this message to a byte buffer.- Parameters:
 buf- the byte buffer
 - 
handle
Handles this message when it is received.- Parameters:
 context- the packet context for handling this message
 - 
toPacket
public final net.minecraft.network.protocol.Packet<?> toPacket()Converts this message into a corresponding vanillaPacket.- Returns:
 - the converted 
Packet 
 
 -