Class ConfigSyncPacket

java.lang.Object
com.hammy275.immersivemc.common.network.packet.ConfigSyncPacket

public class ConfigSyncPacket extends Object
Syncs config data and information about the ImmersiveMC state between the server and client. Starts with an S2C packet, then a C2S packet afterward during the initial handshake.
Server and client can update their respective config states as well at anytime by sending this packet without the handlerIDs.
  • Field Details

    • config

      public final ActiveConfig config
    • handlerIDs

      @Nullable public final @Nullable List<net.minecraft.resources.ResourceLocation> handlerIDs
  • Constructor Details

    • ConfigSyncPacket

      public ConfigSyncPacket(ActiveConfig config)
    • ConfigSyncPacket

      public ConfigSyncPacket(ActiveConfig config, @Nullable @Nullable List<net.minecraft.resources.ResourceLocation> handlerIDs)
  • Method Details

    • encode

      public static void encode(ConfigSyncPacket packet, net.minecraft.network.FriendlyByteBuf buffer)
    • decode

      public static ConfigSyncPacket decode(net.minecraft.network.FriendlyByteBuf buffer)
    • handle

      public static void handle(ConfigSyncPacket message, net.minecraft.server.level.ServerPlayer player)