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
Modifier and TypeFieldDescriptionfinal ActiveConfig
final @Nullable List<net.minecraft.resources.ResourceLocation>
-
Constructor Summary
ConstructorDescriptionConfigSyncPacket
(ActiveConfig config) ConfigSyncPacket
(ActiveConfig config, @Nullable List<net.minecraft.resources.ResourceLocation> handlerIDs) -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigSyncPacket
decode
(net.minecraft.network.FriendlyByteBuf buffer) static void
encode
(ConfigSyncPacket packet, net.minecraft.network.FriendlyByteBuf buffer) static void
handle
(ConfigSyncPacket message, 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
-
decode
-
handle
-