diff --git a/.gitignore b/.gitignore index 2b92534..3408caf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ libraries/ logs/ generated/ +output/ ### Java files ### *.class diff --git a/README.md b/README.md index 1a6bc95..9f96ad0 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,10 @@ own [ViaNBT](https://github.com/ViaVersion/ViaNBT) as the NBT reader/writer. Com ### Identifier files -Next to a standardized compact format, there are extra files per version to store the identifier arrays of certain -registries, as their full keys might be required. These files simply contain any number of json arrays. +Next to a standardized compact format for int id mappings, the full identifiers of some registries are also required. +For this, we generate a list of *all* identifiers in the registry across all versions, so that their names only need to +be stored once, as opposed to storing them again in every new version they are still in. Wherever needed, these +identifiers are then referred to via their index in the global list. ### Mapping files @@ -81,26 +83,26 @@ The direct storage simply stores an array of ints exactly as they can be used in * `id` (byte tag) is `0` * `val` (int array tag) contains the mapped ids, where their array index corresponds to the unmapped id -### Changed value storage - -The changed value storage stores two int arrays: One containing the changed unmapped ids, and one their corresponding -mapped ids in a simple int→int mapping over the two arrays. - -* `id` (byte tag) is `1` -* `at` (int array tag) contains the unmapped ids that have been changed -* `val` (int array tag) contains the mapped ids, indexed by the same index as the unmapped id in `at` -* Optional: `nofill` (byte tag): Unless present, all ids between the ones found in `at` are mapped to their identity - ### Shifted value storage The shifted value storage stores two int arrays: One containing the unmapped ids that end a sequence of mapped ids. For an index `i`, all unmapped ids between `at[i] + sequence` (inclusive) and `at[i + 1]` (exclusive) are mapped to `to[i] + sequence`. -* `id` (byte tag) is `2` +* `id` (byte tag) is `1` * `at` (int array tag) contains the unmapped ids, where their mapped is is *not* simply the last mapped id + 1 * `to` (int array tag) contains the mapped ids, indexed by the same index as the unmapped id in `at` +### Changed value storage + +The changed value storage stores two int arrays: One containing the changed unmapped ids, and one their corresponding +mapped ids in a simple int→int mapping over the two arrays. + +* `id` (byte tag) is `2` +* `at` (int array tag) contains the unmapped ids that have been changed +* `val` (int array tag) contains the mapped ids, indexed by the same index as the unmapped id in `at` +* Optional: `nofill` (byte tag): Unless present, all ids between the ones found in `at` are mapped to their identity + ### Identity storage The identity storage signifies that every id between `0` and `size` is mapped to itself. This is sometimes used over diff --git a/build.gradle.kts b/build.gradle.kts index 030f877..8ef578a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { } group = "com.viaversion" -version = "3.4.0" +version = "4.0.0" description = "MappingsGenerator" java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/mappings/identifier-table.json b/mappings/identifier-table.json new file mode 100644 index 0000000..cd4f9c0 --- /dev/null +++ b/mappings/identifier-table.json @@ -0,0 +1,1751 @@ +{ + "items": [ + "air", + "stone", + "granite", + "polished_granite", + "diorite", + "polished_diorite", + "andesite", + "polished_andesite", + "grass_block", + "dirt", + "coarse_dirt", + "podzol", + "cobblestone", + "oak_planks", + "spruce_planks", + "birch_planks", + "jungle_planks", + "acacia_planks", + "dark_oak_planks", + "oak_sapling", + "spruce_sapling", + "birch_sapling", + "jungle_sapling", + "acacia_sapling", + "dark_oak_sapling", + "bedrock", + "sand", + "red_sand", + "gravel", + "gold_ore", + "iron_ore", + "coal_ore", + "oak_log", + "spruce_log", + "birch_log", + "jungle_log", + "acacia_log", + "dark_oak_log", + "stripped_oak_log", + "stripped_spruce_log", + "stripped_birch_log", + "stripped_jungle_log", + "stripped_acacia_log", + "stripped_dark_oak_log", + "stripped_oak_wood", + "stripped_spruce_wood", + "stripped_birch_wood", + "stripped_jungle_wood", + "stripped_acacia_wood", + "stripped_dark_oak_wood", + "oak_wood", + "spruce_wood", + "birch_wood", + "jungle_wood", + "acacia_wood", + "dark_oak_wood", + "oak_leaves", + "spruce_leaves", + "birch_leaves", + "jungle_leaves", + "acacia_leaves", + "dark_oak_leaves", + "sponge", + "wet_sponge", + "glass", + "lapis_ore", + "lapis_block", + "dispenser", + "sandstone", + "chiseled_sandstone", + "cut_sandstone", + "note_block", + "powered_rail", + "detector_rail", + "sticky_piston", + "cobweb", + "grass", + "fern", + "dead_bush", + "seagrass", + "sea_pickle", + "piston", + "white_wool", + "orange_wool", + "magenta_wool", + "light_blue_wool", + "yellow_wool", + "lime_wool", + "pink_wool", + "gray_wool", + "light_gray_wool", + "cyan_wool", + "purple_wool", + "blue_wool", + "brown_wool", + "green_wool", + "red_wool", + "black_wool", + "dandelion", + "poppy", + "blue_orchid", + "allium", + "azure_bluet", + "red_tulip", + "orange_tulip", + "white_tulip", + "pink_tulip", + "oxeye_daisy", + "brown_mushroom", + "red_mushroom", + "gold_block", + "iron_block", + "oak_slab", + "spruce_slab", + "birch_slab", + "jungle_slab", + "acacia_slab", + "dark_oak_slab", + "stone_slab", + "sandstone_slab", + "petrified_oak_slab", + "cobblestone_slab", + "brick_slab", + "stone_brick_slab", + "nether_brick_slab", + "quartz_slab", + "red_sandstone_slab", + "purpur_slab", + "prismarine_slab", + "prismarine_brick_slab", + "dark_prismarine_slab", + "smooth_quartz", + "smooth_red_sandstone", + "smooth_sandstone", + "smooth_stone", + "bricks", + "tnt", + "bookshelf", + "mossy_cobblestone", + "obsidian", + "torch", + "end_rod", + "chorus_plant", + "chorus_flower", + "purpur_block", + "purpur_pillar", + "purpur_stairs", + "spawner", + "oak_stairs", + "chest", + "diamond_ore", + "diamond_block", + "crafting_table", + "farmland", + "furnace", + "ladder", + "rail", + "cobblestone_stairs", + "lever", + "stone_pressure_plate", + "oak_pressure_plate", + "spruce_pressure_plate", + "birch_pressure_plate", + "jungle_pressure_plate", + "acacia_pressure_plate", + "dark_oak_pressure_plate", + "redstone_ore", + "redstone_torch", + "stone_button", + "snow", + "ice", + "snow_block", + "cactus", + "clay", + "jukebox", + "oak_fence", + "spruce_fence", + "birch_fence", + "jungle_fence", + "acacia_fence", + "dark_oak_fence", + "pumpkin", + "carved_pumpkin", + "netherrack", + "soul_sand", + "glowstone", + "jack_o_lantern", + "oak_trapdoor", + "spruce_trapdoor", + "birch_trapdoor", + "jungle_trapdoor", + "acacia_trapdoor", + "dark_oak_trapdoor", + "infested_stone", + "infested_cobblestone", + "infested_stone_bricks", + "infested_mossy_stone_bricks", + "infested_cracked_stone_bricks", + "infested_chiseled_stone_bricks", + "stone_bricks", + "mossy_stone_bricks", + "cracked_stone_bricks", + "chiseled_stone_bricks", + "brown_mushroom_block", + "red_mushroom_block", + "mushroom_stem", + "iron_bars", + "glass_pane", + "melon", + "vine", + "oak_fence_gate", + "spruce_fence_gate", + "birch_fence_gate", + "jungle_fence_gate", + "acacia_fence_gate", + "dark_oak_fence_gate", + "brick_stairs", + "stone_brick_stairs", + "mycelium", + "lily_pad", + "nether_bricks", + "nether_brick_fence", + "nether_brick_stairs", + "enchanting_table", + "end_portal_frame", + "end_stone", + "end_stone_bricks", + "dragon_egg", + "redstone_lamp", + "sandstone_stairs", + "emerald_ore", + "ender_chest", + "tripwire_hook", + "emerald_block", + "spruce_stairs", + "birch_stairs", + "jungle_stairs", + "command_block", + "beacon", + "cobblestone_wall", + "mossy_cobblestone_wall", + "oak_button", + "spruce_button", + "birch_button", + "jungle_button", + "acacia_button", + "dark_oak_button", + "anvil", + "chipped_anvil", + "damaged_anvil", + "trapped_chest", + "light_weighted_pressure_plate", + "heavy_weighted_pressure_plate", + "daylight_detector", + "redstone_block", + "nether_quartz_ore", + "hopper", + "chiseled_quartz_block", + "quartz_block", + "quartz_pillar", + "quartz_stairs", + "activator_rail", + "dropper", + "white_terracotta", + "orange_terracotta", + "magenta_terracotta", + "light_blue_terracotta", + "yellow_terracotta", + "lime_terracotta", + "pink_terracotta", + "gray_terracotta", + "light_gray_terracotta", + "cyan_terracotta", + "purple_terracotta", + "blue_terracotta", + "brown_terracotta", + "green_terracotta", + "red_terracotta", + "black_terracotta", + "barrier", + "iron_trapdoor", + "hay_block", + "white_carpet", + "orange_carpet", + "magenta_carpet", + "light_blue_carpet", + "yellow_carpet", + "lime_carpet", + "pink_carpet", + "gray_carpet", + "light_gray_carpet", + "cyan_carpet", + "purple_carpet", + "blue_carpet", + "brown_carpet", + "green_carpet", + "red_carpet", + "black_carpet", + "terracotta", + "coal_block", + "packed_ice", + "acacia_stairs", + "dark_oak_stairs", + "slime_block", + "grass_path", + "sunflower", + "lilac", + "rose_bush", + "peony", + "tall_grass", + "large_fern", + "white_stained_glass", + "orange_stained_glass", + "magenta_stained_glass", + "light_blue_stained_glass", + "yellow_stained_glass", + "lime_stained_glass", + "pink_stained_glass", + "gray_stained_glass", + "light_gray_stained_glass", + "cyan_stained_glass", + "purple_stained_glass", + "blue_stained_glass", + "brown_stained_glass", + "green_stained_glass", + "red_stained_glass", + "black_stained_glass", + "white_stained_glass_pane", + "orange_stained_glass_pane", + "magenta_stained_glass_pane", + "light_blue_stained_glass_pane", + "yellow_stained_glass_pane", + "lime_stained_glass_pane", + "pink_stained_glass_pane", + "gray_stained_glass_pane", + "light_gray_stained_glass_pane", + "cyan_stained_glass_pane", + "purple_stained_glass_pane", + "blue_stained_glass_pane", + "brown_stained_glass_pane", + "green_stained_glass_pane", + "red_stained_glass_pane", + "black_stained_glass_pane", + "prismarine", + "prismarine_bricks", + "dark_prismarine", + "prismarine_stairs", + "prismarine_brick_stairs", + "dark_prismarine_stairs", + "sea_lantern", + "red_sandstone", + "chiseled_red_sandstone", + "cut_red_sandstone", + "red_sandstone_stairs", + "repeating_command_block", + "chain_command_block", + "magma_block", + "nether_wart_block", + "red_nether_bricks", + "bone_block", + "structure_void", + "observer", + "shulker_box", + "white_shulker_box", + "orange_shulker_box", + "magenta_shulker_box", + "light_blue_shulker_box", + "yellow_shulker_box", + "lime_shulker_box", + "pink_shulker_box", + "gray_shulker_box", + "light_gray_shulker_box", + "cyan_shulker_box", + "purple_shulker_box", + "blue_shulker_box", + "brown_shulker_box", + "green_shulker_box", + "red_shulker_box", + "black_shulker_box", + "white_glazed_terracotta", + "orange_glazed_terracotta", + "magenta_glazed_terracotta", + "light_blue_glazed_terracotta", + "yellow_glazed_terracotta", + "lime_glazed_terracotta", + "pink_glazed_terracotta", + "gray_glazed_terracotta", + "light_gray_glazed_terracotta", + "cyan_glazed_terracotta", + "purple_glazed_terracotta", + "blue_glazed_terracotta", + "brown_glazed_terracotta", + "green_glazed_terracotta", + "red_glazed_terracotta", + "black_glazed_terracotta", + "white_concrete", + "orange_concrete", + "magenta_concrete", + "light_blue_concrete", + "yellow_concrete", + "lime_concrete", + "pink_concrete", + "gray_concrete", + "light_gray_concrete", + "cyan_concrete", + "purple_concrete", + "blue_concrete", + "brown_concrete", + "green_concrete", + "red_concrete", + "black_concrete", + "white_concrete_powder", + "orange_concrete_powder", + "magenta_concrete_powder", + "light_blue_concrete_powder", + "yellow_concrete_powder", + "lime_concrete_powder", + "pink_concrete_powder", + "gray_concrete_powder", + "light_gray_concrete_powder", + "cyan_concrete_powder", + "purple_concrete_powder", + "blue_concrete_powder", + "brown_concrete_powder", + "green_concrete_powder", + "red_concrete_powder", + "black_concrete_powder", + "turtle_egg", + "dead_tube_coral_block", + "dead_brain_coral_block", + "dead_bubble_coral_block", + "dead_fire_coral_block", + "dead_horn_coral_block", + "tube_coral_block", + "brain_coral_block", + "bubble_coral_block", + "fire_coral_block", + "horn_coral_block", + "tube_coral", + "brain_coral", + "bubble_coral", + "fire_coral", + "horn_coral", + "tube_coral_fan", + "brain_coral_fan", + "bubble_coral_fan", + "fire_coral_fan", + "horn_coral_fan", + "dead_tube_coral_fan", + "dead_brain_coral_fan", + "dead_bubble_coral_fan", + "dead_fire_coral_fan", + "dead_horn_coral_fan", + "blue_ice", + "conduit", + "iron_door", + "oak_door", + "spruce_door", + "birch_door", + "jungle_door", + "acacia_door", + "dark_oak_door", + "repeater", + "comparator", + "structure_block", + "turtle_helmet", + "scute", + "iron_shovel", + "iron_pickaxe", + "iron_axe", + "flint_and_steel", + "apple", + "bow", + "arrow", + "coal", + "charcoal", + "diamond", + "iron_ingot", + "gold_ingot", + "iron_sword", + "wooden_sword", + "wooden_shovel", + "wooden_pickaxe", + "wooden_axe", + "stone_sword", + "stone_shovel", + "stone_pickaxe", + "stone_axe", + "diamond_sword", + "diamond_shovel", + "diamond_pickaxe", + "diamond_axe", + "stick", + "bowl", + "mushroom_stew", + "golden_sword", + "golden_shovel", + "golden_pickaxe", + "golden_axe", + "string", + "feather", + "gunpowder", + "wooden_hoe", + "stone_hoe", + "iron_hoe", + "diamond_hoe", + "golden_hoe", + "wheat_seeds", + "wheat", + "bread", + "leather_helmet", + "leather_chestplate", + "leather_leggings", + "leather_boots", + "chainmail_helmet", + "chainmail_chestplate", + "chainmail_leggings", + "chainmail_boots", + "iron_helmet", + "iron_chestplate", + "iron_leggings", + "iron_boots", + "diamond_helmet", + "diamond_chestplate", + "diamond_leggings", + "diamond_boots", + "golden_helmet", + "golden_chestplate", + "golden_leggings", + "golden_boots", + "flint", + "porkchop", + "cooked_porkchop", + "painting", + "golden_apple", + "enchanted_golden_apple", + "sign", + "bucket", + "water_bucket", + "lava_bucket", + "minecart", + "saddle", + "redstone", + "snowball", + "oak_boat", + "leather", + "milk_bucket", + "pufferfish_bucket", + "salmon_bucket", + "cod_bucket", + "tropical_fish_bucket", + "brick", + "clay_ball", + "sugar_cane", + "kelp", + "dried_kelp_block", + "paper", + "book", + "slime_ball", + "chest_minecart", + "furnace_minecart", + "egg", + "compass", + "fishing_rod", + "clock", + "glowstone_dust", + "cod", + "salmon", + "tropical_fish", + "pufferfish", + "cooked_cod", + "cooked_salmon", + "ink_sac", + "rose_red", + "cactus_green", + "cocoa_beans", + "lapis_lazuli", + "purple_dye", + "cyan_dye", + "light_gray_dye", + "gray_dye", + "pink_dye", + "lime_dye", + "dandelion_yellow", + "light_blue_dye", + "magenta_dye", + "orange_dye", + "bone_meal", + "bone", + "sugar", + "cake", + "white_bed", + "orange_bed", + "magenta_bed", + "light_blue_bed", + "yellow_bed", + "lime_bed", + "pink_bed", + "gray_bed", + "light_gray_bed", + "cyan_bed", + "purple_bed", + "blue_bed", + "brown_bed", + "green_bed", + "red_bed", + "black_bed", + "cookie", + "filled_map", + "shears", + "melon_slice", + "dried_kelp", + "pumpkin_seeds", + "melon_seeds", + "beef", + "cooked_beef", + "chicken", + "cooked_chicken", + "rotten_flesh", + "ender_pearl", + "blaze_rod", + "ghast_tear", + "gold_nugget", + "nether_wart", + "potion", + "glass_bottle", + "spider_eye", + "fermented_spider_eye", + "blaze_powder", + "magma_cream", + "brewing_stand", + "cauldron", + "ender_eye", + "glistering_melon_slice", + "bat_spawn_egg", + "blaze_spawn_egg", + "cave_spider_spawn_egg", + "chicken_spawn_egg", + "cod_spawn_egg", + "cow_spawn_egg", + "creeper_spawn_egg", + "dolphin_spawn_egg", + "donkey_spawn_egg", + "drowned_spawn_egg", + "elder_guardian_spawn_egg", + "enderman_spawn_egg", + "endermite_spawn_egg", + "evoker_spawn_egg", + "ghast_spawn_egg", + "guardian_spawn_egg", + "horse_spawn_egg", + "husk_spawn_egg", + "llama_spawn_egg", + "magma_cube_spawn_egg", + "mooshroom_spawn_egg", + "mule_spawn_egg", + "ocelot_spawn_egg", + "parrot_spawn_egg", + "phantom_spawn_egg", + "pig_spawn_egg", + "polar_bear_spawn_egg", + "pufferfish_spawn_egg", + "rabbit_spawn_egg", + "salmon_spawn_egg", + "sheep_spawn_egg", + "shulker_spawn_egg", + "silverfish_spawn_egg", + "skeleton_spawn_egg", + "skeleton_horse_spawn_egg", + "slime_spawn_egg", + "spider_spawn_egg", + "squid_spawn_egg", + "stray_spawn_egg", + "tropical_fish_spawn_egg", + "turtle_spawn_egg", + "vex_spawn_egg", + "villager_spawn_egg", + "vindicator_spawn_egg", + "witch_spawn_egg", + "wither_skeleton_spawn_egg", + "wolf_spawn_egg", + "zombie_spawn_egg", + "zombie_horse_spawn_egg", + "zombie_pigman_spawn_egg", + "zombie_villager_spawn_egg", + "experience_bottle", + "fire_charge", + "writable_book", + "written_book", + "emerald", + "item_frame", + "flower_pot", + "carrot", + "potato", + "baked_potato", + "poisonous_potato", + "map", + "golden_carrot", + "skeleton_skull", + "wither_skeleton_skull", + "player_head", + "zombie_head", + "creeper_head", + "dragon_head", + "carrot_on_a_stick", + "nether_star", + "pumpkin_pie", + "firework_rocket", + "firework_star", + "enchanted_book", + "nether_brick", + "quartz", + "tnt_minecart", + "hopper_minecart", + "prismarine_shard", + "prismarine_crystals", + "rabbit", + "cooked_rabbit", + "rabbit_stew", + "rabbit_foot", + "rabbit_hide", + "armor_stand", + "iron_horse_armor", + "golden_horse_armor", + "diamond_horse_armor", + "lead", + "name_tag", + "command_block_minecart", + "mutton", + "cooked_mutton", + "white_banner", + "orange_banner", + "magenta_banner", + "light_blue_banner", + "yellow_banner", + "lime_banner", + "pink_banner", + "gray_banner", + "light_gray_banner", + "cyan_banner", + "purple_banner", + "blue_banner", + "brown_banner", + "green_banner", + "red_banner", + "black_banner", + "end_crystal", + "chorus_fruit", + "popped_chorus_fruit", + "beetroot", + "beetroot_seeds", + "beetroot_soup", + "dragon_breath", + "splash_potion", + "spectral_arrow", + "tipped_arrow", + "lingering_potion", + "shield", + "elytra", + "spruce_boat", + "birch_boat", + "jungle_boat", + "acacia_boat", + "dark_oak_boat", + "totem_of_undying", + "shulker_shell", + "iron_nugget", + "knowledge_book", + "debug_stick", + "music_disc_13", + "music_disc_cat", + "music_disc_blocks", + "music_disc_chirp", + "music_disc_far", + "music_disc_mall", + "music_disc_mellohi", + "music_disc_stal", + "music_disc_strad", + "music_disc_ward", + "music_disc_11", + "music_disc_wait", + "trident", + "phantom_membrane", + "nautilus_shell", + "heart_of_the_sea", + "smooth_stone_slab", + "dead_brain_coral", + "dead_bubble_coral", + "dead_fire_coral", + "dead_horn_coral", + "dead_tube_coral", + "oak_sign", + "red_dye", + "green_dye", + "yellow_dye", + "cornflower", + "lily_of_the_valley", + "wither_rose", + "cut_sandstone_slab", + "cut_red_sandstone_slab", + "brick_wall", + "prismarine_wall", + "red_sandstone_wall", + "mossy_stone_brick_wall", + "granite_wall", + "stone_brick_wall", + "nether_brick_wall", + "andesite_wall", + "red_nether_brick_wall", + "sandstone_wall", + "end_stone_brick_wall", + "diorite_wall", + "polished_granite_stairs", + "smooth_red_sandstone_stairs", + "mossy_stone_brick_stairs", + "polished_diorite_stairs", + "mossy_cobblestone_stairs", + "end_stone_brick_stairs", + "stone_stairs", + "smooth_sandstone_stairs", + "smooth_quartz_stairs", + "granite_stairs", + "andesite_stairs", + "red_nether_brick_stairs", + "polished_andesite_stairs", + "diorite_stairs", + "polished_granite_slab", + "smooth_red_sandstone_slab", + "mossy_stone_brick_slab", + "polished_diorite_slab", + "mossy_cobblestone_slab", + "end_stone_brick_slab", + "smooth_sandstone_slab", + "smooth_quartz_slab", + "granite_slab", + "andesite_slab", + "red_nether_brick_slab", + "polished_andesite_slab", + "diorite_slab", + "scaffolding", + "jigsaw", + "composter", + "spruce_sign", + "birch_sign", + "jungle_sign", + "acacia_sign", + "dark_oak_sign", + "bamboo", + "blue_dye", + "brown_dye", + "black_dye", + "white_dye", + "cat_spawn_egg", + "fox_spawn_egg", + "panda_spawn_egg", + "pillager_spawn_egg", + "ravager_spawn_egg", + "trader_llama_spawn_egg", + "wandering_trader_spawn_egg", + "leather_horse_armor", + "crossbow", + "suspicious_stew", + "loom", + "flower_banner_pattern", + "creeper_banner_pattern", + "skull_banner_pattern", + "mojang_banner_pattern", + "globe_banner_pattern", + "barrel", + "smoker", + "blast_furnace", + "cartography_table", + "fletching_table", + "grindstone", + "lectern", + "smithing_table", + "stonecutter", + "bell", + "lantern", + "sweet_berries", + "campfire", + "bee_spawn_egg", + "honeycomb", + "bee_nest", + "beehive", + "honey_bottle", + "honey_block", + "honeycomb_block", + "crimson_nylium", + "warped_nylium", + "crimson_planks", + "warped_planks", + "nether_gold_ore", + "crimson_stem", + "warped_stem", + "stripped_crimson_stem", + "stripped_warped_stem", + "stripped_crimson_hyphae", + "stripped_warped_hyphae", + "crimson_hyphae", + "warped_hyphae", + "crimson_fungus", + "warped_fungus", + "crimson_roots", + "warped_roots", + "nether_sprouts", + "weeping_vines", + "twisting_vines", + "crimson_slab", + "warped_slab", + "crimson_pressure_plate", + "warped_pressure_plate", + "polished_blackstone_pressure_plate", + "crimson_fence", + "warped_fence", + "soul_soil", + "basalt", + "polished_basalt", + "soul_torch", + "crimson_trapdoor", + "warped_trapdoor", + "chain", + "crimson_fence_gate", + "warped_fence_gate", + "cracked_nether_bricks", + "chiseled_nether_bricks", + "crimson_stairs", + "warped_stairs", + "blackstone_wall", + "polished_blackstone_wall", + "polished_blackstone_brick_wall", + "crimson_button", + "warped_button", + "polished_blackstone_button", + "quartz_bricks", + "warped_wart_block", + "crimson_door", + "warped_door", + "netherite_ingot", + "netherite_scrap", + "netherite_sword", + "netherite_shovel", + "netherite_pickaxe", + "netherite_axe", + "netherite_hoe", + "netherite_helmet", + "netherite_chestplate", + "netherite_leggings", + "netherite_boots", + "crimson_sign", + "warped_sign", + "hoglin_spawn_egg", + "piglin_spawn_egg", + "strider_spawn_egg", + "zoglin_spawn_egg", + "zombified_piglin_spawn_egg", + "warped_fungus_on_a_stick", + "music_disc_pigstep", + "piglin_banner_pattern", + "soul_lantern", + "soul_campfire", + "shroomlight", + "lodestone", + "netherite_block", + "ancient_debris", + "target", + "crying_obsidian", + "blackstone", + "blackstone_slab", + "blackstone_stairs", + "gilded_blackstone", + "polished_blackstone", + "polished_blackstone_slab", + "polished_blackstone_stairs", + "chiseled_polished_blackstone", + "polished_blackstone_bricks", + "polished_blackstone_brick_slab", + "polished_blackstone_brick_stairs", + "cracked_polished_blackstone_bricks", + "respawn_anchor", + "piglin_brute_spawn_egg", + "deepslate", + "cobbled_deepslate", + "polished_deepslate", + "calcite", + "tuff", + "dripstone_block", + "rooted_dirt", + "deepslate_coal_ore", + "deepslate_iron_ore", + "copper_ore", + "deepslate_copper_ore", + "deepslate_gold_ore", + "deepslate_redstone_ore", + "deepslate_emerald_ore", + "deepslate_lapis_ore", + "deepslate_diamond_ore", + "raw_iron_block", + "raw_copper_block", + "raw_gold_block", + "amethyst_block", + "budding_amethyst", + "copper_block", + "exposed_copper", + "weathered_copper", + "oxidized_copper", + "cut_copper", + "exposed_cut_copper", + "weathered_cut_copper", + "oxidized_cut_copper", + "cut_copper_stairs", + "exposed_cut_copper_stairs", + "weathered_cut_copper_stairs", + "oxidized_cut_copper_stairs", + "cut_copper_slab", + "exposed_cut_copper_slab", + "weathered_cut_copper_slab", + "oxidized_cut_copper_slab", + "waxed_copper_block", + "waxed_exposed_copper", + "waxed_weathered_copper", + "waxed_oxidized_copper", + "waxed_cut_copper", + "waxed_exposed_cut_copper", + "waxed_weathered_cut_copper", + "waxed_oxidized_cut_copper", + "waxed_cut_copper_stairs", + "waxed_exposed_cut_copper_stairs", + "waxed_weathered_cut_copper_stairs", + "waxed_oxidized_cut_copper_stairs", + "waxed_cut_copper_slab", + "waxed_exposed_cut_copper_slab", + "waxed_weathered_cut_copper_slab", + "waxed_oxidized_cut_copper_slab", + "azalea_leaves", + "flowering_azalea_leaves", + "tinted_glass", + "azalea", + "flowering_azalea", + "spore_blossom", + "moss_carpet", + "moss_block", + "hanging_roots", + "big_dripleaf", + "small_dripleaf", + "smooth_basalt", + "infested_deepslate", + "deepslate_bricks", + "cracked_deepslate_bricks", + "deepslate_tiles", + "cracked_deepslate_tiles", + "chiseled_deepslate", + "glow_lichen", + "cobbled_deepslate_wall", + "polished_deepslate_wall", + "deepslate_brick_wall", + "deepslate_tile_wall", + "light", + "dirt_path", + "cobbled_deepslate_stairs", + "polished_deepslate_stairs", + "deepslate_brick_stairs", + "deepslate_tile_stairs", + "cobbled_deepslate_slab", + "polished_deepslate_slab", + "deepslate_brick_slab", + "deepslate_tile_slab", + "lightning_rod", + "sculk_sensor", + "amethyst_shard", + "raw_iron", + "raw_copper", + "copper_ingot", + "raw_gold", + "powder_snow_bucket", + "axolotl_bucket", + "bundle", + "spyglass", + "glow_ink_sac", + "axolotl_spawn_egg", + "glow_squid_spawn_egg", + "goat_spawn_egg", + "glow_item_frame", + "glow_berries", + "candle", + "white_candle", + "orange_candle", + "magenta_candle", + "light_blue_candle", + "yellow_candle", + "lime_candle", + "pink_candle", + "gray_candle", + "light_gray_candle", + "cyan_candle", + "purple_candle", + "blue_candle", + "brown_candle", + "green_candle", + "red_candle", + "black_candle", + "small_amethyst_bud", + "medium_amethyst_bud", + "large_amethyst_bud", + "amethyst_cluster", + "pointed_dripstone", + "music_disc_otherside", + "mud", + "mangrove_planks", + "mangrove_propagule", + "mangrove_log", + "mangrove_roots", + "muddy_mangrove_roots", + "stripped_mangrove_log", + "stripped_mangrove_wood", + "mangrove_wood", + "mangrove_leaves", + "mangrove_slab", + "mud_brick_slab", + "mangrove_fence", + "packed_mud", + "mud_bricks", + "reinforced_deepslate", + "mud_brick_stairs", + "sculk", + "sculk_vein", + "sculk_catalyst", + "sculk_shrieker", + "mangrove_stairs", + "mud_brick_wall", + "mangrove_button", + "mangrove_pressure_plate", + "mangrove_door", + "mangrove_trapdoor", + "mangrove_fence_gate", + "oak_chest_boat", + "spruce_chest_boat", + "birch_chest_boat", + "jungle_chest_boat", + "acacia_chest_boat", + "dark_oak_chest_boat", + "mangrove_boat", + "mangrove_chest_boat", + "mangrove_sign", + "tadpole_bucket", + "recovery_compass", + "allay_spawn_egg", + "frog_spawn_egg", + "tadpole_spawn_egg", + "warden_spawn_egg", + "music_disc_5", + "disc_fragment_5", + "goat_horn", + "ochre_froglight", + "verdant_froglight", + "pearlescent_froglight", + "frogspawn", + "echo_shard", + "bamboo_planks", + "bamboo_mosaic", + "bamboo_block", + "stripped_bamboo_block", + "bamboo_slab", + "bamboo_mosaic_slab", + "chiseled_bookshelf", + "bamboo_fence", + "bamboo_stairs", + "bamboo_mosaic_stairs", + "bamboo_button", + "bamboo_pressure_plate", + "bamboo_door", + "bamboo_trapdoor", + "bamboo_fence_gate", + "bamboo_raft", + "bamboo_chest_raft", + "bamboo_sign", + "oak_hanging_sign", + "spruce_hanging_sign", + "birch_hanging_sign", + "jungle_hanging_sign", + "acacia_hanging_sign", + "dark_oak_hanging_sign", + "mangrove_hanging_sign", + "bamboo_hanging_sign", + "crimson_hanging_sign", + "warped_hanging_sign", + "camel_spawn_egg", + "ender_dragon_spawn_egg", + "iron_golem_spawn_egg", + "snow_golem_spawn_egg", + "wither_spawn_egg", + "piglin_head", + "cherry_planks", + "cherry_sapling", + "suspicious_sand", + "cherry_log", + "stripped_cherry_log", + "stripped_cherry_wood", + "cherry_wood", + "cherry_leaves", + "torchflower", + "pink_petals", + "cherry_slab", + "decorated_pot", + "cherry_fence", + "cherry_stairs", + "cherry_button", + "cherry_pressure_plate", + "cherry_door", + "cherry_trapdoor", + "cherry_fence_gate", + "cherry_boat", + "cherry_chest_boat", + "cherry_sign", + "cherry_hanging_sign", + "sniffer_spawn_egg", + "torchflower_seeds", + "brush", + "netherite_upgrade_smithing_template", + "sentry_armor_trim_smithing_template", + "dune_armor_trim_smithing_template", + "coast_armor_trim_smithing_template", + "wild_armor_trim_smithing_template", + "ward_armor_trim_smithing_template", + "eye_armor_trim_smithing_template", + "vex_armor_trim_smithing_template", + "tide_armor_trim_smithing_template", + "snout_armor_trim_smithing_template", + "rib_armor_trim_smithing_template", + "spire_armor_trim_smithing_template", + "pottery_shard_archer", + "pottery_shard_prize", + "pottery_shard_arms_up", + "pottery_shard_skull", + "suspicious_gravel", + "pitcher_plant", + "sniffer_egg", + "calibrated_sculk_sensor", + "pitcher_pod", + "music_disc_relic", + "wayfinder_armor_trim_smithing_template", + "shaper_armor_trim_smithing_template", + "silence_armor_trim_smithing_template", + "raiser_armor_trim_smithing_template", + "host_armor_trim_smithing_template", + "angler_pottery_sherd", + "archer_pottery_sherd", + "arms_up_pottery_sherd", + "blade_pottery_sherd", + "brewer_pottery_sherd", + "burn_pottery_sherd", + "danger_pottery_sherd", + "explorer_pottery_sherd", + "friend_pottery_sherd", + "heart_pottery_sherd", + "heartbreak_pottery_sherd", + "howl_pottery_sherd", + "miner_pottery_sherd", + "mourner_pottery_sherd", + "plenty_pottery_sherd", + "prize_pottery_sherd", + "sheaf_pottery_sherd", + "shelter_pottery_sherd", + "skull_pottery_sherd", + "snort_pottery_sherd", + "tuff_slab", + "tuff_stairs", + "tuff_wall", + "chiseled_tuff", + "polished_tuff", + "polished_tuff_slab", + "polished_tuff_stairs", + "polished_tuff_wall", + "tuff_bricks", + "tuff_brick_slab", + "tuff_brick_stairs", + "tuff_brick_wall", + "chiseled_tuff_bricks", + "chiseled_copper", + "exposed_chiseled_copper", + "weathered_chiseled_copper", + "oxidized_chiseled_copper", + "waxed_chiseled_copper", + "waxed_exposed_chiseled_copper", + "waxed_weathered_chiseled_copper", + "waxed_oxidized_chiseled_copper", + "short_grass", + "copper_door", + "exposed_copper_door", + "weathered_copper_door", + "oxidized_copper_door", + "waxed_copper_door", + "waxed_exposed_copper_door", + "waxed_weathered_copper_door", + "waxed_oxidized_copper_door", + "copper_trapdoor", + "exposed_copper_trapdoor", + "weathered_copper_trapdoor", + "oxidized_copper_trapdoor", + "waxed_copper_trapdoor", + "waxed_exposed_copper_trapdoor", + "waxed_weathered_copper_trapdoor", + "waxed_oxidized_copper_trapdoor", + "crafter", + "breeze_spawn_egg", + "copper_grate", + "exposed_copper_grate", + "weathered_copper_grate", + "oxidized_copper_grate", + "waxed_copper_grate", + "waxed_exposed_copper_grate", + "waxed_weathered_copper_grate", + "waxed_oxidized_copper_grate", + "copper_bulb", + "exposed_copper_bulb", + "weathered_copper_bulb", + "oxidized_copper_bulb", + "waxed_copper_bulb", + "waxed_exposed_copper_bulb", + "waxed_weathered_copper_bulb", + "waxed_oxidized_copper_bulb", + "trial_spawner", + "trial_key", + "heavy_core", + "turtle_scute", + "armadillo_scute", + "wolf_armor", + "armadillo_spawn_egg", + "bogged_spawn_egg", + "wind_charge", + "mace", + "flow_banner_pattern", + "guster_banner_pattern", + "flow_armor_trim_smithing_template", + "bolt_armor_trim_smithing_template", + "flow_pottery_sherd", + "guster_pottery_sherd", + "scrape_pottery_sherd", + "ominous_trial_key", + "vault", + "ominous_bottle", + "breeze_rod", + "soul_fire_torch", + "soul_fire_lantern", + "netherite_stairs", + "book_box", + "footprint", + "cursor", + "fine_item", + "red_key", + "blue_key", + "yellow_key", + "3d" + ], + "particles": [ + "ambient_entity_effect", + "angry_villager", + "barrier", + "block", + "bubble", + "cloud", + "crit", + "damage_indicator", + "dragon_breath", + "dripping_lava", + "dripping_water", + "dust", + "effect", + "elder_guardian", + "enchanted_hit", + "enchant", + "end_rod", + "entity_effect", + "explosion_emitter", + "explosion", + "falling_dust", + "firework", + "fishing", + "flame", + "happy_villager", + "heart", + "instant_effect", + "item", + "item_slime", + "item_snowball", + "large_smoke", + "lava", + "mycelium", + "note", + "poof", + "portal", + "rain", + "smoke", + "spit", + "squid_ink", + "sweep_attack", + "totem_of_undying", + "underwater", + "splash", + "witch", + "bubble_pop", + "current_down", + "bubble_column_up", + "nautilus", + "dolphin", + "falling_lava", + "landing_lava", + "falling_water", + "flash", + "composter", + "sneeze", + "campfire_cosy_smoke", + "campfire_signal_smoke", + "dripping_honey", + "falling_honey", + "landing_honey", + "falling_nectar", + "soul_fire_flame", + "soul", + "ash", + "crimson_spore", + "warped_spore", + "dripping_obsidian_tear", + "falling_obsidian_tear", + "landing_obsidian_tear", + "reverse_portal", + "white_ash", + "light", + "dust_color_transition", + "vibration", + "falling_spore_blossom", + "spore_blossom_air", + "small_flame", + "snowflake", + "dripping_dripstone_lava", + "falling_dripstone_lava", + "dripping_dripstone_water", + "falling_dripstone_water", + "glow_squid_ink", + "glow", + "wax_on", + "wax_off", + "electric_spark", + "scrape", + "block_marker", + "sonic_boom", + "sculk_soul", + "sculk_charge", + "sculk_charge_pop", + "shriek", + "dripping_cherry_leaves", + "falling_cherry_leaves", + "landing_cherry_leaves", + "cherry_leaves", + "egg_crack", + "gust", + "gust_emitter", + "white_smoke", + "dust_plume", + "gust_dust", + "trial_spawner_detection", + "small_gust", + "gust_emitter_large", + "gust_emitter_small", + "infested", + "item_cobweb", + "trial_spawner_detection_ominous", + "vault_connection", + "dust_pillar", + "ominous_spawning", + "raid_omen", + "trial_omen" + ], + "entities": [ + "area_effect_cloud", + "armor_stand", + "arrow", + "axolotl", + "bat", + "bee", + "blaze", + "boat", + "cat", + "cave_spider", + "chicken", + "cod", + "cow", + "creeper", + "dolphin", + "donkey", + "dragon_fireball", + "drowned", + "elder_guardian", + "end_crystal", + "ender_dragon", + "enderman", + "endermite", + "evoker", + "evoker_fangs", + "experience_orb", + "eye_of_ender", + "falling_block", + "firework_rocket", + "fox", + "ghast", + "giant", + "glow_item_frame", + "glow_squid", + "goat", + "guardian", + "hoglin", + "horse", + "husk", + "illusioner", + "iron_golem", + "item", + "item_frame", + "fireball", + "leash_knot", + "lightning_bolt", + "llama", + "llama_spit", + "magma_cube", + "marker", + "minecart", + "chest_minecart", + "command_block_minecart", + "furnace_minecart", + "hopper_minecart", + "spawner_minecart", + "tnt_minecart", + "mule", + "mooshroom", + "ocelot", + "painting", + "panda", + "parrot", + "phantom", + "pig", + "piglin", + "piglin_brute", + "pillager", + "polar_bear", + "tnt", + "pufferfish", + "rabbit", + "ravager", + "salmon", + "sheep", + "shulker", + "shulker_bullet", + "silverfish", + "skeleton", + "skeleton_horse", + "slime", + "small_fireball", + "snow_golem", + "snowball", + "spectral_arrow", + "spider", + "squid", + "stray", + "strider", + "egg", + "ender_pearl", + "experience_bottle", + "potion", + "trident", + "trader_llama", + "tropical_fish", + "turtle", + "vex", + "villager", + "vindicator", + "wandering_trader", + "witch", + "wither", + "wither_skeleton", + "wither_skull", + "wolf", + "zoglin", + "zombie", + "zombie_horse", + "zombie_villager", + "zombified_piglin", + "player", + "fishing_bobber", + "allay", + "chest_boat", + "frog", + "tadpole", + "warden", + "camel", + "block_display", + "interaction", + "item_display", + "sniffer", + "text_display", + "breeze", + "wind_charge", + "armadillo", + "bogged", + "breeze_wind_charge", + "ominous_item_spawner", + "zombie_pigman" + ], + "argumenttypes": [ + "brigadier:bool", + "brigadier:float", + "brigadier:double", + "brigadier:integer", + "brigadier:long", + "brigadier:string", + "entity", + "game_profile", + "block_pos", + "column_pos", + "vec3", + "vec2", + "block_state", + "block_predicate", + "item_stack", + "item_predicate", + "color", + "component", + "message", + "nbt_compound_tag", + "nbt_tag", + "nbt_path", + "objective", + "objective_criteria", + "operation", + "particle", + "angle", + "rotation", + "scoreboard_slot", + "score_holder", + "swizzle", + "team", + "item_slot", + "resource_location", + "mob_effect", + "function", + "entity_anchor", + "int_range", + "float_range", + "item_enchantment", + "entity_summon", + "dimension", + "time", + "uuid", + "resource", + "resource_or_tag", + "template_mirror", + "template_rotation", + "gamemode", + "resource_or_tag_key", + "resource_key", + "heightmap", + "style", + "item_slots", + "loot_table", + "loot_predicate", + "loot_modifier" + ], + "recipe_serializers": [ + "crafting_shaped", + "crafting_shapeless", + "crafting_special_armordye", + "crafting_special_bookcloning", + "crafting_special_mapcloning", + "crafting_special_mapextending", + "crafting_special_firework_rocket", + "crafting_special_firework_star", + "crafting_special_firework_star_fade", + "crafting_special_tippedarrow", + "crafting_special_bannerduplicate", + "crafting_special_shielddecoration", + "crafting_special_shulkerboxcoloring", + "crafting_special_suspiciousstew", + "crafting_special_repairitem", + "smelting", + "blasting", + "smoking", + "campfire_cooking", + "stonecutting", + "smithing_transform", + "smithing_trim", + "crafting_decorated_pot" + ], + "data_component_type": [ + "custom_data", + "max_stack_size", + "max_damage", + "damage", + "unbreakable", + "custom_name", + "item_name", + "lore", + "rarity", + "enchantments", + "can_place_on", + "can_break", + "attribute_modifiers", + "custom_model_data", + "hide_additional_tooltip", + "hide_tooltip", + "repair_cost", + "creative_slot_lock", + "enchantment_glint_override", + "intangible_projectile", + "food", + "fire_resistant", + "tool", + "stored_enchantments", + "dyed_color", + "map_color", + "map_id", + "map_decorations", + "map_post_processing", + "charged_projectiles", + "bundle_contents", + "potion_contents", + "suspicious_stew_effects", + "writable_book_content", + "written_book_content", + "trim", + "debug_stick_state", + "entity_data", + "bucket_entity_data", + "block_entity_data", + "instrument", + "ominous_bottle_amplifier", + "recipes", + "lodestone_tracker", + "firework_explosion", + "fireworks", + "profile", + "note_block_sound", + "banner_patterns", + "base_color", + "pot_decorations", + "container", + "block_state", + "bees", + "lock", + "container_loot" + ] +} \ No newline at end of file diff --git a/output/backwards/mappings-1.20.5to1.20.3.nbt b/output/backwards/mappings-1.20.5to1.20.3.nbt index 9cf244d..d977aac 100644 Binary files a/output/backwards/mappings-1.20.5to1.20.3.nbt and b/output/backwards/mappings-1.20.5to1.20.3.nbt differ diff --git a/output/identifiers-1.10.nbt b/output/identifiers-1.10.nbt deleted file mode 100644 index 3e6fd1a..0000000 Binary files a/output/identifiers-1.10.nbt and /dev/null differ diff --git a/output/identifiers-1.11.nbt b/output/identifiers-1.11.nbt deleted file mode 100644 index 3e6fd1a..0000000 Binary files a/output/identifiers-1.11.nbt and /dev/null differ diff --git a/output/identifiers-1.12.nbt b/output/identifiers-1.12.nbt deleted file mode 100644 index 3e6fd1a..0000000 Binary files a/output/identifiers-1.12.nbt and /dev/null differ diff --git a/output/identifiers-1.13.2.nbt b/output/identifiers-1.13.2.nbt index 13c2f9e..10afd3a 100644 Binary files a/output/identifiers-1.13.2.nbt and b/output/identifiers-1.13.2.nbt differ diff --git a/output/identifiers-1.13.nbt b/output/identifiers-1.13.nbt index 13c2f9e..f86defc 100644 Binary files a/output/identifiers-1.13.nbt and b/output/identifiers-1.13.nbt differ diff --git a/output/identifiers-1.14.nbt b/output/identifiers-1.14.nbt index de36e31..2fa2634 100644 Binary files a/output/identifiers-1.14.nbt and b/output/identifiers-1.14.nbt differ diff --git a/output/identifiers-1.15.nbt b/output/identifiers-1.15.nbt index 8449cdc..bd172f5 100644 Binary files a/output/identifiers-1.15.nbt and b/output/identifiers-1.15.nbt differ diff --git a/output/identifiers-1.16.2.nbt b/output/identifiers-1.16.2.nbt index df5f7f4..b912675 100644 Binary files a/output/identifiers-1.16.2.nbt and b/output/identifiers-1.16.2.nbt differ diff --git a/output/identifiers-1.16.nbt b/output/identifiers-1.16.nbt index df5f7f4..afe3aaa 100644 Binary files a/output/identifiers-1.16.nbt and b/output/identifiers-1.16.nbt differ diff --git a/output/identifiers-1.17.nbt b/output/identifiers-1.17.nbt index b3943ad..efd5bb7 100644 Binary files a/output/identifiers-1.17.nbt and b/output/identifiers-1.17.nbt differ diff --git a/output/identifiers-1.18.nbt b/output/identifiers-1.18.nbt index d40bb7c..26eeb3a 100644 Binary files a/output/identifiers-1.18.nbt and b/output/identifiers-1.18.nbt differ diff --git a/output/identifiers-1.19.3.nbt b/output/identifiers-1.19.3.nbt index fdeffae..c509d58 100644 Binary files a/output/identifiers-1.19.3.nbt and b/output/identifiers-1.19.3.nbt differ diff --git a/output/identifiers-1.19.4.nbt b/output/identifiers-1.19.4.nbt index 6dc8ff5..7ddba93 100644 Binary files a/output/identifiers-1.19.4.nbt and b/output/identifiers-1.19.4.nbt differ diff --git a/output/identifiers-1.19.nbt b/output/identifiers-1.19.nbt index 3127b9f..9167274 100644 Binary files a/output/identifiers-1.19.nbt and b/output/identifiers-1.19.nbt differ diff --git a/output/identifiers-1.20.2.nbt b/output/identifiers-1.20.2.nbt index f59871f..5c47b3c 100644 Binary files a/output/identifiers-1.20.2.nbt and b/output/identifiers-1.20.2.nbt differ diff --git a/output/identifiers-1.20.3.nbt b/output/identifiers-1.20.3.nbt index 2d65b5b..cee36b3 100644 Binary files a/output/identifiers-1.20.3.nbt and b/output/identifiers-1.20.3.nbt differ diff --git a/output/identifiers-1.20.5.nbt b/output/identifiers-1.20.5.nbt index 6b04431..0a8f5c0 100644 Binary files a/output/identifiers-1.20.5.nbt and b/output/identifiers-1.20.5.nbt differ diff --git a/output/identifiers-1.20.nbt b/output/identifiers-1.20.nbt index f59871f..5c47b3c 100644 Binary files a/output/identifiers-1.20.nbt and b/output/identifiers-1.20.nbt differ diff --git a/output/identifiers-1.9.4.nbt b/output/identifiers-1.9.4.nbt deleted file mode 100644 index 3e6fd1a..0000000 Binary files a/output/identifiers-1.9.4.nbt and /dev/null differ diff --git a/output/special/identifiers-20w14infinite.nbt b/output/special/identifiers-20w14infinite.nbt index 431d3bb..647fa72 100644 Binary files a/output/special/identifiers-20w14infinite.nbt and b/output/special/identifiers-20w14infinite.nbt differ diff --git a/output/special/identifiers-3D_Shareware.nbt b/output/special/identifiers-3D_Shareware.nbt index 8c5470a..1d6568d 100644 Binary files a/output/special/identifiers-3D_Shareware.nbt and b/output/special/identifiers-3D_Shareware.nbt differ diff --git a/output_hashes.json b/output_hashes.json new file mode 100644 index 0000000..0e0dcd2 --- /dev/null +++ b/output_hashes.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/src/main/java/com/viaversion/mappingsgenerator/MappingsOptimizer.java b/src/main/java/com/viaversion/mappingsgenerator/MappingsOptimizer.java index f6b92c2..069b7c9 100644 --- a/src/main/java/com/viaversion/mappingsgenerator/MappingsOptimizer.java +++ b/src/main/java/com/viaversion/mappingsgenerator/MappingsOptimizer.java @@ -20,8 +20,6 @@ package com.viaversion.mappingsgenerator; import com.github.steveice10.opennbt.tag.builtin.CompoundTag; import com.github.steveice10.opennbt.tag.builtin.IntArrayTag; -import com.github.steveice10.opennbt.tag.builtin.ListTag; -import com.github.steveice10.opennbt.tag.builtin.StringTag; import com.github.steveice10.opennbt.tag.builtin.Tag; import com.github.steveice10.opennbt.tag.io.NBTIO; import com.github.steveice10.opennbt.tag.io.TagWriter; @@ -33,7 +31,8 @@ import com.viaversion.mappingsgenerator.util.JsonConverter; import com.viaversion.mappingsgenerator.util.Version; import it.unimi.dsi.fastutil.ints.Int2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMap; - +import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +import java.io.BufferedWriter; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -41,7 +40,6 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Set; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,10 +56,12 @@ public final class MappingsOptimizer { public static final Path MAPPINGS_DIR = Path.of("mappings"); public static final Path OUTPUT_DIR = Path.of("output"); public static final Path OUTPUT_BACKWARDS_DIR = OUTPUT_DIR.resolve("backwards"); + public static final String GLOBAL_IDENTIFIERS_FILE = "identifier-table.json"; public static final String DIFF_FILE_FORMAT = "mapping-%sto%s.json"; public static final String MAPPING_FILE_FORMAT = "mapping-%s.json"; public static final String OUTPUT_FILE_FORMAT = "mappings-%sto%s.nbt"; public static final String OUTPUT_IDENTIFIERS_FILE_FORMAT = "identifiers-%s.nbt"; + public static final String OUTPUT_GLOBAL_IDENTIFIERS_FILE = "identifier-table.nbt"; private static final Logger LOGGER = LoggerFactory.getLogger(MappingsOptimizer.class.getSimpleName()); private static final TagWriter TAG_WRITER = NBTIO.writer().named(); @@ -81,7 +81,8 @@ public final class MappingsOptimizer { "tags", "attributes" ); - private static final Set SAVED_IDENTIFIER_FILES = new HashSet<>(); + private static final Set savedIdentifierFiles = new HashSet<>(); + private static JsonObject globalIdentifiersObject; private final Set ignoreMissing = new HashSet<>(Arrays.asList("blocks", "statistics")); private final CompoundTag output = new CompoundTag(); @@ -94,6 +95,7 @@ public final class MappingsOptimizer { private ErrorStrategy errorStrategy = ErrorStrategy.WARN; private JsonObject diffObject; private boolean keepUnknownFields; + private boolean updatedGlobalIdentifiers; public static void main(final String[] args) throws IOException { if (args.length < 2) { @@ -118,6 +120,18 @@ public final class MappingsOptimizer { optimizer.optimizeAndWrite(); } + private JsonObject loadGlobalIdentifiers() { + // Load and reuse identifiers file, being a global table across all versions + if (globalIdentifiersObject == null) { + try { + return MappingsLoader.load(MAPPINGS_DIR, GLOBAL_IDENTIFIERS_FILE); + } catch (final IOException e) { + throw new RuntimeException("Failed to load global identifiers", e); + } + } + return globalIdentifiersObject; + } + public MappingsOptimizer(final String from, final String to) throws IOException { this(from, to, false); } @@ -157,6 +171,8 @@ public final class MappingsOptimizer { } diffObject = MappingsLoader.load(getDiffDir(), DIFF_FILE_FORMAT.formatted(from, to)); + + globalIdentifiersObject = loadGlobalIdentifiers(); } /** @@ -189,8 +205,8 @@ public final class MappingsOptimizer { names("items", "itemnames"); names("enchantments", "enchantmentnames"); fullNames("entitynames", "entitynames"); - if (backwards) { + // No need to put sounds into the identifier files, so just use full names fullNames("sounds", "soundnames"); } @@ -252,14 +268,27 @@ public final class MappingsOptimizer { public void saveIdentifierFiles(final String version, final JsonObject object) throws IOException { final CompoundTag identifiers = new CompoundTag(); storeIdentifiers(identifiers, object, "entities"); + storeIdentifiers(identifiers, object, "items"); storeIdentifiers(identifiers, object, "particles"); storeIdentifiers(identifiers, object, "argumenttypes"); storeIdentifiers(identifiers, object, "recipe_serializers"); storeIdentifiers(identifiers, object, "data_component_type"); - if (SAVED_IDENTIFIER_FILES.add(version)) { + + // No need to save the same identifiers multiple times if one version appears in multiple runs + if (savedIdentifierFiles.add(version) && !identifiers.isEmpty()) { final Path outputDir = special ? OUTPUT_DIR.resolve("special") : OUTPUT_DIR; write(identifiers, outputDir.resolve(OUTPUT_IDENTIFIERS_FILE_FORMAT.formatted(version))); } + + // Update global identifiers file if necessary + if (updatedGlobalIdentifiers) { + try (final BufferedWriter writer = Files.newBufferedWriter(MAPPINGS_DIR.resolve(GLOBAL_IDENTIFIERS_FILE))) { + MappingsGenerator.GSON.toJson(globalIdentifiersObject, writer); + } + write((CompoundTag) JsonConverter.toTag(globalIdentifiersObject), OUTPUT_DIR.resolve(OUTPUT_GLOBAL_IDENTIFIERS_FILE)); + updatedGlobalIdentifiers = false; + LOGGER.info("Updated global identifiers file"); + } } /** @@ -434,28 +463,63 @@ public final class MappingsOptimizer { } /** - * Stores a list of string identifiers in the given tag. + * Stores a list of global identifier indexes in the given tag. * * @param tag tag to write to * @param object object to read identifiers from * @param key to read from and write to */ - private static void storeIdentifiers( + private void storeIdentifiers( final CompoundTag tag, final JsonObject object, final String key ) { - final JsonArray identifiers = object.getAsJsonArray(key); - if (identifiers == null) { + final JsonElement identifiersElement = object.get(key); + if (identifiersElement == null) { return; } - final ListTag list = new ListTag<>(StringTag.class); - for (final JsonElement identifier : identifiers) { - list.add(new StringTag(identifier.getAsString())); + if (identifiersElement.isJsonObject()) { + // Pre 1.13 + LOGGER.debug("Identifiers for {} are not an array", key); + return; } - tag.put(key, list); + // Add to global identifiers if not already present + final JsonArray identifiers = identifiersElement.getAsJsonArray(); + JsonArray globalIdentifiersArray = globalIdentifiersObject.getAsJsonArray(key); + if (globalIdentifiersArray == null) { + globalIdentifiersArray = new JsonArray(); + globalIdentifiersObject.add(key, globalIdentifiersArray); + } + + final Object2IntMap globalIdentifiers = new Object2IntOpenHashMap<>(globalIdentifiersArray.size()); + globalIdentifiers.defaultReturnValue(-1); + for (int globalId = 0; globalId < globalIdentifiersArray.size(); globalId++) { + final String identifier = globalIdentifiersArray.get(globalId).getAsString(); + globalIdentifiers.put(identifier, globalId); + } + + for (int id = 0; id < identifiers.size(); id++) { + final JsonElement entry = identifiers.get(id); + if (entry.isJsonNull()) { + continue; + } + + final String identifier = entry.getAsString(); + if (globalIdentifiers.containsKey(identifier)) { + continue; + } + + final int addedGlobalIndex = globalIdentifiersArray.size(); + globalIdentifiersArray.add(identifier); + globalIdentifiers.put(identifier, addedGlobalIndex); + updatedGlobalIdentifiers = true; + } + + // Use the same compact storage on the identifier->global identifier files, just about halves the size + final MappingsResult result = MappingsLoader.map(identifiers, globalIdentifiersArray, null, errorStrategy); + serialize(result, tag, key, true); } /** diff --git a/src/main/java/com/viaversion/mappingsgenerator/extra/ItemsAndBlocks1_20_3.java b/src/main/java/com/viaversion/mappingsgenerator/extra/ItemsAndBlocks1_20_3.java index 5384040..e628bc7 100644 --- a/src/main/java/com/viaversion/mappingsgenerator/extra/ItemsAndBlocks1_20_3.java +++ b/src/main/java/com/viaversion/mappingsgenerator/extra/ItemsAndBlocks1_20_3.java @@ -36,7 +36,6 @@ public final class ItemsAndBlocks1_20_3 { public static void main(final String[] args) throws IOException { final JsonObject mappings = MappingsLoader.load("mapping-1.20.3.json"); final CompoundTag tag = new CompoundTag(); - tag.put("items", collectStringList(mappings.getAsJsonArray("items"))); tag.put("blocks", collectStringList(mappings.getAsJsonArray("blocks"))); tag.put("sounds", collectStringList(mappings.getAsJsonArray("sounds"))); MappingsOptimizer.write(tag, MappingsOptimizer.OUTPUT_DIR.resolve("extra/extra-identifiers-1.20.3.nbt"));