package com.r3944realms.modernlifepatch;

import com.r3944realms.modernlifepatch.client.blockentity.MirrorBlockEntityRenderer;
import com.r3944realms.modernlifepatch.client.event.CreativeScreenEvents;
import com.r3944realms.modernlifepatch.content.blocks.entities.ModBlockEntityType;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.EntityRenderersEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;

public abstract class ClientEventHandler {
//    @net.minecraftforge.fml.common.Mod.EventBusSubscriber(value = Dist.CLIENT, bus = net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus.FORGE, modid = ModernLifePatch.MOD_ID)
    public static class Game extends ClientEventHandler {

    }
    @net.minecraftforge.fml.common.Mod.EventBusSubscriber(value = Dist.CLIENT, bus = net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus.MOD, modid = ModernLifePatch.MOD_ID)
    public static class Mod extends ClientEventHandler {
        @SubscribeEvent
        @OnlyIn(Dist.CLIENT)
        public static void onClientSetup(FMLClientSetupEvent event) {
            event.enqueueWork(() -> {

            });
            if(ModernLifePatch.isModernLifeLoaded) MinecraftForge.EVENT_BUS.register(new CreativeScreenEvents());
        }
        @SubscribeEvent
        public static void onRegisterRenderer (EntityRenderersEvent.RegisterRenderers event) {
            event.registerBlockEntityRenderer(ModBlockEntityType.MIRROR.get(), MirrorBlockEntityRenderer::new);
        }
    }
}
