Package codechicken.lib.config
Class ConfigSyncManager
java.lang.Object
codechicken.lib.config.ConfigSyncManager
Created by covers1624 on 19/5/22.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit(net.neoforged.bus.api.IEventBus modBus) static voidreadSyncPacket(net.minecraft.network.FriendlyByteBuf packet, net.neoforged.neoforge.network.handling.IPayloadContext ctx) static voidregisterSync(net.minecraft.resources.Identifier key, ConfigTag tag) Registers the specifiedConfigTagfor syncing.
-
Constructor Details
-
ConfigSyncManager
public ConfigSyncManager()
-
-
Method Details
-
registerSync
Registers the specifiedConfigTagfor syncing.This must be registered on both the client and server.
- Parameters:
key- The unique id to associate this tag.tag- The Tag to sync.
-
init
@Internal public static void init(net.neoforged.bus.api.IEventBus modBus) -
readSyncPacket
@Internal public static void readSyncPacket(net.minecraft.network.FriendlyByteBuf packet, net.neoforged.neoforge.network.handling.IPayloadContext ctx)
-