package com.thebrokenrail.herobrine;

import com.thebrokenrail.herobrine.entity.HerobrineEntity;
import com.thebrokenrail.herobrine.item.BlackDiamondItem;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.item.Item;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

public class HerobrineRewoven implements ModInitializer {
    public static final String NAMESPACE = "herobrine-rewoven";

    public static final Item BLACK_DIAMOND_ITEM = new BlackDiamondItem();
    public static final EntityType<HerobrineEntity> HEROBRINE_ENTITY_TYPE = FabricEntityTypeBuilder.create(SpawnGroup.MONSTER, HerobrineEntity::new).dimensions(EntityType.PLAYER.getDimensions()).build();

    @Override
    public void onInitialize() {
        Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "black_diamond"), BLACK_DIAMOND_ITEM);
        Registry.register(Registry.ENTITY_TYPE, new Identifier(NAMESPACE, "herobrine"), HEROBRINE_ENTITY_TYPE);
        FabricDefaultAttributeRegistry.register(HEROBRINE_ENTITY_TYPE, HerobrineEntity.createMobAttributes());
    }
}
