Interface IMessage

All Known Implementing Classes:
AbsorbBlockMessage, AddRemoveTagMessage, BlueprintSyncMessage, BuildToolPlacementMessage, ClientBlueprintRequestMessage, FillTopPlaceholderMessage, ItemMiddleMouseMessage, NotifyClientAboutStructurePacksMessage, NotifyServerAboutStructurePacksMessage, OperationHistoryMessage, RemoveBlockMessage, RemoveEntityMessage, ReplaceBlockMessage, SaveScanMessage, ScanOnServerMessage, ScanToolTeleportMessage, ServerUUIDMessage, SetTagInTool, ShowScanMessage, SplitPacketMessage, SyncPreviewCacheToClient, SyncPreviewCacheToServer, SyncSettingsToServer, TransferStructurePackToClient, UndoRedoMessage, UpdateClientRender, UpdateScanToolMessage

public interface IMessage
Interface for all network messages
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable net.minecraftforge.fml.LogicalSide
    Which sides is message able to be executed at.
    void
    onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer)
    Executes message action.
    void
    toBytes(net.minecraft.network.FriendlyByteBuf buf)
    Writes message data to buffer.
  • Method Details

    • toBytes

      void toBytes(net.minecraft.network.FriendlyByteBuf buf)
      Writes message data to buffer.
      Parameters:
      buf - network data byte buffer
    • getExecutionSide

      @Nullable @Nullable net.minecraftforge.fml.LogicalSide getExecutionSide()
      Which sides is message able to be executed at.
      Returns:
      CLIENT or SERVER or null (for both)
    • onExecute

      void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer)
      Executes message action.
      Parameters:
      ctxIn - network context of incoming message
      isLogicalServer - whether message arrived at logical server side