diff --git a/cmd/genblocks/main.go b/cmd/genblocks/main.go new file mode 100644 index 0000000..a920e22 --- /dev/null +++ b/cmd/genblocks/main.go @@ -0,0 +1,39 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" +) + +func main() { + f, err := os.Open("generated/reports/blocks.json") + if err != nil { + panic(err) + } + var data map[string]struct { + States []struct { + ID int `json:"id"` + Default bool `json:"default"` + } `json:"states"` + } + if err := json.NewDecoder(f).Decode(&data); err != nil { + panic(err) + } + + out, _ := os.Create("internal/worldgen/generated_blocks.go") + fmt.Fprintln(out, "package worldgen") + fmt.Fprintln(out, "") + fmt.Fprintln(out, "// defaultBlockIDs maps block names to their default state ID.") + fmt.Fprintln(out, "var defaultBlockIDs = map[string]uint16{") + + for name, block := range data { + for _, state := range block.States { + if state.Default { + fmt.Fprintf(out, "\t%q: %d,\n", name, state.ID) + } + } + } + fmt.Fprintln(out, "}") + out.Close() +} diff --git a/internal/world/vanilla.go b/internal/world/vanilla.go index 4b120c7..ebacad8 100644 --- a/internal/world/vanilla.go +++ b/internal/world/vanilla.go @@ -111,7 +111,7 @@ func generateVanilla(od *worldgen.OverworldDensity, seed int64, cx, cz int32) *C } } fillBiomes3D(c, od, s2D, baseX, baseZ) - decorate(c, cx, cz, seed, &surfTop, &grass, &biomeName) + decorate(c, od, cx, cz, seed, &surfTop, &grass, &biomeName) return c } @@ -300,7 +300,7 @@ func bedrockAt(rng chunkRand, d int) bool { // decorate places simple oak trees on grassy columns. Trunks are kept two // blocks inside the chunk so the radius-2 canopy never crosses into a neighbour // (avoiding cross-chunk coordination); placement is deterministic per chunk. -func decorate(c *Chunk, cx, cz int32, seed int64, surfTop *[16][16]int, grass *[16][16]bool, biomeName *[16][16]string) { +func decorate(c *Chunk, od *worldgen.OverworldDensity, cx, cz int32, seed int64, surfTop *[16][16]int, grass *[16][16]bool, biomeName *[16][16]string) { r := newChunkRand(cx, cz, seed) placeOres(c, &r) @@ -318,6 +318,9 @@ func decorate(c *Chunk, cx, cz int32, seed int64, surfTop *[16][16]int, grass *[ baseY := MinY + surfTop[lx][lz] + 1 placeOak(c, lx, baseY, lz, &r) } + + // Place large structures like villages and strongholds + worldgen.PlaceStructures(c, od, cx, cz, seed, surfTop, biomeName) } func placeOak(c *Chunk, lx, baseY, lz int, r *chunkRand) { diff --git a/internal/worldgen/data/structure/village/plains/houses/plains_small_house_1.nbt b/internal/worldgen/data/structure/village/plains/houses/plains_small_house_1.nbt new file mode 100644 index 0000000..64d7d82 Binary files /dev/null and b/internal/worldgen/data/structure/village/plains/houses/plains_small_house_1.nbt differ diff --git a/internal/worldgen/data/structure/village/plains/houses/plains_small_house_2.nbt b/internal/worldgen/data/structure/village/plains/houses/plains_small_house_2.nbt new file mode 100644 index 0000000..bde690e Binary files /dev/null and b/internal/worldgen/data/structure/village/plains/houses/plains_small_house_2.nbt differ diff --git a/internal/worldgen/data/structure/village/plains/houses/plains_small_house_3.nbt b/internal/worldgen/data/structure/village/plains/houses/plains_small_house_3.nbt new file mode 100644 index 0000000..048e589 Binary files /dev/null and b/internal/worldgen/data/structure/village/plains/houses/plains_small_house_3.nbt differ diff --git a/internal/worldgen/data/structure/village/plains/streets/straight_01.nbt b/internal/worldgen/data/structure/village/plains/streets/straight_01.nbt new file mode 100644 index 0000000..3dea9e8 Binary files /dev/null and b/internal/worldgen/data/structure/village/plains/streets/straight_01.nbt differ diff --git a/internal/worldgen/data/structure/village/plains/town_centers/plains_meeting_point_1.nbt b/internal/worldgen/data/structure/village/plains/town_centers/plains_meeting_point_1.nbt new file mode 100644 index 0000000..327d049 Binary files /dev/null and b/internal/worldgen/data/structure/village/plains/town_centers/plains_meeting_point_1.nbt differ diff --git a/internal/worldgen/generated_blocks.go b/internal/worldgen/generated_blocks.go new file mode 100644 index 0000000..94ad2d4 --- /dev/null +++ b/internal/worldgen/generated_blocks.go @@ -0,0 +1,1173 @@ +package worldgen + +// defaultBlockIDs maps block names to their default state ID. +var defaultBlockIDs = map[string]uint16{ + "minecraft:attached_pumpkin_stem": 8334, + "minecraft:big_dripleaf_stem": 27896, + "minecraft:bubble_coral_fan": 15181, + "minecraft:dark_oak_log": 155, + "minecraft:glow_lichen": 8517, + "minecraft:nether_wart": 9447, + "minecraft:target": 21752, + "minecraft:conduit": 15276, + "minecraft:potted_oak_sapling": 10631, + "minecraft:waxed_copper_bars": 8149, + "minecraft:dead_brain_coral": 15149, + "minecraft:green_shulker_box": 14952, + "minecraft:lime_bed": 2014, + "minecraft:oxidized_copper_grate": 27054, + "minecraft:black_stained_glass": 7113, + "minecraft:budding_amethyst": 23403, + "minecraft:deepslate_emerald_ore": 9574, + "minecraft:oak_wood": 202, + "minecraft:obsidian": 3369, + "minecraft:pink_concrete_powder": 15052, + "minecraft:prismarine_bricks": 12632, + "minecraft:acacia_sapling": 37, + "minecraft:brain_coral": 15159, + "minecraft:dark_oak_fence": 13963, + "minecraft:oak_pressure_plate": 6862, + "minecraft:oak_trapdoor": 7129, + "minecraft:tall_dry_grass": 2253, + "minecraft:bamboo_shelf": 2673, + "minecraft:chiseled_quartz_block": 11324, + "minecraft:cyan_stained_glass": 7107, + "minecraft:golden_dandelion": 2322, + "minecraft:green_bed": 2142, + "minecraft:orange_tulip": 2329, + "minecraft:player_head": 11051, + "minecraft:waxed_exposed_copper_grate": 27058, + "minecraft:end_portal": 9468, + "minecraft:oak_leaves": 279, + "minecraft:red_concrete": 15044, + "minecraft:soul_wall_torch": 7007, + "minecraft:tube_coral": 15157, + "minecraft:warped_fungus": 20958, + "minecraft:warped_hanging_sign": 6532, + "minecraft:waxed_oxidized_cut_copper_stairs": 25690, + "minecraft:stone_brick_wall": 18117, + "minecraft:andesite_slab": 16473, + "minecraft:chiseled_sandstone": 579, + "minecraft:oak_log": 137, + "minecraft:orange_wall_banner": 13187, + "minecraft:purple_stained_glass": 7108, + "minecraft:small_dripleaf": 27906, + "minecraft:glowstone": 7016, + "minecraft:infested_stone": 7760, + "minecraft:short_grass": 2248, + "minecraft:black_stained_glass_pane": 11971, + "minecraft:cyan_wall_banner": 13219, + "minecraft:piston": 2263, + "minecraft:birch_sapling": 33, + "minecraft:cherry_shelf": 2801, + "minecraft:granite": 2, + "minecraft:green_banner": 13143, + "minecraft:polished_blackstone_wall": 22772, + "minecraft:polished_tuff_slab": 23867, + "minecraft:brown_carpet": 12908, + "minecraft:orange_wool": 2294, + "minecraft:sculk": 25170, + "minecraft:waxed_weathered_copper_golem_statue": 27480, + "minecraft:copper_wall_torch": 7012, + "minecraft:oxidized_copper": 25312, + "minecraft:red_terracotta": 11458, + "minecraft:bamboo_pressure_plate": 6880, + "minecraft:purple_concrete_powder": 15056, + "minecraft:warped_fence_gate": 21281, + "minecraft:waxed_weathered_copper_grate": 27060, + "minecraft:crimson_stem": 20963, + "minecraft:granite_wall": 17793, + "minecraft:magenta_glazed_terracotta": 14974, + "minecraft:nether_brick_wall": 18765, + "minecraft:netherite_block": 21818, + "minecraft:oak_stairs": 3918, + "minecraft:packed_mud": 7758, + "minecraft:stone_brick_slab": 13441, + "minecraft:bamboo_sign": 5640, + "minecraft:acacia_trapdoor": 7385, + "minecraft:allium": 2326, + "minecraft:cherry_button": 10804, + "minecraft:magenta_bed": 1966, + "minecraft:void_air": 15292, + "minecraft:waxed_oxidized_copper_bars": 8245, + "minecraft:creeper_head": 11091, + "minecraft:dead_fire_coral_wall_fan": 15211, + "minecraft:gray_stained_glass": 7105, + "minecraft:horn_coral_wall_fan": 15259, + "minecraft:pale_moss_block": 29703, + "minecraft:potted_acacia_sapling": 10635, + "minecraft:spruce_shelf": 3249, + "minecraft:stripped_spruce_log": 172, + "minecraft:bamboo_block": 169, + "minecraft:barrier": 12534, + "minecraft:copper_chest": 27096, + "minecraft:exposed_cut_copper": 25317, + "minecraft:pale_oak_door": 14455, + "minecraft:twisting_vines_plant": 21030, + "minecraft:weathered_copper_grate": 27052, + "minecraft:cave_air": 15293, + "minecraft:crimson_button": 21475, + "minecraft:warped_stairs": 21397, + "minecraft:waxed_weathered_copper_bars": 8213, + "minecraft:diamond_ore": 5307, + "minecraft:orange_concrete_powder": 15047, + "minecraft:orange_glazed_terracotta": 14970, + "minecraft:blue_candle": 23291, + "minecraft:deepslate_gold_ore": 130, + "minecraft:jungle_wall_sign": 5868, + "minecraft:pearlescent_froglight": 29589, + "minecraft:smoker": 20755, + "minecraft:black_wool": 2308, + "minecraft:dried_ghast": 15106, + "minecraft:light_blue_carpet": 12899, + "minecraft:magenta_candle_cake": 23375, + "minecraft:mangrove_roots": 164, + "minecraft:mangrove_wall_sign": 5892, + "minecraft:warped_hyphae": 20952, + "minecraft:waxed_copper_chest": 27192, + "minecraft:exposed_lightning_rod": 27586, + "minecraft:jungle_log": 146, + "minecraft:oxidized_cut_copper": 25315, + "minecraft:oxidized_cut_copper_stairs": 25338, + "minecraft:test_block": 21738, + "minecraft:crimson_hyphae": 20969, + "minecraft:dead_tube_coral_wall_fan": 15187, + "minecraft:magenta_stained_glass_pane": 11555, + "minecraft:nether_quartz_ore": 11312, + "minecraft:purpur_block": 14712, + "minecraft:end_rod": 14640, + "minecraft:cut_copper_stairs": 25578, + "minecraft:dragon_wall_head": 11148, + "minecraft:lime_stained_glass": 7103, + "minecraft:mangrove_pressure_plate": 6878, + "minecraft:pink_shulker_box": 14910, + "minecraft:polished_tuff_stairs": 23881, + "minecraft:purpur_stairs": 14727, + "minecraft:copper_bars": 8021, + "minecraft:dead_tube_coral_block": 15137, + "minecraft:green_carpet": 12909, + "minecraft:oxidized_copper_bulb": 27078, + "minecraft:stripped_pale_oak_log": 190, + "minecraft:stripped_warped_hyphae": 20955, + "minecraft:warped_roots": 20960, + "minecraft:waxed_lightning_rod": 27658, + "minecraft:brewing_stand": 9459, + "minecraft:jukebox": 6964, + "minecraft:jungle_wood": 211, + "minecraft:light_gray_wall_banner": 13215, + "minecraft:magenta_banner": 12967, + "minecraft:weathered_copper_bars": 8085, + "minecraft:red_banner": 13159, + "minecraft:anvil": 11195, + "minecraft:bee_nest": 21768, + "minecraft:potted_crimson_roots": 21828, + "minecraft:yellow_concrete_powder": 15050, + "minecraft:copper_golem_statue": 27288, + "minecraft:polished_basalt": 7004, + "minecraft:potted_warped_fungus": 21827, + "minecraft:waxed_copper_chain": 8279, + "minecraft:kelp_plant": 15088, + "minecraft:polished_blackstone_stairs": 22668, + "minecraft:brown_stained_glass_pane": 11875, + "minecraft:red_wall_banner": 13239, + "minecraft:warped_planks": 21033, + "minecraft:waxed_copper_lantern": 20864, + "minecraft:acacia_planks": 19, + "minecraft:cobbled_deepslate": 27926, + "minecraft:white_candle": 23115, + "minecraft:copper_block": 25309, + "minecraft:cyan_stained_glass_pane": 11779, + "minecraft:orange_banner": 12951, + "minecraft:tube_coral_fan": 15177, + "minecraft:bookshelf": 2343, + "minecraft:light_gray_shulker_box": 14922, + "minecraft:potted_oxeye_daisy": 10651, + "minecraft:bamboo_hanging_sign": 6660, + "minecraft:orange_stained_glass": 7099, + "minecraft:sandstone_wall": 19737, + "minecraft:water_cauldron": 9461, + "minecraft:weeping_vines": 20977, + "minecraft:jigsaw": 21736, + "minecraft:warped_button": 21499, + "minecraft:waxed_exposed_copper_trapdoor": 26870, + "minecraft:cave_vines": 27757, + "minecraft:cobblestone": 14, + "minecraft:dark_oak_sapling": 41, + "minecraft:pale_oak_sign": 5576, + "minecraft:sculk_shrieker": 25308, + "minecraft:chipped_anvil": 11199, + "minecraft:dispenser": 567, + "minecraft:lectern": 20787, + "minecraft:pumpkin": 8332, + "minecraft:torch": 3370, + "minecraft:cracked_nether_bricks": 23094, + "minecraft:acacia_sign": 5448, + "minecraft:tuff_bricks": 24275, + "minecraft:verdant_froglight": 29586, + "minecraft:weathered_copper_lantern": 20856, + "minecraft:chiseled_tuff": 24274, + "minecraft:polished_blackstone_brick_slab": 22249, + "minecraft:dark_oak_trapdoor": 7513, + "minecraft:deepslate_diamond_ore": 5308, + "minecraft:green_wool": 2306, + "minecraft:packed_ice": 12914, + "minecraft:pale_oak_log": 158, + "minecraft:blackstone_wall": 21915, + "minecraft:cherry_wall_hanging_sign": 6708, + "minecraft:deepslate_tiles": 28748, + "minecraft:iron_block": 2339, + "minecraft:oxidized_copper_bars": 8117, + "minecraft:shulker_box": 14868, + "minecraft:wither_skeleton_wall_skull": 10988, + "minecraft:blue_carpet": 12907, + "minecraft:bamboo_mosaic": 28, + "minecraft:creaking_heart": 3896, + "minecraft:infested_deepslate": 29574, + "minecraft:lime_glazed_terracotta": 14986, + "minecraft:orange_stained_glass_pane": 11523, + "minecraft:waxed_exposed_cut_copper": 25677, + "minecraft:basalt": 7001, + "minecraft:cherry_trapdoor": 7449, + "minecraft:potted_wither_rose": 10654, + "minecraft:purpur_slab": 13477, + "minecraft:dark_oak_fence_gate": 13651, + "minecraft:frogspawn": 29591, + "minecraft:green_candle": 23323, + "minecraft:infested_cracked_stone_bricks": 7764, + "minecraft:peony": 12922, + "minecraft:petrified_oak_slab": 13423, + "minecraft:quartz_bricks": 23095, + "minecraft:stone": 1, + "minecraft:bamboo_wall_hanging_sign": 6764, + "minecraft:coal_block": 12913, + "minecraft:soul_lantern": 20844, + "minecraft:weathered_copper_golem_statue": 27352, + "minecraft:dead_horn_coral_wall_fan": 15219, + "minecraft:hay_block": 12894, + "minecraft:light_gray_concrete": 15038, + "minecraft:open_eyeblossom": 29868, + "minecraft:red_wool": 2307, + "minecraft:waxed_weathered_cut_copper_slab": 26008, + "minecraft:coarse_dirt": 11, + "minecraft:cyan_bed": 2078, + "minecraft:heavy_core": 29702, + "minecraft:pale_oak_wall_hanging_sign": 6732, + "minecraft:redstone_torch": 6885, + "minecraft:fire_coral_fan": 15183, + "minecraft:nether_brick_fence": 9366, + "minecraft:purple_concrete": 15040, + "minecraft:crimson_pressure_plate": 21047, + "minecraft:dried_kelp_block": 15089, + "minecraft:green_wall_banner": 13235, + "minecraft:lime_candle_cake": 23381, + "minecraft:waxed_copper_golem_statue": 27416, + "minecraft:cauldron": 9460, + "minecraft:chiseled_polished_blackstone": 22245, + "minecraft:honeycomb_block": 21817, + "minecraft:oxidized_copper_golem_statue": 27384, + "minecraft:prismarine_slab": 12877, + "minecraft:chorus_flower": 14706, + "minecraft:dead_brain_coral_wall_fan": 15195, + "minecraft:deepslate_brick_stairs": 29171, + "minecraft:purple_candle": 23275, + "minecraft:torchflower": 2323, + "minecraft:yellow_shulker_box": 14898, + "minecraft:dead_fire_coral_block": 15140, + "minecraft:orange_bed": 1950, + "minecraft:red_stained_glass": 7112, + "minecraft:rooted_dirt": 27921, + "minecraft:smooth_red_sandstone_stairs": 15387, + "minecraft:wet_sponge": 561, + "minecraft:light_blue_terracotta": 11447, + "minecraft:polished_blackstone_slab": 22740, + "minecraft:potted_open_eyeblossom": 29870, + "minecraft:crimson_fungus": 20975, + "minecraft:polished_deepslate_wall": 28427, + "minecraft:acacia_log": 149, + "minecraft:birch_fence_gate": 13523, + "minecraft:birch_pressure_plate": 6866, + "minecraft:cracked_deepslate_bricks": 29571, + "minecraft:glass": 562, + "minecraft:black_terracotta": 11459, + "minecraft:brain_coral_wall_fan": 15235, + "minecraft:copper_ore": 25313, + "minecraft:dark_oak_hanging_sign": 6340, + "minecraft:red_bed": 2158, + "minecraft:cactus": 6929, + "minecraft:pink_glazed_terracotta": 14990, + "minecraft:pitcher_plant": 14810, + "minecraft:smooth_sandstone": 13481, + "minecraft:fire_coral_block": 15145, + "minecraft:gold_ore": 129, + "minecraft:pink_stained_glass": 7104, + "minecraft:tripwire": 9726, + "minecraft:warped_nylium": 20957, + "minecraft:brown_bed": 2126, + "minecraft:moving_piston": 2309, + "minecraft:red_carpet": 12910, + "minecraft:smooth_stone": 13480, + "minecraft:spruce_planks": 16, + "minecraft:white_wool": 2293, + "minecraft:yellow_wool": 2297, + "minecraft:cobweb": 2247, + "minecraft:oxidized_lightning_rod": 27634, + "minecraft:pale_oak_button": 10852, + "minecraft:polished_diorite": 5, + "minecraft:polished_granite_slab": 16419, + "minecraft:prismarine_brick_slab": 12883, + "minecraft:repeater": 7037, + "minecraft:sponge": 560, + "minecraft:flowering_azalea": 27812, + "minecraft:cherry_door": 14327, + "minecraft:cherry_sign": 5480, + "minecraft:granite_slab": 16467, + "minecraft:polished_blackstone": 22242, + "minecraft:waxed_exposed_copper_bulb": 27086, + "minecraft:cherry_fence_gate": 13619, + "minecraft:closed_eyeblossom": 29869, + "minecraft:polished_deepslate": 28337, + "minecraft:spawner": 3888, + "minecraft:warped_wall_hanging_sign": 6756, + "minecraft:weathered_copper_door": 26226, + "minecraft:jungle_wall_hanging_sign": 6716, + "minecraft:jack_o_lantern": 7023, + "minecraft:pale_oak_fence_gate": 13683, + "minecraft:smooth_red_sandstone": 13483, + "minecraft:stripped_crimson_stem": 20966, + "minecraft:brown_stained_glass": 7110, + "minecraft:copper_bulb": 27066, + "minecraft:pink_petals": 27814, + "minecraft:exposed_copper_lantern": 20852, + "minecraft:mangrove_wood": 223, + "minecraft:pink_banner": 13031, + "minecraft:podzol": 13, + "minecraft:potted_lily_of_the_valley": 10653, + "minecraft:purple_shulker_box": 14934, + "minecraft:spruce_button": 10708, + "minecraft:wall_torch": 3371, + "minecraft:iron_trapdoor": 12582, + "minecraft:waxed_oxidized_chiseled_copper": 25323, + "minecraft:chiseled_bookshelf": 2407, + "minecraft:cyan_concrete": 15039, + "minecraft:enchanting_table": 9451, + "minecraft:gray_terracotta": 11451, + "minecraft:quartz_stairs": 11339, + "minecraft:rail": 5728, + "minecraft:red_mushroom": 2337, + "minecraft:scaffolding": 20737, + "minecraft:mangrove_button": 10876, + "minecraft:mangrove_stairs": 12303, + "minecraft:nether_wart_block": 14846, + "minecraft:potted_birch_sapling": 10633, + "minecraft:waxed_copper_trapdoor": 26806, + "minecraft:waxed_oxidized_copper": 25674, + "minecraft:black_candle": 23355, + "minecraft:cobblestone_stairs": 5758, + "minecraft:crimson_hanging_sign": 6468, + "minecraft:nether_brick_slab": 13453, + "minecraft:yellow_stained_glass_pane": 11619, + "minecraft:bamboo_fence_gate": 13747, + "minecraft:light_blue_candle_cake": 23377, + "minecraft:oak_fence_gate": 8653, + "minecraft:cut_red_sandstone_slab": 13471, + "minecraft:jungle_shelf": 2993, + "minecraft:ochre_froglight": 29583, + "minecraft:waxed_weathered_cut_copper_stairs": 25770, + "minecraft:yellow_carpet": 12900, + "minecraft:brick_stairs": 8689, + "minecraft:green_concrete": 15043, + "minecraft:mossy_cobblestone_slab": 16443, + "minecraft:waxed_weathered_copper_bulb": 27090, + "minecraft:chest": 3988, + "minecraft:deepslate_tile_slab": 28832, + "minecraft:mangrove_fence_gate": 13715, + "minecraft:mud_brick_stairs": 8849, + "minecraft:pale_oak_wall_sign": 5884, + "minecraft:potted_dark_oak_sapling": 10637, + "minecraft:vault": 29673, + "minecraft:birch_log": 143, + "minecraft:creeper_wall_head": 11108, + "minecraft:cyan_banner": 13079, + "minecraft:gray_shulker_box": 14916, + "minecraft:twisting_vines": 21004, + "minecraft:vine": 8389, + "minecraft:waxed_exposed_chiseled_copper": 25325, + "minecraft:ender_chest": 9576, + "minecraft:potted_dandelion": 10641, + "minecraft:purple_glazed_terracotta": 15006, + "minecraft:azalea": 27811, + "minecraft:azure_bluet": 2327, + "minecraft:light_blue_concrete_powder": 15049, + "minecraft:light_gray_carpet": 12904, + "minecraft:spore_blossom": 27810, + "minecraft:stripped_warped_stem": 20949, + "minecraft:suspicious_sand": 119, + "minecraft:dead_fire_coral_fan": 15173, + "minecraft:piglin_head": 11171, + "minecraft:poppy": 2324, + "minecraft:red_nether_bricks": 14847, + "minecraft:tnt": 2342, + "minecraft:exposed_cut_copper_stairs": 25498, + "minecraft:loom": 20738, + "minecraft:polished_blackstone_brick_wall": 22335, + "minecraft:lava_cauldron": 9464, + "minecraft:pale_oak_fence": 13995, + "minecraft:resin_brick_wall": 9012, + "minecraft:birch_slab": 13345, + "minecraft:copper_chain": 8255, + "minecraft:horn_coral": 15165, + "minecraft:light": 12566, + "minecraft:waxed_weathered_copper": 25672, + "minecraft:copper_lantern": 20848, + "minecraft:copper_torch": 7011, + "minecraft:diorite_slab": 16491, + "minecraft:granite_stairs": 16027, + "minecraft:gravel": 124, + "minecraft:gray_bed": 2046, + "minecraft:potted_red_mushroom": 10655, + "minecraft:purple_banner": 13095, + "minecraft:dark_prismarine_stairs": 12805, + "minecraft:dead_bubble_coral": 15151, + "minecraft:end_stone_brick_wall": 20061, + "minecraft:white_wall_banner": 13183, + "minecraft:blast_furnace": 20763, + "minecraft:dark_oak_planks": 21, + "minecraft:smooth_quartz_stairs": 15947, + "minecraft:yellow_banner": 12999, + "minecraft:exposed_cut_copper_slab": 25662, + "minecraft:cherry_wood": 217, + "minecraft:iron_bars": 7989, + "minecraft:lime_concrete_powder": 15051, + "minecraft:oak_fence": 6996, + "minecraft:tall_seagrass": 2256, + "minecraft:waxed_oxidized_cut_copper_slab": 26002, + "minecraft:blue_concrete_powder": 15057, + "minecraft:cartography_table": 20770, + "minecraft:dropper": 11433, + "minecraft:mossy_cobblestone_stairs": 15627, + "minecraft:tube_coral_wall_fan": 15227, + "minecraft:white_banner": 12935, + "minecraft:beehive": 21792, + "minecraft:crimson_nylium": 20974, + "minecraft:nether_bricks": 9334, + "minecraft:carrots": 10659, + "minecraft:cherry_slab": 13363, + "minecraft:large_fern": 12926, + "minecraft:mud_bricks": 7759, + "minecraft:potted_spruce_sapling": 10632, + "minecraft:warped_stem": 20946, + "minecraft:waxed_exposed_copper_chest": 27216, + "minecraft:chiseled_deepslate": 29570, + "minecraft:iron_chain": 8249, + "minecraft:oxidized_copper_lantern": 20860, + "minecraft:skeleton_wall_skull": 10948, + "minecraft:tuff_wall": 23542, + "minecraft:cake": 7027, + "minecraft:cut_copper": 25318, + "minecraft:green_candle_cake": 23397, + "minecraft:red_stained_glass_pane": 11939, + "minecraft:sandstone_stairs": 9504, + "minecraft:spruce_wall_hanging_sign": 6684, + "minecraft:fire": 3406, + "minecraft:light_gray_bed": 2062, + "minecraft:light_gray_wool": 2301, + "minecraft:pink_stained_glass_pane": 11683, + "minecraft:pink_wool": 2299, + "minecraft:red_shulker_box": 14958, + "minecraft:wither_rose": 2334, + "minecraft:acacia_button": 10780, + "minecraft:blackstone": 21831, + "minecraft:crimson_wall_sign": 21707, + "minecraft:tuff_brick_stairs": 24293, + "minecraft:detector_rail": 2224, + "minecraft:flowering_azalea_leaves": 559, + "minecraft:horn_coral_fan": 15185, + "minecraft:turtle_egg": 15090, + "minecraft:birch_planks": 17, + "minecraft:mangrove_log": 161, + "minecraft:carved_pumpkin": 7019, + "minecraft:dead_bubble_coral_fan": 15171, + "minecraft:farmland": 5319, + "minecraft:fern": 2249, + "minecraft:magenta_wall_banner": 13191, + "minecraft:potted_mangrove_propagule": 10639, + "minecraft:birch_stairs": 9819, + "minecraft:crafter": 29654, + "minecraft:potted_red_tulip": 10647, + "minecraft:red_sandstone_wall": 17145, + "minecraft:white_stained_glass": 7098, + "minecraft:black_carpet": 12911, + "minecraft:blue_candle_cake": 23393, + "minecraft:cobbled_deepslate_stairs": 27938, + "minecraft:jungle_door": 14199, + "minecraft:light_gray_stained_glass": 7106, + "minecraft:magenta_concrete_powder": 15048, + "minecraft:acacia_stairs": 11983, + "minecraft:bell": 20806, + "minecraft:birch_leaves": 335, + "minecraft:oak_slab": 13333, + "minecraft:pumpkin_stem": 8342, + "minecraft:dead_tube_coral_fan": 15167, + "minecraft:iron_ore": 131, + "minecraft:powder_snow_cauldron": 9465, + "minecraft:waxed_exposed_copper_lantern": 20868, + "minecraft:cherry_leaves": 419, + "minecraft:deepslate_tile_wall": 28838, + "minecraft:furnace": 5328, + "minecraft:gray_candle": 23227, + "minecraft:gray_glazed_terracotta": 14994, + "minecraft:oak_shelf": 3121, + "minecraft:tube_coral_block": 15142, + "minecraft:chiseled_tuff_bricks": 24686, + "minecraft:exposed_copper": 25310, + "minecraft:gray_wool": 2300, + "minecraft:oak_sapling": 29, + "minecraft:waxed_oxidized_copper_door": 26418, + "minecraft:cherry_stairs": 12063, + "minecraft:exposed_copper_grate": 27050, + "minecraft:infested_cobblestone": 7761, + "minecraft:potatoes": 10667, + "minecraft:red_candle_cake": 23399, + "minecraft:spruce_pressure_plate": 6864, + "minecraft:stripped_cherry_wood": 241, + "minecraft:tall_grass": 12924, + "minecraft:crimson_shelf": 2865, + "minecraft:light_blue_stained_glass_pane": 11587, + "minecraft:moss_block": 27862, + "minecraft:waxed_weathered_chiseled_copper": 25324, + "minecraft:wildflowers": 27830, + "minecraft:bamboo": 15279, + "minecraft:brown_mushroom_block": 7766, + "minecraft:brown_shulker_box": 14946, + "minecraft:cyan_wool": 2302, + "minecraft:mangrove_fence": 14027, + "minecraft:tuff_stairs": 23470, + "minecraft:white_terracotta": 11444, + "minecraft:yellow_stained_glass": 7102, + "minecraft:cocoa": 9481, + "minecraft:cyan_candle": 23259, + "minecraft:end_stone": 9477, + "minecraft:exposed_copper_bars": 8053, + "minecraft:polished_andesite_slab": 16485, + "minecraft:prismarine_stairs": 12645, + "minecraft:purple_bed": 2094, + "minecraft:birch_wall_sign": 5844, + "minecraft:bone_block": 14849, + "minecraft:stone_slab": 13399, + "minecraft:sugar_cane": 6947, + "minecraft:warped_door": 21589, + "minecraft:light_gray_banner": 13063, + "minecraft:structure_void": 14851, + "minecraft:bamboo_mosaic_slab": 13393, + "minecraft:candle": 23099, + "minecraft:lapis_ore": 563, + "minecraft:light_gray_candle": 23243, + "minecraft:pale_oak_pressure_plate": 6876, + "minecraft:magenta_candle": 23147, + "minecraft:mushroom_stem": 7894, + "minecraft:oak_door": 5666, + "minecraft:cut_sandstone": 580, + "minecraft:dead_fire_coral": 15153, + "minecraft:fletching_table": 20771, + "minecraft:pink_concrete": 15036, + "minecraft:white_concrete_powder": 15046, + "minecraft:jungle_button": 10756, + "minecraft:waxed_exposed_lightning_rod": 27682, + "minecraft:waxed_weathered_copper_chain": 8291, + "minecraft:exposed_copper_bulb": 27070, + "minecraft:potted_closed_eyeblossom": 29871, + "minecraft:yellow_glazed_terracotta": 14982, + "minecraft:damaged_anvil": 11203, + "minecraft:moss_carpet": 27813, + "minecraft:pale_hanging_moss": 29866, + "minecraft:potted_brown_mushroom": 10656, + "minecraft:warped_wart_block": 20959, + "minecraft:light_blue_wall_banner": 13195, + "minecraft:light_gray_glazed_terracotta": 14998, + "minecraft:pink_bed": 2030, + "minecraft:resin_brick_stairs": 8934, + "minecraft:smooth_quartz": 13482, + "minecraft:cracked_polished_blackstone_bricks": 22244, + "minecraft:cyan_glazed_terracotta": 15002, + "minecraft:deepslate_lapis_ore": 564, + "minecraft:grass_block": 9, + "minecraft:mossy_stone_bricks": 7755, + "minecraft:pale_oak_sapling": 43, + "minecraft:water": 86, + "minecraft:blue_wall_banner": 13227, + "minecraft:deepslate_redstone_ore": 6884, + "minecraft:lime_wall_banner": 13203, + "minecraft:potted_orange_tulip": 10648, + "minecraft:waxed_exposed_cut_copper_slab": 26014, + "minecraft:melon": 8333, + "minecraft:potted_poppy": 10643, + "minecraft:trapped_chest": 11208, + "minecraft:jungle_sapling": 35, + "minecraft:pink_tulip": 2331, + "minecraft:dead_brain_coral_block": 15138, + "minecraft:potted_bamboo": 15291, + "minecraft:waxed_copper_door": 26290, + "minecraft:yellow_candle_cake": 23379, + "minecraft:andesite_wall": 19089, + "minecraft:brown_candle": 23307, + "minecraft:dandelion": 2321, + "minecraft:exposed_copper_chest": 27120, + "minecraft:gray_concrete_powder": 15053, + "minecraft:stripped_oak_log": 193, + "minecraft:acacia_leaves": 391, + "minecraft:deepslate_iron_ore": 132, + "minecraft:mangrove_hanging_sign": 6596, + "minecraft:purple_stained_glass_pane": 11811, + "minecraft:cave_vines_plant": 27809, + "minecraft:brown_banner": 13127, + "minecraft:prismarine": 12631, + "minecraft:purple_wool": 2303, + "minecraft:brick_wall": 16497, + "minecraft:pale_oak_leaves": 475, + "minecraft:polished_tuff": 23863, + "minecraft:spruce_slab": 13339, + "minecraft:piglin_wall_head": 11188, + "minecraft:black_candle_cake": 23401, + "minecraft:potted_cactus": 10658, + "minecraft:bamboo_door": 14583, + "minecraft:clay": 6946, + "minecraft:dirt": 10, + "minecraft:orange_shulker_box": 14880, + "minecraft:warped_sign": 21691, + "minecraft:waxed_exposed_copper_door": 26354, + "minecraft:waxed_weathered_lightning_rod": 27706, + "minecraft:black_wall_banner": 13243, + "minecraft:green_stained_glass": 7111, + "minecraft:observer": 14857, + "minecraft:polished_andesite_stairs": 16267, + "minecraft:birch_button": 10732, + "minecraft:copper_door": 26034, + "minecraft:lime_carpet": 12901, + "minecraft:quartz_slab": 13459, + "minecraft:red_nether_brick_wall": 19413, + "minecraft:smooth_quartz_slab": 16461, + "minecraft:stone_stairs": 15787, + "minecraft:crimson_roots": 21031, + "minecraft:potted_pink_tulip": 10650, + "minecraft:potted_warped_roots": 21829, + "minecraft:coal_ore": 133, + "minecraft:frosted_ice": 14841, + "minecraft:polished_blackstone_bricks": 22243, + "minecraft:potted_pale_oak_sapling": 10638, + "minecraft:acacia_shelf": 2609, + "minecraft:composter": 21743, + "minecraft:jungle_fence_gate": 13555, + "minecraft:spruce_log": 140, + "minecraft:waxed_oxidized_lightning_rod": 27730, + "minecraft:weathered_copper_trapdoor": 26742, + "minecraft:yellow_concrete": 15034, + "minecraft:cornflower": 2333, + "minecraft:cracked_deepslate_tiles": 29572, + "minecraft:iron_door": 6808, + "minecraft:lapis_block": 565, + "minecraft:magenta_wool": 2295, + "minecraft:polished_granite": 3, + "minecraft:stripped_acacia_wood": 238, + "minecraft:tinted_glass": 24688, + "minecraft:tuff": 23452, + "minecraft:waxed_exposed_copper_golem_statue": 27448, + "minecraft:weeping_vines_plant": 21003, + "minecraft:crimson_wall_hanging_sign": 6748, + "minecraft:dark_oak_wall_hanging_sign": 6724, + "minecraft:mangrove_leaves": 503, + "minecraft:pale_oak_trapdoor": 7577, + "minecraft:acacia_wall_hanging_sign": 6700, + "minecraft:potted_torchflower": 10630, + "minecraft:dark_oak_leaves": 447, + "minecraft:waxed_chiseled_copper": 25326, + "minecraft:heavy_weighted_pressure_plate": 11247, + "minecraft:pale_oak_planks": 25, + "minecraft:purple_candle_cake": 23391, + "minecraft:sandstone": 578, + "minecraft:spruce_door": 14071, + "minecraft:yellow_wall_banner": 13199, + "minecraft:lever": 6780, + "minecraft:oxidized_copper_trapdoor": 26678, + "minecraft:quartz_block": 11323, + "minecraft:smooth_red_sandstone_slab": 16425, + "minecraft:blackstone_slab": 22239, + "minecraft:cherry_pressure_plate": 6872, + "minecraft:diorite": 4, + "minecraft:magenta_carpet": 12898, + "minecraft:mangrove_planks": 26, + "minecraft:red_sandstone": 13247, + "minecraft:redstone_ore": 6882, + "minecraft:stone_brick_stairs": 8769, + "minecraft:green_terracotta": 11457, + "minecraft:birch_fence": 13835, + "minecraft:sunflower": 12916, + "minecraft:white_concrete": 15030, + "minecraft:dark_prismarine": 12633, + "minecraft:deepslate_bricks": 29159, + "minecraft:potted_azalea_bush": 29580, + "minecraft:purple_carpet": 12906, + "minecraft:white_bed": 1934, + "minecraft:acacia_wall_sign": 5852, + "minecraft:brown_mushroom": 2336, + "minecraft:copper_trapdoor": 26550, + "minecraft:crimson_planks": 21032, + "minecraft:light_blue_candle": 23163, + "minecraft:lightning_rod": 27562, + "minecraft:mossy_stone_brick_stairs": 15467, + "minecraft:acacia_hanging_sign": 6148, + "minecraft:cherry_hanging_sign": 6212, + "minecraft:decorated_pot": 29602, + "minecraft:jungle_slab": 13351, + "minecraft:lime_terracotta": 11449, + "minecraft:mud_brick_wall": 18441, + "minecraft:polished_tuff_wall": 23953, + "minecraft:respawn_anchor": 21821, + "minecraft:black_glazed_terracotta": 15026, + "minecraft:cut_sandstone_slab": 13417, + "minecraft:spruce_sapling": 31, + "minecraft:spruce_wall_sign": 5836, + "minecraft:black_concrete": 15045, + "minecraft:bricks": 2340, + "minecraft:cobblestone_slab": 13429, + "minecraft:crying_obsidian": 21820, + "minecraft:dead_bush": 2250, + "minecraft:dirt_path": 14815, + "minecraft:light_weighted_pressure_plate": 11231, + "minecraft:nether_brick_stairs": 9378, + "minecraft:light_gray_candle_cake": 23387, + "minecraft:potted_white_tulip": 10649, + "minecraft:waxed_exposed_copper_bars": 8181, + "minecraft:weathered_cut_copper": 25316, + "minecraft:bubble_coral_block": 15144, + "minecraft:honey_block": 21816, + "minecraft:infested_mossy_stone_bricks": 7763, + "minecraft:pale_oak_hanging_sign": 6404, + "minecraft:resin_brick_slab": 9006, + "minecraft:spruce_wood": 205, + "minecraft:stripped_birch_wood": 232, + "minecraft:raw_iron_block": 29577, + "minecraft:bamboo_fence": 14059, + "minecraft:bamboo_trapdoor": 7705, + "minecraft:command_block": 9974, + "minecraft:oak_button": 10684, + "minecraft:bamboo_stairs": 12383, + "minecraft:potted_cherry_sapling": 10636, + "minecraft:small_amethyst_bud": 23449, + "minecraft:jungle_planks": 18, + "minecraft:lime_banner": 13015, + "minecraft:bamboo_button": 10900, + "minecraft:bubble_coral_wall_fan": 15243, + "minecraft:kelp": 15062, + "minecraft:trial_spawner": 29663, + "minecraft:acacia_pressure_plate": 6870, + "minecraft:dark_prismarine_slab": 12889, + "minecraft:oxeye_daisy": 2332, + "minecraft:redstone_wire": 5171, + "minecraft:waxed_oxidized_copper_chain": 8297, + "minecraft:hanging_roots": 27920, + "minecraft:light_blue_stained_glass": 7101, + "minecraft:raw_gold_block": 29579, + "minecraft:redstone_wall_torch": 6887, + "minecraft:acacia_door": 14263, + "minecraft:cherry_log": 152, + "minecraft:magenta_stained_glass": 7100, + "minecraft:purple_wall_banner": 13223, + "minecraft:spruce_trapdoor": 7193, + "minecraft:stone_bricks": 7754, + "minecraft:redstone_lamp": 9480, + "minecraft:horn_coral_block": 15146, + "minecraft:jungle_stairs": 9899, + "minecraft:lily_of_the_valley": 2335, + "minecraft:mangrove_trapdoor": 7641, + "minecraft:pale_oak_slab": 13375, + "minecraft:sculk_sensor": 24691, + "minecraft:waxed_oxidized_copper_trapdoor": 26934, + "minecraft:waxed_weathered_copper_chest": 27240, + "minecraft:campfire": 20880, + "minecraft:chain_command_block": 14835, + "minecraft:crimson_door": 21525, + "minecraft:diamond_block": 5309, + "minecraft:end_stone_bricks": 14796, + "minecraft:mossy_stone_brick_wall": 17469, + "minecraft:quartz_pillar": 11326, + "minecraft:waxed_weathered_cut_copper": 25676, + "minecraft:glass_pane": 8331, + "minecraft:jungle_fence": 13867, + "minecraft:large_amethyst_bud": 23425, + "minecraft:purple_terracotta": 11454, + "minecraft:birch_sign": 5416, + "minecraft:blue_stained_glass_pane": 11843, + "minecraft:dead_horn_coral_fan": 15175, + "minecraft:light_blue_shulker_box": 14892, + "minecraft:potted_allium": 10645, + "minecraft:white_carpet": 12896, + "minecraft:bamboo_sapling": 15278, + "minecraft:beetroots": 14811, + "minecraft:bubble_coral": 15161, + "minecraft:chiseled_red_sandstone": 13248, + "minecraft:resin_clump": 8645, + "minecraft:warped_pressure_plate": 21049, + "minecraft:muddy_mangrove_roots": 166, + "minecraft:note_block": 582, + "minecraft:torchflower_crop": 14797, + "minecraft:waxed_weathered_copper_door": 26482, + "minecraft:dark_oak_sign": 5544, + "minecraft:netherrack": 6997, + "minecraft:oak_sign": 5352, + "minecraft:stripped_spruce_wood": 229, + "minecraft:waxed_oxidized_copper_golem_statue": 27512, + "minecraft:brown_wool": 2305, + "minecraft:deepslate": 27924, + "minecraft:green_stained_glass_pane": 11907, + "minecraft:birch_wood": 208, + "minecraft:chorus_plant": 14705, + "minecraft:light_blue_wool": 2296, + "minecraft:lime_shulker_box": 14904, + "minecraft:melon_stem": 8350, + "minecraft:polished_blackstone_pressure_plate": 22744, + "minecraft:polished_diorite_slab": 16437, + "minecraft:prismarine_wall": 16821, + "minecraft:tripwire_hook": 9592, + "minecraft:blue_shulker_box": 14940, + "minecraft:cyan_concrete_powder": 15055, + "minecraft:nether_portal": 7017, + "minecraft:polished_deepslate_slab": 28421, + "minecraft:sea_lantern": 12892, + "minecraft:azalea_leaves": 531, + "minecraft:black_shulker_box": 14964, + "minecraft:oxidized_copper_chain": 8273, + "minecraft:potted_fern": 10640, + "minecraft:snow": 6919, + "minecraft:black_banner": 13175, + "minecraft:cut_copper_slab": 25668, + "minecraft:purpur_pillar": 14714, + "minecraft:bamboo_planks": 27, + "minecraft:magenta_concrete": 15032, + "minecraft:sand": 118, + "minecraft:warped_shelf": 3313, + "minecraft:chiseled_copper": 25322, + "minecraft:dark_oak_door": 14391, + "minecraft:red_nether_brick_slab": 16479, + "minecraft:stripped_mangrove_wood": 250, + "minecraft:weathered_chiseled_copper": 25320, + "minecraft:dark_oak_shelf": 2929, + "minecraft:mossy_stone_brick_slab": 16431, + "minecraft:spruce_fence": 13803, + "minecraft:waxed_copper_block": 25671, + "minecraft:bamboo_wall_sign": 5900, + "minecraft:gray_candle_cake": 23385, + "minecraft:nether_sprouts": 20961, + "minecraft:orange_terracotta": 11445, + "minecraft:oxidized_chiseled_copper": 25319, + "minecraft:stripped_oak_wood": 226, + "minecraft:end_portal_frame": 9473, + "minecraft:green_glazed_terracotta": 15018, + "minecraft:red_concrete_powder": 15060, + "minecraft:warped_slab": 21043, + "minecraft:oxidized_copper_door": 26162, + "minecraft:potted_cornflower": 10652, + "minecraft:smooth_stone_slab": 13405, + "minecraft:weathered_cut_copper_slab": 25656, + "minecraft:dark_oak_slab": 13369, + "minecraft:dark_oak_stairs": 12143, + "minecraft:nether_gold_ore": 135, + "minecraft:birch_hanging_sign": 6084, + "minecraft:ladder": 5720, + "minecraft:soul_soil": 6999, + "minecraft:terracotta": 12912, + "minecraft:dragon_egg": 9478, + "minecraft:mangrove_shelf": 3057, + "minecraft:smooth_sandstone_slab": 16455, + "minecraft:stonecutter": 20801, + "minecraft:brain_coral_fan": 15179, + "minecraft:gray_wall_banner": 13211, + "minecraft:mud": 27922, + "minecraft:skeleton_skull": 10931, + "minecraft:test_instance_block": 21742, + "minecraft:waxed_copper_grate": 27056, + "minecraft:amethyst_cluster": 23413, + "minecraft:cobbled_deepslate_wall": 28016, + "minecraft:magenta_shulker_box": 14886, + "minecraft:red_sandstone_stairs": 13261, + "minecraft:gray_carpet": 12903, + "minecraft:white_candle_cake": 23371, + "minecraft:end_stone_brick_slab": 16449, + "minecraft:polished_andesite": 7, + "minecraft:birch_wall_hanging_sign": 6692, + "minecraft:blue_concrete": 15041, + "minecraft:blue_ice": 15275, + "minecraft:attached_melon_stem": 8338, + "minecraft:crimson_stairs": 21317, + "minecraft:dark_oak_pressure_plate": 6874, + "minecraft:light_blue_bed": 1982, + "minecraft:smooth_basalt": 29576, + "minecraft:mud_brick_slab": 13447, + "minecraft:oak_wall_hanging_sign": 6676, + "minecraft:structure_block": 21723, + "minecraft:waxed_oxidized_copper_chest": 27264, + "minecraft:weathered_copper_bulb": 27074, + "minecraft:gold_block": 2338, + "minecraft:medium_amethyst_bud": 23437, + "minecraft:sculk_catalyst": 25300, + "minecraft:sweet_berry_bush": 20941, + "minecraft:cobbled_deepslate_slab": 28010, + "minecraft:dark_oak_wood": 220, + "minecraft:orange_candle": 23131, + "minecraft:deepslate_brick_slab": 29243, + "minecraft:jungle_trapdoor": 7321, + "minecraft:lantern": 20840, + "minecraft:waxed_weathered_copper_trapdoor": 26998, + "minecraft:brown_terracotta": 11456, + "minecraft:red_sandstone_slab": 13465, + "minecraft:resin_block": 8921, + "minecraft:sea_pickle": 15267, + "minecraft:short_dry_grass": 2252, + "minecraft:acacia_wood": 214, + "minecraft:candle_cake": 23369, + "minecraft:deepslate_coal_ore": 134, + "minecraft:sticky_piston": 2241, + "minecraft:exposed_chiseled_copper": 25321, + "minecraft:lily_pad": 8920, + "minecraft:lime_stained_glass_pane": 11651, + "minecraft:spruce_sign": 5384, + "minecraft:exposed_copper_chain": 8261, + "minecraft:gilded_blackstone": 22656, + "minecraft:pink_candle_cake": 23383, + "minecraft:polished_blackstone_brick_stairs": 22263, + "minecraft:tuff_slab": 23456, + "minecraft:yellow_bed": 1998, + "minecraft:amethyst_block": 23402, + "minecraft:mossy_cobblestone_wall": 10308, + "minecraft:brown_wall_banner": 13231, + "minecraft:cracked_stone_bricks": 7756, + "minecraft:deepslate_tile_stairs": 28760, + "minecraft:exposed_copper_golem_statue": 27320, + "minecraft:mycelium": 8919, + "minecraft:oxidized_copper_chest": 27168, + "minecraft:raw_copper_block": 29578, + "minecraft:red_glazed_terracotta": 15022, + "minecraft:acacia_fence_gate": 13587, + "minecraft:copper_grate": 27048, + "minecraft:polished_deepslate_stairs": 28349, + "minecraft:stripped_birch_log": 175, + "minecraft:warped_fence": 21113, + "minecraft:waxed_cut_copper_slab": 26020, + "minecraft:waxed_cut_copper_stairs": 25930, + "minecraft:waxed_oxidized_cut_copper": 25675, + "minecraft:calcite": 24687, + "minecraft:soul_sand": 6998, + "minecraft:acacia_slab": 13357, + "minecraft:gray_banner": 13047, + "minecraft:blue_bed": 2110, + "minecraft:diorite_wall": 20385, + "minecraft:gray_stained_glass_pane": 11715, + "minecraft:light_blue_concrete": 15033, + "minecraft:polished_blackstone_button": 22754, + "minecraft:end_stone_brick_stairs": 15707, + "minecraft:pale_oak_stairs": 12223, + "minecraft:pink_carpet": 12902, + "minecraft:pink_terracotta": 11450, + "minecraft:weathered_lightning_rod": 27610, + "minecraft:jungle_sign": 5512, + "minecraft:stripped_acacia_log": 181, + "minecraft:crimson_fence": 21081, + "minecraft:deepslate_brick_wall": 29249, + "minecraft:red_candle": 23339, + "minecraft:soul_campfire": 20912, + "minecraft:white_tulip": 2330, + "minecraft:beacon": 9980, + "minecraft:cherry_fence": 13931, + "minecraft:emerald_ore": 9573, + "minecraft:end_gateway": 14816, + "minecraft:exposed_copper_trapdoor": 26614, + "minecraft:mangrove_slab": 13381, + "minecraft:fire_coral_wall_fan": 15251, + "minecraft:red_sand": 123, + "minecraft:rose_bush": 12920, + "minecraft:shroomlight": 20976, + "minecraft:snow_block": 6928, + "minecraft:redstone_block": 11311, + "minecraft:bamboo_mosaic_stairs": 12463, + "minecraft:dead_bubble_coral_block": 15139, + "minecraft:dead_bubble_coral_wall_fan": 15203, + "minecraft:exposed_copper_door": 26098, + "minecraft:spruce_hanging_sign": 6020, + "minecraft:waxed_weathered_copper_lantern": 20872, + "minecraft:white_glazed_terracotta": 14966, + "minecraft:andesite_stairs": 16107, + "minecraft:dead_brain_coral_fan": 15169, + "minecraft:soul_torch": 7006, + "minecraft:brown_glazed_terracotta": 15014, + "minecraft:soul_fire": 3887, + "minecraft:stripped_bamboo_block": 199, + "minecraft:waxed_oxidized_copper_lantern": 20876, + "minecraft:acacia_fence": 13899, + "minecraft:ancient_debris": 21819, + "minecraft:cyan_terracotta": 11453, + "minecraft:oxidized_cut_copper_slab": 25650, + "minecraft:polished_granite_stairs": 15307, + "minecraft:blue_terracotta": 11455, + "minecraft:dead_tube_coral": 15147, + "minecraft:lodestone": 21830, + "minecraft:pale_oak_wood": 23, + "minecraft:powered_rail": 2200, + "minecraft:wither_skeleton_skull": 10971, + "minecraft:comparator": 11264, + "minecraft:cut_red_sandstone": 13249, + "minecraft:jungle_hanging_sign": 6276, + "minecraft:reinforced_deepslate": 29592, + "minecraft:stripped_dark_oak_log": 187, + "minecraft:weathered_copper_chest": 27144, + "minecraft:zombie_wall_head": 11028, + "minecraft:black_concrete_powder": 15061, + "minecraft:potted_blue_orchid": 10644, + "minecraft:zombie_head": 11011, + "minecraft:oak_hanging_sign": 5956, + "minecraft:pink_wall_banner": 13207, + "minecraft:yellow_candle": 23179, + "minecraft:cyan_shulker_box": 14928, + "minecraft:lime_concrete": 15035, + "minecraft:slime_block": 12532, + "minecraft:smithing_table": 20800, + "minecraft:firefly_bush": 29872, + "minecraft:blue_orchid": 2325, + "minecraft:crafting_table": 5310, + "minecraft:dragon_head": 11131, + "minecraft:light_gray_stained_glass_pane": 11747, + "minecraft:pale_moss_carpet": 29704, + "minecraft:waxed_oxidized_copper_grate": 27062, + "minecraft:birch_trapdoor": 7257, + "minecraft:brick_slab": 13435, + "minecraft:infested_stone_bricks": 7762, + "minecraft:light_blue_banner": 12983, + "minecraft:seagrass": 2254, + "minecraft:crimson_slab": 21037, + "minecraft:oak_planks": 15, + "minecraft:powder_snow": 24689, + "minecraft:repeating_command_block": 14823, + "minecraft:spruce_leaves": 307, + "minecraft:weathered_copper": 25311, + "minecraft:bush": 2251, + "minecraft:ice": 6927, + "minecraft:light_blue_glazed_terracotta": 14978, + "minecraft:light_gray_concrete_powder": 15054, + "minecraft:tuff_brick_slab": 24279, + "minecraft:big_dripleaf": 27864, + "minecraft:birch_door": 14135, + "minecraft:deepslate_copper_ore": 25314, + "minecraft:hopper": 11313, + "minecraft:smooth_sandstone_stairs": 15867, + "minecraft:stripped_dark_oak_wood": 244, + "minecraft:waxed_cut_copper": 25678, + "minecraft:barrel": 20743, + "minecraft:cactus_flower": 6945, + "minecraft:dead_horn_coral_block": 15141, + "minecraft:leaf_litter": 27846, + "minecraft:red_tulip": 2328, + "minecraft:waxed_exposed_cut_copper_stairs": 25850, + "minecraft:bamboo_slab": 13387, + "minecraft:white_shulker_box": 14874, + "minecraft:cherry_planks": 20, + "minecraft:grindstone": 20776, + "minecraft:warped_wall_sign": 21715, + "minecraft:light_gray_terracotta": 11452, + "minecraft:lime_candle": 23195, + "minecraft:chiseled_stone_bricks": 7757, + "minecraft:crimson_fence_gate": 21249, + "minecraft:potted_azure_bluet": 10646, + "minecraft:stripped_mangrove_log": 196, + "minecraft:waxed_exposed_copper_chain": 8285, + "minecraft:blue_banner": 13111, + "minecraft:dark_oak_wall_sign": 5876, + "minecraft:bedrock": 85, + "minecraft:cobblestone_wall": 9984, + "minecraft:crimson_sign": 21659, + "minecraft:brain_coral_block": 15143, + "minecraft:brown_concrete": 15042, + "minecraft:cherry_sapling": 39, + "minecraft:potted_golden_dandelion": 10642, + "minecraft:stripped_cherry_log": 184, + "minecraft:white_stained_glass_pane": 11491, + "minecraft:calibrated_sculk_sensor": 24787, + "minecraft:cherry_wall_sign": 5860, + "minecraft:lilac": 12918, + "minecraft:pink_candle": 23211, + "minecraft:warped_trapdoor": 21193, + "minecraft:andesite": 6, + "minecraft:black_bed": 2174, + "minecraft:blue_stained_glass": 7109, + "minecraft:cyan_candle_cake": 23389, + "minecraft:pitcher_crop": 14800, + "minecraft:potted_jungle_sapling": 10634, + "minecraft:weathered_copper_chain": 8267, + "minecraft:daylight_detector": 11295, + "minecraft:waxed_oxidized_copper_bulb": 27094, + "minecraft:magma_block": 14845, + "minecraft:sniffer_egg": 15102, + "minecraft:stripped_jungle_wood": 235, + "minecraft:blackstone_stairs": 21843, + "minecraft:blue_wool": 2304, + "minecraft:orange_carpet": 12897, + "minecraft:stone_button": 6904, + "minecraft:stripped_pale_oak_wood": 247, + "minecraft:chiseled_nether_bricks": 23093, + "minecraft:gray_concrete": 15037, + "minecraft:magenta_terracotta": 11446, + "minecraft:mangrove_door": 14519, + "minecraft:sculk_vein": 25298, + "minecraft:spruce_fence_gate": 13491, + "minecraft:spruce_stairs": 9739, + "minecraft:stripped_crimson_hyphae": 20972, + "minecraft:infested_chiseled_stone_bricks": 7765, + "minecraft:jungle_leaves": 363, + "minecraft:pointed_dripstone": 27740, + "minecraft:tuff_brick_wall": 24365, + "minecraft:brown_concrete_powder": 15058, + "minecraft:chiseled_resin_bricks": 9333, + "minecraft:crimson_trapdoor": 21129, + "minecraft:flower_pot": 10629, + "minecraft:lava": 102, + "minecraft:polished_diorite_stairs": 15547, + "minecraft:activator_rail": 11421, + "minecraft:cyan_carpet": 12905, + "minecraft:lime_wool": 2298, + "minecraft:player_wall_head": 11068, + "minecraft:red_nether_brick_stairs": 16187, + "minecraft:birch_shelf": 2737, + "minecraft:oak_wall_sign": 5828, + "minecraft:orange_candle_cake": 23373, + "minecraft:potted_dead_bush": 10657, + "minecraft:red_mushroom_block": 7830, + "minecraft:stripped_jungle_log": 178, + "minecraft:waxed_copper_bulb": 27082, + "minecraft:dead_horn_coral": 15155, + "minecraft:mangrove_sign": 5608, + "minecraft:mossy_cobblestone": 3368, + "minecraft:potted_crimson_fungus": 21826, + "minecraft:resin_bricks": 8922, + "minecraft:weathered_cut_copper_stairs": 25418, + "minecraft:yellow_terracotta": 11448, + "minecraft:fire_coral": 15163, + "minecraft:green_concrete_powder": 15059, + "minecraft:orange_concrete": 15031, + "minecraft:suspicious_gravel": 125, + "minecraft:air": 0, + "minecraft:mangrove_propagule": 50, + "minecraft:potted_flowering_azalea_bush": 29581, + "minecraft:wheat": 5311, + "minecraft:blue_glazed_terracotta": 15010, + "minecraft:brown_candle_cake": 23395, + "minecraft:dark_oak_button": 10828, + "minecraft:dripstone_block": 27755, + "minecraft:emerald_block": 9727, + "minecraft:jungle_pressure_plate": 6868, + "minecraft:pale_oak_shelf": 3185, + "minecraft:piston_head": 2271, + "minecraft:bubble_column": 15294, + "minecraft:sandstone_slab": 13411, + "minecraft:prismarine_brick_stairs": 12725, + "minecraft:stone_pressure_plate": 6796, + "minecraft:diorite_stairs": 16347, + "minecraft:mangrove_wall_hanging_sign": 6740, + "minecraft:waxed_exposed_copper": 25673, +} diff --git a/internal/worldgen/structure.go b/internal/worldgen/structure.go new file mode 100644 index 0000000..b56b1f3 --- /dev/null +++ b/internal/worldgen/structure.go @@ -0,0 +1,163 @@ +package worldgen + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "os" + + "regionio/internal/nbt" +) + +type ChunkWriter interface { + SetBlock(lx, y, lz int, state uint16) + GetBlock(lx, y, lz int) uint16 +} + +// Template represents a loaded NBT structure. +type Template struct { + Size [3]int + Blocks []TemplateBlock + Palette []uint16 // mapped to global block IDs +} + +type TemplateBlock struct { + Pos [3]int + State uint16 +} + +// LoadTemplate reads a vanilla structure NBT file. +func LoadTemplate(path string) (*Template, error) { + b, err := os.ReadFile(path) + if err != nil { + return nil, err + } + + // NBT files are usually gzipped. + var r io.Reader = bytes.NewReader(b) + if len(b) >= 2 && b[0] == 0x1f && b[1] == 0x8b { + gr, err := gzip.NewReader(r) + if err != nil { + return nil, err + } + defer gr.Close() + r = gr + } + + out, err := io.ReadAll(r) + if err != nil { + return nil, err + } + + _, root, err := nbt.UnmarshalNamed(out) + if err != nil { + return nil, err + } + + comp, ok := root.(*nbt.Compound) + if !ok { + return nil, fmt.Errorf("root is not a compound") + } + + tmpl := &Template{} + + if tag, ok := comp.Get("size"); ok { + if sizeList, ok := tag.(nbt.List); ok && len(sizeList.Elems) == 3 { + tmpl.Size[0] = int(sizeList.Elems[0].(nbt.Int)) + tmpl.Size[1] = int(sizeList.Elems[1].(nbt.Int)) + tmpl.Size[2] = int(sizeList.Elems[2].(nbt.Int)) + } + } + + // Parse palette + if tag, ok := comp.Get("palette"); ok { + if paletteList, ok := tag.(nbt.List); ok { + for _, v := range paletteList.Elems { + stateComp, ok := v.(*nbt.Compound) + if !ok { + continue + } + nameTag, _ := stateComp.Get("Name") + name := string(nameTag.(nbt.String)) + props := make(map[string]string) + + if propTag, ok := stateComp.Get("Properties"); ok { + if propComp, ok := propTag.(*nbt.Compound); ok { + for _, k := range propComp.Keys() { + pval, _ := propComp.Get(k) + if str, ok := pval.(nbt.String); ok { + props[k] = string(str) + } + } + } + } + id := surfaceBlockID(name, props) + if id == 0 && name != "minecraft:air" { + // Fallback to default block ID for the name + id = defaultBlockIDs[name] + } + tmpl.Palette = append(tmpl.Palette, id) + } + } + } + + // Parse blocks + if tag, ok := comp.Get("blocks"); ok { + if blocksList, ok := tag.(nbt.List); ok { + for _, v := range blocksList.Elems { + blockComp, ok := v.(*nbt.Compound) + if !ok { + continue + } + stateTag, _ := blockComp.Get("state") + stateIdx := int(stateTag.(nbt.Int)) + + var pos [3]int + if posTag, ok := blockComp.Get("pos"); ok { + if posList, ok := posTag.(nbt.List); ok && len(posList.Elems) == 3 { + pos[0] = int(posList.Elems[0].(nbt.Int)) + pos[1] = int(posList.Elems[1].(nbt.Int)) + pos[2] = int(posList.Elems[2].(nbt.Int)) + } + } + + if stateIdx >= 0 && stateIdx < len(tmpl.Palette) { + state := tmpl.Palette[stateIdx] + tmpl.Blocks = append(tmpl.Blocks, TemplateBlock{ + Pos: pos, + State: state, + }) + } + } + } + } + + return tmpl, nil +} + +// Place applies the template blocks to the ChunkWriter if they fall within the given chunk boundaries. +// cx, cz are the chunk coordinates we are currently generating. +// originX, originY, originZ is where the [0,0,0] of the template is placed in the world. +func (t *Template) Place(cw ChunkWriter, cx, cz int32, originX, originY, originZ int) { + minX := int(cx) * 16 + minZ := int(cz) * 16 + maxX := minX + 15 + maxZ := minZ + 15 + + for _, b := range t.Blocks { + wx := originX + b.Pos[0] + wy := originY + b.Pos[1] + wz := originZ + b.Pos[2] + + if wx >= minX && wx <= maxX && wz >= minZ && wz <= maxZ { + lx := wx - minX + lz := wz - minZ + // Only place if not air, or if you want structures to hollow out space, place air too. + // Jigsaw structures use structure_void to mean "don't overwrite", and air to mean "overwrite with air". + // Since we fallback to 0 for unknown blocks, we need to be careful. + // For now, place everything. + cw.SetBlock(lx, wy, lz, b.State) + } + } +} diff --git a/internal/worldgen/structure_manager.go b/internal/worldgen/structure_manager.go new file mode 100644 index 0000000..63cdc39 --- /dev/null +++ b/internal/worldgen/structure_manager.go @@ -0,0 +1,32 @@ +package worldgen + +// PlaceStructures places any structure pieces that overlap the chunk at (cx, cz). +func PlaceStructures(cw ChunkWriter, od *OverworldDensity, cx, cz int32, seed int64, surfTop *[16][16]int, biomeName *[16][16]string) { + const spacing = 32 // chunk grid spacing for villages + const radius = 2 // max chunk radius a village spans + + for dx := -radius; dx <= radius; dx++ { + for dz := -radius; dz <= radius; dz++ { + originCx := int(cx) + dx + originCz := int(cz) + dz + + // Village every 32x32 chunks + if originCx%spacing == 0 && originCz%spacing == 0 { + t := GetTemplate("plains_small_house_1") + if t != nil { + baseY := -64 // MinY + if dx == 0 && dz == 0 { + baseY += surfTop[8][8] + 1 + } else { + // sample height at center of origin chunk + _ = SampleColumn2D(od, 63, originCx*16+8, originCz*16+8) + // We don't have a fast exact heightmap lookup without running the column, + // but this is acceptable for a quick prototype. + baseY = 70 + } + t.Place(cw, cx, cz, originCx*16+8, baseY, originCz*16+8) + } + } + } + } +} diff --git a/internal/worldgen/template_cache.go b/internal/worldgen/template_cache.go new file mode 100644 index 0000000..2b8a662 --- /dev/null +++ b/internal/worldgen/template_cache.go @@ -0,0 +1,18 @@ +package worldgen + +import "sync" + +var ( + templates = make(map[string]*Template) + templatesOnce sync.Once +) + +// GetTemplate loads and caches an NBT template from disk. +func GetTemplate(name string) *Template { + templatesOnce.Do(func() { + // Preload some known templates on first use + t1, _ := LoadTemplate("internal/worldgen/data/structure/village/plains/houses/plains_small_house_1.nbt") + templates["plains_small_house_1"] = t1 + }) + return templates[name] +} diff --git a/scratch.go b/scratch.go index bdfa45a..d5e2980 100644 --- a/scratch.go +++ b/scratch.go @@ -1,17 +1,13 @@ package main import ( - "encoding/json" "fmt" - "os" + "regionio/internal/worldgen" ) func main() { - f, _ := os.Open("generated/reports/blocks.json") - var data map[string]interface{} - json.NewDecoder(f).Decode(&data) - - glowstone := data["minecraft:glowstone"] - b, _ := json.MarshalIndent(glowstone, "", " ") - fmt.Println("glowstone:", string(b)) + tmpl, _ := worldgen.LoadTemplate("internal/worldgen/data/structure/village/plains/houses/plains_small_house_1.nbt") + for i, b := range tmpl.Palette { + fmt.Printf("Palette[%d] = %d\n", i, b) + } }