package net.Chipperfluff.chipi;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;

import net.Chipperfluff.chipi.advancement.ModCriteria;
import net.Chipperfluff.chipi.block.ModBlocks;
import net.Chipperfluff.chipi.command.CommandHandler;
import net.Chipperfluff.chipi.effect.ChipiBlessingEvents;
import net.Chipperfluff.chipi.effect.ChipiHungerHandler;
import net.Chipperfluff.chipi.effect.ModEffects;
import net.Chipperfluff.chipi.entity.MepEntity;
import net.Chipperfluff.chipi.entity.ModEntities;
import net.Chipperfluff.chipi.entity.PlayerJrEntity;
import net.Chipperfluff.chipi.entity.SpawnLogic;
import net.Chipperfluff.chipi.item.ModItemGroups;
import net.Chipperfluff.chipi.item.ModItems;
import net.Chipperfluff.chipi.item.music.ModMusicDiscs;
import net.Chipperfluff.chipi.server.ChipiServerEvents;
import net.Chipperfluff.chipi.sound.ModSounds;
import net.Chipperfluff.chipi.util.TickScheduler;

public class ChipiMod implements ModInitializer {

    public static final String MOD_ID = "chipi";

    @Override
    public void onInitialize() {

        ModBlocks.register();
        ModItems.register();
        ModItemGroups.register();
        ModEffects.register();
        ModCriteria.register();

        ChipiBlessingEvents.register();
        ChipiHungerHandler.register();
        SpawnLogic.register();

        ModSounds.register();
        ModMusicDiscs.registerAll();

        TickScheduler.init();
        CommandHandler.register();

        FabricDefaultAttributeRegistry.register(ModEntities.MEP, MepEntity.createMepAttributes());

        FabricDefaultAttributeRegistry.register(ModEntities.PLAYER_JR, PlayerJrEntity.createAttributes());

        ChipiServerEvents.register();
    }
}
