Class PacketRegistry
java.lang.Object
net.timtaran.interactivemc.network.PacketRegistry
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidInitializes theNetworkingsystem and registers all packet types.
-
Constructor Details
-
PacketRegistry
public PacketRegistry()
-
-
Method Details
-
registerPackets
public static void registerPackets()Initializes theNetworkingsystem 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
onInitializeor the common setup event).
-