<commit_before>package net.blay09.mods.craftingtweaks.net;

import net.blay09.mods.craftingtweaks.CraftingTweaks;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.Side;

public class NetworkHandler {

    public static final SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel(CraftingTweaks.MOD_ID);

    public static void init() {
        instance.registerMessage(HandlerRotate.class, MessageRotate.class, 0, Side.SERVER);
        instance.registerMessage(HandlerClear.class, MessageClear.class, 1, Side.SERVER);
        instance.registerMessage(HandlerBalance.class, MessageBalance.class, 2, Side.SERVER);
        instance.registerMessage(HandlerTransferStack.class, MessageTransferStack.class, 5, Side.SERVER);
        instance.registerMessage(HandlerCompress.class, MessageCompress.class, 6, Side.SERVER);
    }

}<commit_msg>Restore backwards compatibility Fixes #85<commit_after>package net.blay09.mods.craftingtweaks.net;

import io.netty.buffer.ByteBuf;
import net.blay09.mods.craftingtweaks.CraftingTweaks;
import net.minecraftforge.fml.common.network.NetworkRegistry;
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 net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.relauncher.Side;

public class NetworkHandler {

    public static final SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel(CraftingTweaks.MOD_ID);

    public static void init() {
        instance.registerMessage(HandlerRotate.class, MessageRotate.class, 0, Side.SERVER);
        instance.registerMessage(HandlerClear.class, MessageClear.class, 1, Side.SERVER);
        instance.registerMessage(HandlerBalance.class, MessageBalance.class, 2, Side.SERVER);
        instance.registerMessage(HandlerHelloUnusedBackwardsCompatOnly.class, MessageHelloUnusedBackwardsCompatOnly.class, 3, Side.SERVER);
        instance.registerMessage(HandlerHelloUnusedBackwardsCompatOnly.class, MessageHelloUnusedBackwardsCompatOnly.class, 4, Side.CLIENT);
        instance.registerMessage(HandlerTransferStack.class, MessageTransferStack.class, 5, Side.SERVER);
        instance.registerMessage(HandlerCompress.class, MessageCompress.class, 6, Side.SERVER);
    }

    public static class MessageHelloUnusedBackwardsCompatOnly implements IMessage {
        @Override
        public void fromBytes(ByteBuf buf) {
            buf.readInt();
        }

        @Override
        public void toBytes(ByteBuf buf) {
            buf.writeInt(0);
        }
    }

    public static class HandlerHelloUnusedBackwardsCompatOnly implements IMessageHandler<MessageHelloUnusedBackwardsCompatOnly, IMessage> {
        @Override
        public IMessage onMessage(MessageHelloUnusedBackwardsCompatOnly message, MessageContext ctx) {
            return null;
        }
    }
}
{'fraction_non_alphanumeric': 0.08533846647417388, 'fraction_numerical': 0.007378889958293231, 'mean_word_length': 4.795539033457249, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1891153', 'n_tokens_mistral': 883, 'n_tokens_neox': 861, 'n_words': 140}