package info.tehnut.xtones.network;

import info.tehnut.xtones.client.XtonesClient;
import net.minecraft.client.Minecraft;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import org.checkerframework.checker.nullness.qual.Nullable;

final class ConfigSyncHandler implements IMessageHandler<ConfigSyncMessage, IMessage> {
    static final ConfigSyncHandler INSTANCE = new ConfigSyncHandler();

    private ConfigSyncHandler() {
    }

    private static void readConfig(final ConfigSyncMessage config) {
        XtonesClient.setServerXtoneCycling(config.hasXtoneCycling());
    }

    @Override
    @Nullable
    public IMessage onMessage(final ConfigSyncMessage config, final MessageContext context) {
        Minecraft.getMinecraft().addScheduledTask(() -> readConfig(config));
        return null;
    }
}

@@ -101,25 +101,41 @@
 raft
-.client.Minecraft
+forge.fml.client.FMLClientHandler
 ;%0Aim
@@ -343,16 +343,114 @@
 ontext;%0A
+import net.minecraftforge.fml.relauncher.Side;%0Aimport net.minecraftforge.fml.relauncher.SideOnly;%0A
 import o
@@ -877,16 +877,43 @@
 ullable%0A
+    @SideOnly(Side.CLIENT)%0A
     publ
@@ -1010,29 +1010,44 @@
     
-Minecraft.getMinecraf
+FMLClientHandler.instance().getClien
 t().

Use FMLClientHandler for consistency's sake, and add missing SideOnly annotation