diff --git a/common/src/main/kotlin/quaedam/config/SimpleQuaedamConfigPush.kt b/common/src/main/kotlin/quaedam/config/SimpleQuaedamConfigPush.kt index aa9b26e..8982e7c 100644 --- a/common/src/main/kotlin/quaedam/config/SimpleQuaedamConfigPush.kt +++ b/common/src/main/kotlin/quaedam/config/SimpleQuaedamConfigPush.kt @@ -1,7 +1,9 @@ package quaedam.config import dev.architectury.networking.NetworkManager +import dev.architectury.platform.Platform import io.netty.buffer.Unpooled +import net.fabricmc.api.EnvType import net.minecraft.nbt.CompoundTag import net.minecraft.network.FriendlyByteBuf import net.minecraft.server.level.ServerPlayer @@ -12,7 +14,9 @@ object SimpleQuaedamConfigPush { val id = Quaedam.resource("simple_config_push") init { - NetworkManager.registerReceiver(NetworkManager.Side.S2C, id, ::handle) + if (Platform.getEnv() == EnvType.CLIENT) { + NetworkManager.registerReceiver(NetworkManager.Side.S2C, id, ::handle) + } } private fun handle(buf: FriendlyByteBuf, ctx: NetworkManager.PacketContext) {