Class PacketRegistry

java.lang.Object
net.timtaran.interactivemc.network.PacketRegistry

public class PacketRegistry extends Object
The central registry that lists all network packets used by InteractiveMC.

This class is responsible for initializing the networking subsystem and assigning unique byte IDs to each packet class per network side.

  • Constructor Details

    • PacketRegistry

      public PacketRegistry()
  • Method Details

    • registerPackets

      public static void registerPackets()
      Initializes the Networking system and registers all packet types.

      This method iterates through all available packet classes and registers them with a side-specific unique ID and their decoder reference.

      Note: This method must be called during the common initialization phase of the mod (e.g., inside onInitialize or the common setup event).