Class ConfigSyncPacket
java.lang.Object
com.hammy275.immersivemc.common.network.packet.ConfigSyncPacket
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.
Server and client can update their respective config states as well at anytime by sending this packet without the handlerIDs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ActiveConfigfinal @Nullable List<net.minecraft.resources.ResourceLocation> -
Constructor Summary
ConstructorsConstructorDescriptionConfigSyncPacket(ActiveConfig config) ConfigSyncPacket(ActiveConfig config, @Nullable List<net.minecraft.resources.ResourceLocation> handlerIDs) -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigSyncPacketdecode(net.minecraft.network.RegistryFriendlyByteBuf buffer) static voidencode(ConfigSyncPacket packet, net.minecraft.network.RegistryFriendlyByteBuf buffer) static voidhandle(ConfigSyncPacket message, net.minecraft.server.level.ServerPlayer player) static voidsyncConfigToPlayer(net.minecraft.server.level.ServerPlayer player)
-
Field Details
-
config
-
handlerIDs
-
-
Constructor Details
-
ConfigSyncPacket
-
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.RegistryFriendlyByteBuf buffer) -
decode
-
handle
-
syncConfigToPlayer
public static void syncConfigToPlayer(net.minecraft.server.level.ServerPlayer player)
-