package xyz.illuc.neuralgiacore.registers;

import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.EntityRenderersEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import xyz.illuc.neuralgiacore.NeuralgiaCoreMod;
import xyz.illuc.neuralgiacore.entities.OfflinePlayerRenderer;

import static xyz.illuc.neuralgiacore.NeuralgiaCoreMod.GHOST;

@Mod.EventBusSubscriber(
        modid = NeuralgiaCoreMod.MOD_ID,
        bus = Mod.EventBusSubscriber.Bus.MOD,
        value = Dist.CLIENT
)
public class RegisterRenderers {

    @OnlyIn(Dist.CLIENT)
    @SubscribeEvent
    public static void registerRenderers(EntityRenderersEvent.RegisterRenderers event) {
        event.registerEntityRenderer(
                GHOST.get(),
                OfflinePlayerRenderer::new
        );
    }
}
