package net.Chipperfluff.chipi.client;

import net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback;
import net.minecraft.text.Text;

import net.Chipperfluff.chipi.block.ModBlocks;
import net.Chipperfluff.chipi.item.ModItems;

public final class ModTooltips {

    private ModTooltips() {}

    public static void register() {

        ItemTooltipCallback.EVENT.register((stack, context, lines) -> {

            // ===== BLOCK ITEMS =====
            if (stack.isOf(ModBlocks.VOID_BLOCK.asItem()))
                lines.add(Text.translatable("tooltip.chipi.void_block"));

            if (stack.isOf(ModBlocks.CHIPPER_FRAME.asItem()))
                lines.add(Text.translatable("tooltip.chipi.chipper_frame"));

            if (stack.isOf(ModBlocks.CHIPPER_PORTAL.asItem()))
                lines.add(Text.translatable("tooltip.chipi.chipper_portal"));

            if (stack.isOf(ModBlocks.CHIPPER_ORE.asItem()))
                lines.add(Text.translatable("tooltip.chipi.chipper_ore"));

            if (stack.isOf(ModBlocks.CHIPPER_ALLOY_BLOCK.asItem()))
                lines.add(Text.translatable("tooltip.chipi.chipper_alloy_block"));

            if (stack.isOf(ModBlocks.JINGLE_BLOCK.asItem()))
                lines.add(Text.translatable("tooltip.chipi.jingle_block"));

            // ===== ITEMS =====
            if (stack.isOf(ModItems.RAW_CHIPPER_ORE))
                lines.add(Text.translatable("tooltip.chipi.raw_chipper_ore"));

            if (stack.isOf(ModItems.CHIPPER_INGOT))
                lines.add(Text.translatable("tooltip.chipi.chipper_ingot"));

            if (stack.isOf(ModItems.CHIPPER_ALLOY))
                lines.add(Text.translatable("tooltip.chipi.chipper_alloy"));

            if (stack.isOf(ModItems.MEP_SPAWN_EGG))
                lines.add(Text.translatable("tooltip.chipi.mep_spawn_egg"));

            // ===== FOOD =====
            if (stack.isOf(ModItems.NUT))
                lines.add(Text.translatable("tooltip.chipi.nut"));

            if (stack.isOf(ModItems.MEP_MILK))
                lines.add(Text.translatable("tooltip.chipi.mep_milk"));

            if (stack.isOf(ModItems.PLAYER_MILK))
                lines.add(Text.translatable("tooltip.chipi.player_milk"));

            // ===== ARMOR =====
            if (stack.isOf(ModItems.CHIPPER_HELMET))
                lines.add(Text.translatable("tooltip.chipi.chipper_helmet"));

            if (stack.isOf(ModItems.CHIPPER_CHESTPLATE))
                lines.add(Text.translatable("tooltip.chipi.chipper_chestplate"));

            if (stack.isOf(ModItems.CHIPPER_LEGGINGS))
                lines.add(Text.translatable("tooltip.chipi.chipper_leggings"));

            if (stack.isOf(ModItems.CHIPPER_BOOTS))
                lines.add(Text.translatable("tooltip.chipi.chipper_boots"));

            // ===== TOOLS =====
            if (stack.isOf(ModItems.CHIPPER_SWORD))
                lines.add(Text.translatable("tooltip.chipi.chipper_sword"));

            if (stack.isOf(ModItems.CHIPPER_PICKAXE))
                lines.add(Text.translatable("tooltip.chipi.chipper_pickaxe"));

            if (stack.isOf(ModItems.CHIPPER_AXE))
                lines.add(Text.translatable("tooltip.chipi.chipper_axe"));

            if (stack.isOf(ModItems.CHIPPER_SHOVEL))
                lines.add(Text.translatable("tooltip.chipi.chipper_shovel"));

            if (stack.isOf(ModItems.CHIPPER_HOE))
                lines.add(Text.translatable("tooltip.chipi.chipper_hoe"));
        });
    }
}
