package top.r3944realms.lib39.core.network;

import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent;
import net.neoforged.neoforge.network.registration.PayloadRegistrar;
import org.jetbrains.annotations.NotNull;
import top.r3944realms.lib39.Lib39;
import top.r3944realms.lib39.core.network.toClient.SyncNBTCapDataEntityS2CPayload;

/**
 * The type Network handler.
 */
@SuppressWarnings("unused")
public class NetworkHandler {
    /**
     * Register packets.
     *
     * @param event the event
     */
    public static void register(@NotNull RegisterPayloadHandlersEvent event) {
        PayloadRegistrar registrar = event.registrar(Lib39.ModInfo.VERSION);
        registrar
                .playToClient(
                        SyncNBTCapDataEntityS2CPayload.TYPE,
                        SyncNBTCapDataEntityS2CPayload.STREAM_CODEC,
                        SyncNBTCapDataEntityS2CPayload::handle
                );
    }
}
