package com.zivilon.cinder_loe.network;

import com.zivilon.cinder_loe.carriage.gui.GuiCarriageFade;
import cpw.mods.fml.common.network.ByteBufUtils;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;

public class PacketCarriageFTB implements IMessage {
    public PacketCarriageFTB() {}

    @Override
    public void toBytes(ByteBuf buf) {
        // No data to write
    }

    @Override
    public void fromBytes(ByteBuf buf) {
        // No data to read
    }

    public static class Handler implements IMessageHandler<PacketCarriageFTB, IMessage> {
        @Override
        public IMessage onMessage(PacketCarriageFTB msg, MessageContext ctx) {
            Minecraft.getMinecraft().func_152344_a(() ->
                    Minecraft.getMinecraft().displayGuiScreen(new GuiCarriageFade())
            );
            return null;
        }
    }
}
