package com.r3944realms.modernlifepatch.datagen.lang;

import com.r3944realms.modernlifepatch.ModernLifePatch;
import com.r3944realms.modernlifepatch.content.blocks.ModBlocks;
import com.r3944realms.modernlifepatch.content.item.ModItems;
import com.r3944realms.modernlifepatch.content.tag.ModTags;
import com.r3944realms.modernlifepatch.utils.Enum.LanguageEnum;
import com.r3944realms.modernlifepatch.utils.String.StringValidator;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

import java.util.function.Supplier;

public enum ModLangKeyValue {

    MIRROR_ITEM(getItemKey(ModItems.MIRROR_ITEM), "Mirror", "镜子"),
    TALL_MIRROR_ITEM(getItemKey(ModItems.TALL_MIRROR_ITEM), "Tall Mirror", "高镜子"),
    LARGE_MIRROR_ITEM(getItemKey(ModItems.LARGE_MIRROR_ITEM), "Large Mirror","大型镜子"),
    MASSIVE_MIRROR_ITEM(getItemKey(ModItems.MASSIVE_MIRROR_ITEM), "Massive Mirror", "超大型镜子"),
    MIRROR(getBlockKey(ModBlocks.MIRROR), copyEnglish(MIRROR_ITEM), copySimpleChinese(MIRROR_ITEM)),
    TALL_MIRROR(getBlockKey(ModBlocks.TALL_MIRROR), copyEnglish(TALL_MIRROR_ITEM), copySimpleChinese(TALL_MIRROR_ITEM)),
    LARGE_MIRROR(getBlockKey(ModBlocks.LARGE_MIRROR), copyEnglish(LARGE_MIRROR_ITEM), copySimpleChinese(LARGE_MIRROR_ITEM)),
    MASSIVE_MIRROR(getBlockKey(ModBlocks.MASSIVE_MIRROR), copyEnglish(MASSIVE_MIRROR_ITEM), copySimpleChinese(MASSIVE_MIRROR_ITEM)),
    CREATIVE_TAB_NAME(getCreativeTabNameKey(ModernLifePatch.MOD_ID), "Modern Life Patch", "摩登生活补丁"),
    CT_F_TAG_GENERAL(getTagKey(ModTags.Items.GENERAL), "General", "普通"),
    CT_F_TAG_KITCHEN(getTagKey(ModTags.Items.KITCHEN), "Kitchen", "厨房"),
    CT_F_TAG_BEDCHAMBER(getTagKey(ModTags.Items.BEDCHAMBER), "Bedchamber", "寝室"),
    CT_F_TAG_BATHROOM(getTagKey(ModTags.Items.BATHROOM), "BathRoom", "卫生间"),
    CT_F_TAB_LOUNGE(getTagKey(ModTags.Items.LOUNGE), "Lounge", "客厅"),
    CT_F_TAG_OUTSIDE(getTagKey(ModTags.Items.OUTSIDE), "Outside", "户外"),
    CT_F_TAG_TOOL(getTagKey(ModTags.Items.TOOL), "Tool", "工具"),
    CT_F_TAG_SEAT(getTagKey(ModTags.Items.SEAT), "Seat", "坐具"),
    CT_F_TAG_TABLE(getTagKey(ModTags.Items.TABLE), "Table", "桌子"),
    CT_F_TAG_SHELF(getTagKey(ModTags.Items.SHELF), "Shelf", "架子"),
    CT_F_TAB_DOOR(getTagKey(ModTags.Items.DOOR), "Door", "门"),
    UNKNOWN("modernlifepatch.unknown", "Unknown", "未知"),
    QUEEN(getCustomTextKey("chess", ModernLifePatch.MOD_ID, "queen"), "Queen", "皇后"),
    KING(getCustomTextKey("chess", ModernLifePatch.MOD_ID, "king"), "King", "国王"),
    KNIGHT(getCustomTextKey("chess", ModernLifePatch.MOD_ID, "knight"), "Knight", "骑士"),
    PAWN(getCustomTextKey("chess", ModernLifePatch.MOD_ID, "pawn"), "Pawn", "士兵"),
    BISHOP(getCustomTextKey("chess", ModernLifePatch.MOD_ID, "bishop"), "Bishop", "象"),
    ROOK(getCustomTextKey("chess", ModernLifePatch.MOD_ID, "rook"), "Rook", "车"),
    ALARM_SOUND_TYPE0(getCustomTextKey("alarm_sound_type", ModernLifePatch.MOD_ID, "silent_alarm"), "Silent Alarm", "静音警报"),
    ALARM_SOUND_TYPE1(getCustomTextKey("alarm_sound_type", ModernLifePatch.MOD_ID, "alarm1"), "Silent Alarm", "静音警报"),
    ALARM_SOUND_TYPE2(getCustomTextKey("alarm_sound_type", ModernLifePatch.MOD_ID, "alarm2"), "Alarm 1", "警报1"),
    ALARM_SOUND_TYPE3(getCustomTextKey("alarm_sound_type", ModernLifePatch.MOD_ID, "alarm3"), "Alarm 2", "警报2"),
    ALARM_SOUND_TYPE4(getCustomTextKey("alarm_sound_type", ModernLifePatch.MOD_ID, "alarm4"), "Alarm 3", "警报3"),
    ALARM_SOUND_TYPE5(getCustomTextKey("alarm_sound_type", ModernLifePatch.MOD_ID, "alarm5"), "Alarm 4", "警报4"),
    MOD_RESOURCE_NAME(getResourceTextKey(ModernLifePatch.MOD_ID, "modern_life_patch"), "§b§lModern Life §fExclusive Materials", "§b§l摩登生活 §f专属材质"),
    MOD_RESOURCE_DESC(getCustomTextKey("resource_pack", ModernLifePatch.MOD_ID ,"description"), "All of textures and models are created by BF_Meow_，Do not use for other purposes without permission.", "所有材质和模型均由 白帆小喵BF_Meow_ 绘制。未经允许，请勿用作他用。"),

    CREATIVE_TAB_SCROLL_UP_BUTTON(getCustomTextKey("gui.button", ModernLifePatch.MOD_ID, "scroll_filter_up"), "Scroll up", "向上"),
    CREATIVE_TAB_SCROLL_DOWN_BUTTON(getCustomTextKey("gui.button", ModernLifePatch.MOD_ID, "scroll_filter_down"), "Scroll down", "向下"),
    CREATIVE_TAB_ENABLE_FILTERS_BUTTON(getCustomTextKey("gui.button", ModernLifePatch.MOD_ID, "enable_filters"), "Enable Filters", "启用过滤器"),
    CREATIVE_TAB_DISABLE_FILTERS_BUTTON(getCustomTextKey("gui.button", ModernLifePatch.MOD_ID, "disable_filters"), "Disable Filters", "禁用过滤器"),

    POWER_RECEIVER_HOVER_FIRST(getHoverTextKey("power_receiver", "1"), "Receives power on the selected channel from all transmitters", "从所有能量发射器中去接收所选工作频道的能量"),
    POWER_RECEIVER_AND_TRANSMITTER_HOVER_SECOND(getHoverTextKey("power_receiver", "2"), "Right click block to change current channel", "右键方块打开界面，来切换工作频道"),


    TURNTABLE_HOVER(getHoverTextKey("turn_table"), "Rotates clockwise when powered by redstone", "当有红石充能时顺时针旋转"),
    POWER_TRANSMITTER_FIRST(getHoverTextKey("power_transmitter", "1"), "Transmits power on the selected channel to all receivers", "将红石信号传输给对应频道的所有能量接收器"),
    TRASH_CAN_HOVER(getHoverTextKey("trash_can"), "Items inserted into the trash slot will be deleted when the trash can is full", "当垃圾桶已满时，进入垃圾桶的物品将被删除"),

    PHOTOCOPIER_HOVER_FIRST(getHoverTextKey("photocopier", "1"), "Interact with a canvas or photograph to make copies", "可以用于照片或画作的复制"),
    PHOTOCOPIER_HOVER_SECOND(getHoverTextKey("photocopier", "2"), " * Requires paper", " * 需要纸"),

    PAVED_ROAD_HOVER(getHoverTextKey("paved_road"), "Slightly increases movement speed of vehicles", "载具在该路上行驶，移速会有所提升"),
    EXTRACTOR_HOVER(getHoverTextKey("extractor"), "Extracts items from attached chests or from the space in front of it", "从其吸取端处的箱子或空间中取出物品"),
    CHESS_BOARD_HOVER(getHoverTextKey("chess_board"), "PLace it down and begin a new game!", "放置后使用即可开始一场新游戏!"),
    WALL_SHELF_HOVER_FIRST(getHoverTextKey("wall_shelf", "1"), "Right click tp place an item on the shelf", "右键以放置物品在墙架上"),
    WALL_SHELF_HOVER_SECOND(getHoverTextKey("wall_shelf", "2"), "Shift-right-click with an empty hand to remove an item", "空手按住Shift键+右键即可取下物品"),
    STEAM_RADIATOR_HOVER(getHoverTextKey("steam_radiator"), "Right click placed radiator to activate", "右键已放置的散热器，即可激活"),
    BOOKSHELF_HOVER_FIRST(getHoverTextKey("bookshelf", "1"), "Right click tp place a book on the shelf", "右键以放置书在书架上"),
    BOOKSHELF_HOVER_SECOND(getHoverTextKey("bookshelf", "2"), "Shift-right-click with an empty hand to remove a book", "空手按住Shift键+右键即可取下书"),

    //C_TOOL
    GUITAR_AMPLIFIER_HOVER(getHoverTextKey("guitar_amplifier"), "Play a guitar nearby to add a distortion effect" ,"在附近弹奏吉他以增加失真效果"),
    SEED_SPREADER_HOVER(getHoverTextKey("seed_spreader"), "Automatically disperses seeds that are put inside of it", "自动播种机器里的种子"),
    BATTERY_HOVER(getHoverTextKey("battery"), "Right click to recharge flashlight (battery will be consumed)", "右键消耗为手电筒更换电池"),
    CHAINSAW_HOVER_FIRST(getHoverTextKey("chainsaw", "1"), "Right click to use", "右键使用"),
    CHAINSAW_HOVER_SECOND(getHoverTextKey("chainsaw", "2"), "* Highly effective on trees an leaves", "* 一种极其高效砍树方案"),
    HAND_GUN_HOVER_FIRST(getHoverTextKey("handgun", "1"), "Left click to fire", "左键开火"),
    HAND_GUN_HOVER_SECOND(getHoverTextKey("handgun", "2"), "Right click to aim down sights", "右键聚焦对准"),
    HAND_GUN_HOVER_THIRD(getHoverTextKey("handgun", "3"), "* Requires at least one Magazine in order to shoot", "* 需要至少一个弹匣来发射"),
    GUITAR_HOVER_FIRST(getHoverTextKey("guitar", "1"), "Right click to use", "右键使用"),
    GUITAR_HOVER_SECOND(getHoverTextKey("guitar", "2"), "* Standard Tuning (EADGBE)", "* 标准调谐（EADGBE）"),
    FLASH_LIGHT_HOVER_FIRST(getHoverTextKey("flashlight", "1"), "Right click to use", "右键使用"),
    FLASH_LIGHT_HOVER_SECOND(getHoverTextKey("flashlight", "2"), "* Using it will deplete the battery but it will not break", "* 使用它会耗尽电池，但不会损坏"),
    FLASH_LIGHT_HOVER_THIRD(getHoverTextKey("flashlight", "3"), "* %s minutes remaining before drained", "* 电量耗尽前剩余%s分钟"),
    FLASH_LIGHT_HOVER_FOURTH(getHoverTextKey("flashlight", "4"), "* Lasts %s minutes at full charge",  "* 一节满电电池可以为其提供至少%s分钟的照亮时间"),
    FLASH_LIGHT_HOVER_FIFTH(getHoverTextKey("flashlight", "5"), "* Repair durability by using a battery", "* 通过电池来修复耐久"),
    CAMERA_HOVER_FIRST(getHoverTextKey("camera", "1"), "%d/%d photos stored in memory card", "内存卡里照片数: %d/%d"),
    CAMERA_HOVER_SECOND(getHoverTextKey("camera", "2"), "* Does not break when durability hits 0", "* 当耐久掉到0时，也不会损坏"),
    CAMERA_HOVER_THIRD(getHoverTextKey("camera", "3"), "* Take to a printer to print your photos", "* 提供打印机把所拍照冲洗出来"),
    //TRAN
    BICYCLE_HOVER(getHoverTextKey("bicycle"), "Right click to deploy", "右键放置"),
    MOTORBOAT_HOVER_FIRST(getHoverTextKey("motorboat", "1"), "Right click to deploy", "右键放置"),
    MOTORBOAT_HOVER_SECOND(getHoverTextKey("motorboat", "2"), "Remaining fuel: %f%%","燃料剩余量: %f%%"),
    MOTORBOAT_HOVER_THIRD(getHoverTextKey("motorboat", "3"), "Refuel by using a gas can on the deployed boat", "对船使用汽油罐来加油"),
    ROAD_MARKER_HOVER_FIRST(getHoverTextKey("road_marker", "1"), "* Right click paved road to apply currently selected road marker", "* 右键单击已铺设的道路以应用当前选定的道路标记"),
    ROAD_MARKER_HOVER_SECOND(getHoverTextKey("road_marker", "2"), "* Right click elsewhere to toggle between available road markers", "* 右键单击其他位置以在可用道路标记之间切换"),
    WARNING_ALARM_HOVER_FIRST(getHoverTextKey("camera", "1"), "Sounds an alarm when powered by redstone;", "红石充能时发出警报"),
    WARNING_ALARM_HOVER_SECOND(getHoverTextKey("camera", "2"), "right-click with empty mainhand to change alarm sound", "主手空手右击以改变警报声音"),
    //P
    NEED_RED_STONE_POWER_TURN_ON_HOVER(getHoverTextKey("need_rs_power_turn_on"), "Requires redstone power to turn on", "需要红石充能才能开启"),
    NEED_RED_STONE_POWER_TURN_OFF_HOVER(getHoverTextKey("need_rs_power_turn_off"), "Requires redstone power to turn off", "需要红石充能才能关闭"),
    STORE_18_HOVER(getHoverTextKey("store_18"), "Stores up to 18 items", "可存储18组物品"),
    //~P
    METAL_GRATE_HOVER(getHoverTextKey("metal_grate"), "Allows water and items to flow through freely", "允许水与物品自由地穿过"),
    EASEL_HOVER(getHoverTextKey("easel"), "Place a canvas on it to begin painting", "放置(帆布)画布在其上，即可开始绘画"),
    //CONTAINER & MENU
    KITCHEN_CABINET_MENU_LABEL(getMenuLabelKey("kitchen_cabinet"), "Kitchen Cabinet", "厨房柜子"),
    KITCHEN_DRAWER_CABINET_MENU_LABEL(getMenuLabelKey("kitchen_drawer_cabinet"), "Kitchen Drawer Cabinet", "厨房抽屉柜"),
    TRASH_CAN_MENU_LABEL(getMenuLabelKey("trash_can"), "Trash Can", "垃圾桶"),
    PHOTOCOPIER_MENU_LABEL(getMenuLabelKey("photo_copier"), "Photocopier", "复印机"),
    PRINTER_MENU_LABEL(getMenuLabelKey("printer"), "Printer", "打印机"),
    PRINTER_SIZE_MENU_LABEL(getMenuLabelKey("print_size"), "Print Size", "打印尺寸"),
    NIGHT_STAND_MENU_LABEL(getMenuLabelKey("night_stand"), "Night Stand", "床头柜"),
    STEAM_RADIATOR_MENU_LABEL(getMenuLabelKey("radiator"), "Radiator" ,"蒸汽散热器"),
    SEED_SPREADER_MENU_LABEL(getMenuLabelKey("seed_spreader"), "Seed Spreader", "播种器"),
    REFRIGERATOR_MENU_LABEL(getMenuLabelKey("refrigerator"), "refrigerator", "冰箱"),
    //CANVAS
    CANVAS_HOVER_DESC_COMPLETED(getHoverTextKey("canvas", "desc_completed"), "A work of art" ,"艺术品"),
    CANVAS_HOVER_UNIQUE_ID(getHoverTextKey("canvas", "unique_id"), "ID = %d", "ID = %d"),
    CANVAS_HOVER_PIXELS_SIZE(getHoverTextKey("canvas", "pixels_size"), "%d x %d pixels", "%d x %d 像素"),
    CANVAS_HOVER_BLOCK_SIZE(getHoverTextKey("canvas", "block_size"), "%f x %f ", "%f x %f"),
    CANVAS_HOVER_OFFSET(getHoverTextKey("canvas", "offset"), "(%f,%f)", "(%f,%f)"),
    CANVAS_HOVER_DESC_EMPTY(getHoverTextKey("canvas", "desc_empty"), "For use with an easel", "可用画架来创作"),
    CANVAS_HOVER_DESC_SIZE_NORMAL(getHoverTextKey("canvas", "normal_size"), "Normal print", "常规尺寸画作"),
    CANVAS_HOVER_DESC_SIZE_LARGE(getHoverTextKey("canvas", "large_size"), "Large print", "大型尺寸画作"),
    CANVAS_HOVER_DESC_SIZE_EXTRA_LARGE(getHoverTextKey("canvas", "extra_large_size"), "Extra Large print", "超大型尺寸画作"),
    CANVAS_HOVER_DESC_SIZE_MASSIVE(getHoverTextKey("canvas", "massive_size"), "Massive print", "巨大尺寸的画作"),
    CANVAS_HOVER_DESC_SIZE_LARGE_SQUARE(getHoverTextKey("canvas", "large_square_size"),"Large square print", "大型方寸画作"),
    CANVAS_HOVER_DESC_SIZE_EXTRA_LARGE_SQUARE(getHoverTextKey("canvas", "extra_large_square_size"), "Extra Large square", "超大型方寸画作"),
    CANVAS_HOVER_DESC_SIZE_MASSIVE_SQUARE(getHoverTextKey("canvas", "massive_square_size"),"Massive square print","巨大方寸画作"),
    CANVAS_HOVER_DESC_SIZE_CUSTOM(getHoverTextKey("canvas", "custom_size"), "Custom print", "自定义尺寸画作"),
    //BARRIER
    LIGHT_GRAY_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.LIGHT_GRAY_CONCRETE_BARRIER_ITEM.get()), "Light Gray Concrete Barrier", "淡灰色混凝土栅栏"),
    LIGHT_GRAY_CONCRETE_BARRIER(getBlockKey(ModBlocks.LIGHT_GRAY_CONCRETE_BARRIER.get()), copyEnglish(LIGHT_GRAY_CONCRETE_BARRIER_ITEM), copySimpleChinese(LIGHT_GRAY_CONCRETE_BARRIER_ITEM)),
    WHITE_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.WHITE_CONCRETE_BARRIER_ITEM.get()), "White Concrete Barrier", "白色混凝土栅栏"),
    WHITE_CONCRETE_BARRIER(getBlockKey(ModBlocks.WHITE_CONCRETE_BARRIER.get()), copyEnglish(WHITE_CONCRETE_BARRIER_ITEM), copySimpleChinese(WHITE_CONCRETE_BARRIER_ITEM)),
    ORANGE_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.ORANGE_CONCRETE_BARRIER_ITEM.get()), "Orange Concrete Barrier", "橙色混凝土栅栏"),
    ORANGE_CONCRETE_BARRIER(getBlockKey(ModBlocks.ORANGE_CONCRETE_BARRIER.get()), copyEnglish(ORANGE_CONCRETE_BARRIER_ITEM), copySimpleChinese(ORANGE_CONCRETE_BARRIER_ITEM)),
    MAGENTA_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.MAGENTA_CONCRETE_BARRIER_ITEM.get()), "Magenta Concrete Barrier", "品红色混凝土栅栏"),
    MAGENTA_CONCRETE_BARRIER(getBlockKey(ModBlocks.MAGENTA_CONCRETE_BARRIER.get()), copyEnglish(MAGENTA_CONCRETE_BARRIER_ITEM), copySimpleChinese(MAGENTA_CONCRETE_BARRIER_ITEM)),
    LIGHT_BLUE_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.LIGHT_BLUE_CONCRETE_BARRIER_ITEM.get()), "Light Blue Concrete Barrier", "淡蓝色混凝土栅栏"),
    LIGHT_BLUE_CONCRETE_BARRIER(getBlockKey(ModBlocks.LIGHT_BLUE_CONCRETE_BARRIER.get()), copyEnglish(LIGHT_BLUE_CONCRETE_BARRIER_ITEM), copySimpleChinese(LIGHT_BLUE_CONCRETE_BARRIER_ITEM)),
    YELLOW_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.YELLOW_CONCRETE_BARRIER_ITEM.get()), "Yellow Concrete Barrier", "黄色混凝土栅栏"),
    YELLOW_CONCRETE_BARRIER(getBlockKey(ModBlocks.YELLOW_CONCRETE_BARRIER.get()), copyEnglish(YELLOW_CONCRETE_BARRIER_ITEM), copySimpleChinese(YELLOW_CONCRETE_BARRIER_ITEM)),
    LIME_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.LIME_CONCRETE_BARRIER_ITEM.get()), "Lime Concrete Barrier", "黄绿色混凝土栅栏"),
    LIME_CONCRETE_BARRIER(getBlockKey(ModBlocks.LIME_CONCRETE_BARRIER.get()), copyEnglish(LIME_CONCRETE_BARRIER_ITEM), copySimpleChinese(LIME_CONCRETE_BARRIER_ITEM)),
    PINK_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.PINK_CONCRETE_BARRIER_ITEM.get()), "Pink Concrete Barrier", "粉红色混凝土栅栏"),
    PINK_CONCRETE_BARRIER(getBlockKey(ModBlocks.PINK_CONCRETE_BARRIER.get()), copyEnglish(PINK_CONCRETE_BARRIER_ITEM), copySimpleChinese(PINK_CONCRETE_BARRIER_ITEM)),
    GRAY_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.GRAY_CONCRETE_BARRIER_ITEM.get()), "Gray Concrete Barrier", "灰色混凝土栅栏"),
    GRAY_CONCRETE_BARRIER(getBlockKey(ModBlocks.GRAY_CONCRETE_BARRIER.get()), copyEnglish(GRAY_CONCRETE_BARRIER_ITEM), copySimpleChinese(GRAY_CONCRETE_BARRIER_ITEM)),
    CYAN_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.CYAN_CONCRETE_BARRIER_ITEM.get()), "Cyan Concrete Barrier", "青色混凝土栅栏"),
    CYAN_CONCRETE_BARRIER(getBlockKey(ModBlocks.CYAN_CONCRETE_BARRIER.get()), copyEnglish(CYAN_CONCRETE_BARRIER_ITEM), copySimpleChinese(CYAN_CONCRETE_BARRIER_ITEM)),
    PURPLE_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.PURPLE_CONCRETE_BARRIER_ITEM.get()), "Purple Concrete Barrier", "紫色混凝土栅栏"),
    PURPLE_CONCRETE_BARRIER(getBlockKey(ModBlocks.PURPLE_CONCRETE_BARRIER.get()), copyEnglish(PURPLE_CONCRETE_BARRIER_ITEM), copySimpleChinese(PURPLE_CONCRETE_BARRIER_ITEM)),
    BLUE_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.BLUE_CONCRETE_BARRIER_ITEM.get()), "Blue Concrete Barrier", "蓝色混凝土栅栏"),
    BLUE_CONCRETE_BARRIER(getBlockKey(ModBlocks.BLUE_CONCRETE_BARRIER.get()), copyEnglish(BLUE_CONCRETE_BARRIER_ITEM), copySimpleChinese(BLUE_CONCRETE_BARRIER_ITEM)),
    BROWN_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.BROWN_CONCRETE_BARRIER_ITEM.get()), "Brown Concrete Barrier", "棕色混凝土栅栏"),
    BROWN_CONCRETE_BARRIER(getBlockKey(ModBlocks.BROWN_CONCRETE_BARRIER.get()), copyEnglish(BROWN_CONCRETE_BARRIER_ITEM), copySimpleChinese(BROWN_CONCRETE_BARRIER_ITEM)),
    GREEN_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.GREEN_CONCRETE_BARRIER_ITEM.get()), "Green Concrete Barrier", "绿色混凝土栅栏"),
    GREEN_CONCRETE_BARRIER(getBlockKey(ModBlocks.GREEN_CONCRETE_BARRIER.get()), copyEnglish(GREEN_CONCRETE_BARRIER_ITEM), copySimpleChinese(GREEN_CONCRETE_BARRIER_ITEM)),
    RED_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.RED_CONCRETE_BARRIER_ITEM.get()), "Red Concrete Barrier", "红色混凝土栅栏"),
    RED_CONCRETE_BARRIER(getBlockKey(ModBlocks.RED_CONCRETE_BARRIER.get()), copyEnglish(RED_CONCRETE_BARRIER_ITEM), copySimpleChinese(RED_CONCRETE_BARRIER_ITEM)),
    BLACK_CONCRETE_BARRIER_ITEM(getItemKey(ModItems.BLACK_CONCRETE_BARRIER_ITEM.get()), "Black Concrete Barrier", "黑色混凝土栅栏"),
    BLACK_CONCRETE_BARRIER(getBlockKey(ModBlocks.BLACK_CONCRETE_BARRIER.get()), copyEnglish(BLACK_CONCRETE_BARRIER_ITEM), copySimpleChinese(BLACK_CONCRETE_BARRIER_ITEM)),
    NULL_BLOCK(getBlockKey(ModBlocks.NULL_BLOCK), "Null Block", "空值"),
    NULL_BLOCK_ITEM(getItemKey(ModItems.NULL_BLOCK_ITEM.get()), getEnglish(NULL_BLOCK), getSimpleChinese(NULL_BLOCK)),
    ONE_BLOCK_ITEM(getItemKey(ModItems.ONE_BLOCK_ITEM.get()), "One", "一"),
    ONE_BLOCK(getBlockKey(ModBlocks.ONE_BLOCK.get()), copyEnglish(ONE_BLOCK_ITEM), copySimpleChinese(ONE_BLOCK_ITEM)),
    TWO_BLOCK_ITEM(getItemKey(ModItems.TWO_BLOCK_ITEM.get()), "Two", "二"),
    TWO_BLOCK(getBlockKey(ModBlocks.TWO_BLOCK.get()), copyEnglish(TWO_BLOCK_ITEM), copySimpleChinese(TWO_BLOCK_ITEM)),
    THREE_BLOCK_ITEM(getItemKey(ModItems.THREE_BLOCK_ITEM.get()), "Three", "三"),
    THREE_BLOCK(getBlockKey(ModBlocks.THREE_BLOCK.get()), copyEnglish(THREE_BLOCK_ITEM), copySimpleChinese(THREE_BLOCK_ITEM)),
    FOUR_BLOCK_ITEM(getItemKey(ModItems.FOUR_BLOCK_ITEM.get()), "Four", "四"),
    FOUR_BLOCK(getBlockKey(ModBlocks.FOUR_BLOCK.get()), copyEnglish(FOUR_BLOCK_ITEM), copySimpleChinese(FOUR_BLOCK_ITEM)),
    FIVE_BLOCK_ITEM(getItemKey(ModItems.FIVE_BLOCK_ITEM.get()), "Five", "五"),
    FIVE_BLOCK(getBlockKey(ModBlocks.FIVE_BLOCK.get()), copyEnglish(FIVE_BLOCK_ITEM), copySimpleChinese(FIVE_BLOCK_ITEM)),
    SIX_BLOCK_ITEM(getItemKey(ModItems.SIX_BLOCK_ITEM.get()), "Six", "六"),
    SIX_BLOCK(getBlockKey(ModBlocks.SIX_BLOCK.get()), copyEnglish(SIX_BLOCK_ITEM), copySimpleChinese(SIX_BLOCK_ITEM)),
    SEVEN_BLOCK_ITEM(getItemKey(ModItems.SEVEN_BLOCK_ITEM.get()), "Seven", "七"),
    SEVEN_BLOCK(getBlockKey(ModBlocks.SEVEN_BLOCK.get()), copyEnglish(SEVEN_BLOCK_ITEM), copySimpleChinese(SEVEN_BLOCK_ITEM)),
    EIGHT_BLOCK_ITEM(getItemKey(ModItems.EIGHT_BLOCK_ITEM.get()), "Eight", "八"),
    EIGHT_BLOCK(getBlockKey(ModBlocks.EIGHT_BLOCK.get()), copyEnglish(EIGHT_BLOCK_ITEM), copySimpleChinese(EIGHT_BLOCK_ITEM)),
    NINE_BLOCK_ITEM(getItemKey(ModItems.NINE_BLOCK_ITEM.get()), "Nine", "九"),
    NINE_BLOCK(getBlockKey(ModBlocks.NINE_BLOCK.get()), copyEnglish(NINE_BLOCK_ITEM), copySimpleChinese(NINE_BLOCK_ITEM)),
    ZERO_BLOCK_ITEM(getItemKey(ModItems.ZERO_BLOCK_ITEM.get()), "Zero", "零"),
    ZERO_BLOCK(getBlockKey(ModBlocks.ZERO_BLOCK.get()), copyEnglish(ZERO_BLOCK_ITEM), copySimpleChinese(ZERO_BLOCK_ITEM))
    ;


    private final String key;
    private final String US_EN;
    private final String SIM_CN;
    ModLangKeyValue(String key, String US_EN, String SIM_CN) {
        this.key = key;
        this.US_EN = US_EN;
        this.SIM_CN = SIM_CN;
    }
    public String getKey() {
        return key;
    }
    public static String getLan(LanguageEnum lan, ModLangKeyValue key) {
        if (lan == LanguageEnum.SimpleChinese) {
            return getSimpleChinese(key);
        }
        return getEnglish(key);
    }

    private static String getEnglish(ModLangKeyValue key) {
        return key.US_EN;
    }
    private static String getSimpleChinese(ModLangKeyValue key) {
        return key.SIM_CN;
    }
    private static final String HEAD_ = "modernlifepatch.lang.";
    public static String getHoverTextKey(String key) {
        return getHoverTextKey(key, "0");
    }
    public static String getResourceTextKey(String mod_id, String name) {
        if(StringValidator.isNotValidMinecraftKey(mod_id) || StringValidator.isNotValidMinecraftKey(name)) {
            throw new IllegalArgumentException("Not valid MinecraftKey which only including [a-z], '.' and '_'.");
        }
        return "resource." + mod_id + "." + name;
    }
    public static String getCustomTextKey(String prefix, String mod_id, String custom) {
        if(StringValidator.isNotValidMinecraftKey(prefix) || StringValidator.isNotValidMinecraftKey(mod_id) || StringValidator.isNotValidMinecraftKey(custom)) {
            throw new IllegalArgumentException("Not valid MinecraftKey which only including [a-z], '.' and '_'.");
        }
        return HEAD_ + prefix + "." + mod_id + "." + custom;
    }
    public static String getHoverTextKey(String itemName, String diffMark) {
        if(StringValidator.isNotValidMinecraftKey(itemName) || StringValidator.isNotValidMinecraftKey(diffMark)) {
            throw new IllegalArgumentException("Not valid MinecraftKey which only including [a-z], '.' and [0-9] and '_'.");
        }
        return HEAD_ + itemName + ".hover_text." + diffMark;
    }
    public static String getMenuLabelKey(String menuLabel) {
        if(StringValidator.isNotValidMinecraftKey(menuLabel)) {
            throw new IllegalArgumentException("Not valid MinecraftKey which only including [a-z], '.' and '_'.");
        }
        return HEAD_ + "menu." + menuLabel;
    }
    public static String getTagKey(TagKey<Item> tag) {
        return String.format("gui.tag_filter.%s.%s", tag.location().getNamespace(), tag.location().getPath().replace("/", "."));
    }
    public static String getCreativeTabNameKey(String tabName) {
        return "itemGroup." + tabName;
    }

    public static String getBlockKey(Supplier<? extends Block> block) {
        return getBlockKey(block.get());
    }
    public static String getBlockKey(Block block) {
        return block.getDescriptionId();
    }
    public static String getItemKey(Supplier<? extends Item> item) {
        return getItemKey(item.get());
    }
    public static String getItemKey(Item item) {
        return item.getDescriptionId();
    }
    public static String copyEnglish(ModLangKeyValue modLangKeyValue) {
        return modLangKeyValue.US_EN;
    }
    public static String copySimpleChinese(ModLangKeyValue modLangKeyValue) {
        return modLangKeyValue.SIM_CN;
    }
}
