Modern Apps git

← Modern-Apps.git

voxels: one 16-bit id space with items at 1024

Commit
5d0bf0fb17b63f841d941d165c9edbfd674b4530
Author
Vayun Mathur <[email protected]>
When
2026-08-05 19:40 UTC (4 months ago)
Parents
02abcb4

Diff

games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.kt
diff --git a/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.kt b/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.ktindex c4e81162c1..4e2b514af3 100644--- a/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.kt+++ b/games/voxels/src/main/java/com/vayunmathur/games/voxels/ui/Hotbar.kt@@ -39,14 +39,14 @@ data class InvSlot(val id: Int, val count: Int) data class InventoryState(val selected: Int = 0, val slots: List<InvSlot> = List(9) { InvSlot(0, 0) }, val armor: List<InvSlot> = emptyList())  // Ids 163..178 and 197..202 are tools/armor whose slot `count` is durability (not a stack size).-fun isDurabilityItem(id: Int) = id in 163..178 || id in 197..202 || id in 239..244 || id == 186 || id == 188 || id in 252..253 || id == 255+fun isDurabilityItem(id: Int) = id in 1059..1074 || id in 1093..1098 || id in 1135..1140 || id == 1082 || id == 1084 || id in 1148..1149 || id == 1151  val maxDurability = mapOf(-    163 to 60, 164 to 60, 165 to 132, 166 to 132, 167 to 250, 168 to 250, 169 to 1562, 170 to 1562,-    171 to 240, 172 to 240, 173 to 240, 174 to 240, 175 to 528, 176 to 528, 177 to 528, 178 to 528,-    186 to 64, 188 to 432, 252 to 238, 253 to 64, 255 to 64,-    239 to 700, 240 to 700, 241 to 380, 242 to 380, 243 to 380, 244 to 380,-    197 to 2031, 198 to 2031, 199 to 666, 200 to 666, 201 to 666, 202 to 666+    1059 to 60, 1060 to 60, 1061 to 132, 1062 to 132, 1063 to 250, 1064 to 250, 1065 to 1562, 1066 to 1562,+    1067 to 240, 1068 to 240, 1069 to 240, 1070 to 240, 1071 to 528, 1072 to 528, 1073 to 528, 1074 to 528,+    1082 to 64, 1084 to 432, 1148 to 238, 1149 to 64, 1151 to 64,+    1135 to 700, 1136 to 700, 1137 to 380, 1138 to 380, 1139 to 380, 1140 to 380,+    1093 to 2031, 1094 to 2031, 1095 to 666, 1096 to 666, 1097 to 666, 1098 to 666 )  @Composable@@ -76,50 +76,50 @@ val blockNames = mapOf(     70 to "Dripstone", 71 to "Moss Block", 72 to "Sculk", 73 to "Amethyst", 74 to "Calcite", 75 to "Tuff",     76 to "Magma", 77 to "Glowstone", 78 to "Obsidian", 79 to "Clay", 80 to "Azalea Leaves", 81 to "Warding Stone",     // Items (128+): consumables + materials.-    128 to "Estus Flask", 129 to "Heart Container", 130 to "Apple", 131 to "Bread", 132 to "Cooked Fish",-    133 to "Golden Apple", 134 to "Brownie", 135 to "Carrot", 136 to "Melon Slice", 137 to "Leather", 138 to "Gunpowder",-    146 to "Baked Potato", 147 to "Cookie", 148 to "Cooked Salmon", 149 to "Fried Egg", 150 to "Cooked Rabbit",-    151 to "Apple Empanada", 152 to "Glow Berry Crumble", 153 to "Choc-Chip Cookie",-    154 to "Iron Ingot", 155 to "Diamond", 156 to "Emerald", 157 to "Coal", 158 to "Redstone", 159 to "Stick",+    1024 to "Estus Flask", 1025 to "Heart Container", 1026 to "Apple", 1027 to "Bread", 1028 to "Cooked Fish",+    1029 to "Golden Apple", 1030 to "Brownie", 1031 to "Carrot", 1032 to "Melon Slice", 1033 to "Leather", 1034 to "Gunpowder",+    1042 to "Baked Potato", 1043 to "Cookie", 1044 to "Cooked Salmon", 1045 to "Fried Egg", 1046 to "Cooked Rabbit",+    1047 to "Apple Empanada", 1048 to "Glow Berry Crumble", 1049 to "Choc-Chip Cookie",+    1050 to "Iron Ingot", 1051 to "Diamond", 1052 to "Emerald", 1053 to "Coal", 1054 to "Redstone", 1055 to "Stick",     // The Blessing pantheon (attunements, see blessing.rs).-    160 to "Blessing of Clement", 161 to "Blessing of Ares", 162 to "Blessing of Yamm",-    203 to "Blessing of Daedalus", 204 to "Blessing of Icarus", 205 to "Blessing of Yama",-    206 to "Blessing of Talos", 207 to "Blessing of the God King", 208 to "Blessing of Arachnae",-    209 to "Blessing of Prometheus", 210 to "Blessing of Lu Ban", 211 to "Blessing of Eros",-    212 to "Blessing of Will", 213 to "Blessing of Hyacinthus", 214 to "Blessing of Aeolus",-    215 to "Blessing of Cronus", 216 to "Blessing of Demeter", 217 to "Blessing of Glaucus",-    218 to "Blessing of Apollo", 219 to "Blessing of Artemis", 220 to "Blessing of Warding",-    221 to "Blessing of Paris",-    245 to "Blessing of Athena", 246 to "Blessing of Sekhmet", 247 to "Blessing of Camazotz",-    248 to "Blessing of Tangaroa", 249 to "Blessing of Anubis",+    1056 to "Blessing of Clement", 1057 to "Blessing of Ares", 1058 to "Blessing of Yamm",+    1099 to "Blessing of Daedalus", 1100 to "Blessing of Icarus", 1101 to "Blessing of Yama",+    1102 to "Blessing of Talos", 1103 to "Blessing of the God King", 1104 to "Blessing of Arachnae",+    1105 to "Blessing of Prometheus", 1106 to "Blessing of Lu Ban", 1107 to "Blessing of Eros",+    1108 to "Blessing of Will", 1109 to "Blessing of Hyacinthus", 1110 to "Blessing of Aeolus",+    1111 to "Blessing of Cronus", 1112 to "Blessing of Demeter", 1113 to "Blessing of Glaucus",+    1114 to "Blessing of Apollo", 1115 to "Blessing of Artemis", 1116 to "Blessing of Warding",+    1117 to "Blessing of Paris",+    1141 to "Blessing of Athena", 1142 to "Blessing of Sekhmet", 1143 to "Blessing of Camazotz",+    1144 to "Blessing of Tangaroa", 1145 to "Blessing of Anubis",     // Matcha's kitchen.-    222 to "Raw Meat", 223 to "Cooked Meat", 224 to "Ramen", 225 to "Japanese Curry",-    226 to "Green Curry", 227 to "Gnocchi", 228 to "Naan", 229 to "Pupusa", 230 to "Latke",-    231 to "Bruschetta", 232 to "French Toast", 233 to "Sweet Berry Danish", 234 to "Melon Sorbet",-    235 to "Stroganoff",+    1118 to "Raw Meat", 1119 to "Cooked Meat", 1120 to "Ramen", 1121 to "Japanese Curry",+    1122 to "Green Curry", 1123 to "Gnocchi", 1124 to "Naan", 1125 to "Pupusa", 1126 to "Latke",+    1127 to "Bruschetta", 1128 to "French Toast", 1129 to "Sweet Berry Danish", 1130 to "Melon Sorbet",+    1131 to "Stroganoff",     // Matcha's bronze tier.     97 to "Copper Ore", 98 to "Gold Ore", 99 to "Copper Block", 100 to "Gold Block", 101 to "Bronze Block",-    236 to "Copper Ingot", 237 to "Gold Ingot", 238 to "Bronze Ingot",-    239 to "Bronze Pickaxe", 240 to "Bronze Sword",-    241 to "Bronze Helmet", 242 to "Bronze Chestplate", 243 to "Bronze Leggings", 244 to "Bronze Boots",-    163 to "Wood Pickaxe", 164 to "Wood Sword", 165 to "Stone Pickaxe", 166 to "Stone Sword",-    167 to "Iron Pickaxe", 168 to "Iron Sword", 169 to "Diamond Pickaxe", 170 to "Diamond Sword",-    171 to "Iron Helmet", 172 to "Iron Chestplate", 173 to "Iron Leggings", 174 to "Iron Boots",-    175 to "Diamond Helmet", 176 to "Diamond Chestplate", 177 to "Diamond Leggings", 178 to "Diamond Boots",+    1132 to "Copper Ingot", 1133 to "Gold Ingot", 1134 to "Bronze Ingot",+    1135 to "Bronze Pickaxe", 1136 to "Bronze Sword",+    1137 to "Bronze Helmet", 1138 to "Bronze Chestplate", 1139 to "Bronze Leggings", 1140 to "Bronze Boots",+    1059 to "Wood Pickaxe", 1060 to "Wood Sword", 1061 to "Stone Pickaxe", 1062 to "Stone Sword",+    1063 to "Iron Pickaxe", 1064 to "Iron Sword", 1065 to "Diamond Pickaxe", 1066 to "Diamond Sword",+    1067 to "Iron Helmet", 1068 to "Iron Chestplate", 1069 to "Iron Leggings", 1070 to "Iron Boots",+    1071 to "Diamond Helmet", 1072 to "Diamond Chestplate", 1073 to "Diamond Leggings", 1074 to "Diamond Boots",     82 to "Jukebox", 83 to "Chest", 84 to "Lava", 85 to "End Stone", 88 to "Beacon", 89 to "Purpur",-    179 to "Disc: Golden", 180 to "Disc: Lullaby", 181 to "Disc: Forest", 182 to "Disc: Deep Mining",-    183 to "Disc: Winter", 184 to "Disc: Piano", 185 to "Disc: Gift",-    186 to "Flint & Steel", 187 to "Nether Star", 188 to "Elytra", 189 to "Firework Rocket",-    190 to "Snowball", 191 to "Ender Pearl",+    1075 to "Disc: Golden", 1076 to "Disc: Lullaby", 1077 to "Disc: Forest", 1078 to "Disc: Deep Mining",+    1079 to "Disc: Winter", 1080 to "Disc: Piano", 1081 to "Disc: Gift",+    1082 to "Flint & Steel", 1083 to "Nether Star", 1084 to "Elytra", 1085 to "Firework Rocket",+    1086 to "Snowball", 1087 to "Ender Pearl",     // Matcha alloy tier.     90 to "Silver Ore", 91 to "Sulfur Ore", 92 to "Cinnabar Ore",     93 to "Silver Block", 94 to "Steel Block", 95 to "Adamant Block", 96 to "Blast Furnace",-    192 to "Sulfur", 193 to "Silver Ingot", 194 to "Quicksilver", 195 to "Steel Ingot", 196 to "Adamant Ingot",-    197 to "Adamant Pickaxe", 198 to "Adamant Sword",-    199 to "Adamant Helmet", 200 to "Adamant Chestplate", 201 to "Adamant Leggings", 202 to "Adamant Boots",+    1088 to "Sulfur", 1089 to "Silver Ingot", 1090 to "Quicksilver", 1091 to "Steel Ingot", 1092 to "Adamant Ingot",+    1093 to "Adamant Pickaxe", 1094 to "Adamant Sword",+    1095 to "Adamant Helmet", 1096 to "Adamant Chestplate", 1097 to "Adamant Leggings", 1098 to "Adamant Boots",     // Matcha's building set: slabs and stairs, cut on a stonecutter.-    119 to "Wool", 120 to "Suspicious Sand", 252 to "Shears", 253 to "Fishing Rod", 254 to "Raw Fish", 255 to "Brush",-    121 to "Wheat Crop", 122 to "Carrot Crop", 123 to "Melon Crop", 250 to "Wheat Seeds", 251 to "Wheat",+    119 to "Wool", 120 to "Suspicious Sand", 1148 to "Shears", 1149 to "Fishing Rod", 1150 to "Raw Fish", 1151 to "Brush",+    121 to "Wheat Crop", 122 to "Carrot Crop", 123 to "Melon Crop", 1146 to "Wheat Seeds", 1147 to "Wheat",     102 to "Stone Slab", 103 to "Stone Stairs", 104 to "Cobble Slab", 105 to "Cobble Stairs",     106 to "Plank Slab", 107 to "Plank Stairs", 108 to "Brick Slab", 109 to "Brick Stairs",     110 to "Sandstone Slab", 111 to "Sandstone Stairs",@@ -130,8 +130,8 @@ val blockNames = mapOf(  // Music disc item id -> track asset in assets/music/. val discTrack = mapOf(-    179 to "golden.ogg", 180 to "lullaby.ogg", 181 to "mcl_forest.ogg", 182 to "mcl_mining.ogg",-    183 to "mcl_winter.ogg", 184 to "mcl_piano.ogg", 185 to "mcl_gift.ogg"+    1075 to "golden.ogg", 1076 to "lullaby.ogg", 1077 to "mcl_forest.ogg", 1078 to "mcl_mining.ogg",+    1079 to "mcl_winter.ogg", 1080 to "mcl_piano.ogg", 1081 to "mcl_gift.ogg" )  val blockIconFile = mapOf(@@ -154,48 +154,48 @@ val blockIconFile = mapOf(     66 to "kelp.png", 67 to "sea_lantern.png", 68 to "prismarine.png", 69 to "dark_prismarine.png",     70 to "dripstone.png", 71 to "moss_block.png", 72 to "sculk.png", 73 to "amethyst.png", 74 to "calcite.png",     75 to "tuff.png", 76 to "magma.png", 77 to "glowstone.png", 78 to "obsidian.png", 79 to "clay.png", 80 to "azalea_leaves.png", 81 to "warding_stone.png",-    128 to "honey_bottle.png", 129 to "heart_container.png", 130 to "apple.png", 131 to "bread.png", 132 to "cooked_cod.png",-    133 to "golden_apple.png", 134 to "brownie.png", 135 to "carrot.png", 136 to "glistering_melon_slice.png", 137 to "leather.png", 138 to "gunpowder.png",-    146 to "baked_potato.png", 147 to "cookie.png", 148 to "cooked_salmon.png", 149 to "fried_egg.png", 150 to "cooked_rabbit.png",-    151 to "apple_empanada.png", 152 to "glow_berry_crumble.png", 153 to "chocolate_chip_cookie.png",-    154 to "iron_ingot.png", 155 to "diamond.png", 156 to "emerald.png", 157 to "coal.png", 158 to "redstone.png", 159 to "stick.png",-    160 to "blessing_clement.png", 161 to "blessing_ares.png", 162 to "blessing_yamm.png",-    203 to "blessing_daedalus.png", 204 to "blessing_icarus.png", 205 to "blessing_yama.png",-    206 to "blessing_talos.png", 207 to "blessing_god_king.png", 208 to "blessing_arachnae.png",-    209 to "blessing_prometheus.png", 210 to "blessing_lu_ban.png", 211 to "blessing_eros.png",-    212 to "blessing_will.png", 213 to "blessing_hyacinthus.png", 214 to "blessing_aeolus.png",-    215 to "blessing_cronus.png", 216 to "blessing_demeter.png", 217 to "blessing_glaucus.png",-    218 to "blessing_apollo.png", 219 to "blessing_artemis.png", 220 to "blessing_warding.png",-    119 to "wool.png", 120 to "suspicious_sand.png", 252 to "shears.png", 253 to "fishing_rod.png",-    254 to "raw_fish.png", 255 to "brush.png",+    1024 to "honey_bottle.png", 1025 to "heart_container.png", 1026 to "apple.png", 1027 to "bread.png", 1028 to "cooked_cod.png",+    1029 to "golden_apple.png", 1030 to "brownie.png", 1031 to "carrot.png", 1032 to "glistering_melon_slice.png", 1033 to "leather.png", 1034 to "gunpowder.png",+    1042 to "baked_potato.png", 1043 to "cookie.png", 1044 to "cooked_salmon.png", 1045 to "fried_egg.png", 1046 to "cooked_rabbit.png",+    1047 to "apple_empanada.png", 1048 to "glow_berry_crumble.png", 1049 to "chocolate_chip_cookie.png",+    1050 to "iron_ingot.png", 1051 to "diamond.png", 1052 to "emerald.png", 1053 to "coal.png", 1054 to "redstone.png", 1055 to "stick.png",+    1056 to "blessing_clement.png", 1057 to "blessing_ares.png", 1058 to "blessing_yamm.png",+    1099 to "blessing_daedalus.png", 1100 to "blessing_icarus.png", 1101 to "blessing_yama.png",+    1102 to "blessing_talos.png", 1103 to "blessing_god_king.png", 1104 to "blessing_arachnae.png",+    1105 to "blessing_prometheus.png", 1106 to "blessing_lu_ban.png", 1107 to "blessing_eros.png",+    1108 to "blessing_will.png", 1109 to "blessing_hyacinthus.png", 1110 to "blessing_aeolus.png",+    1111 to "blessing_cronus.png", 1112 to "blessing_demeter.png", 1113 to "blessing_glaucus.png",+    1114 to "blessing_apollo.png", 1115 to "blessing_artemis.png", 1116 to "blessing_warding.png",+    119 to "wool.png", 120 to "suspicious_sand.png", 1148 to "shears.png", 1149 to "fishing_rod.png",+    1150 to "raw_fish.png", 1151 to "brush.png",     121 to "wheat_crop.png", 122 to "carrot_crop.png", 123 to "melon_crop.png",-    250 to "wheat_seeds.png", 251 to "wheat.png",-    221 to "blessing_paris.png",-    245 to "blessing_athena.png", 246 to "blessing_sekhmet.png", 247 to "blessing_camazotz.png",-    248 to "blessing_tangaroa.png", 249 to "blessing_anubis.png",-    222 to "raw_meat.png", 223 to "cooked_meat.png", 224 to "ramen.png", 225 to "japanese_curry.png",-    226 to "green_curry.png", 227 to "gnocchi.png", 228 to "naan.png", 229 to "pupusa.png",-    230 to "latke.png", 231 to "bruschetta.png", 232 to "french_toast.png",-    233 to "sweet_berry_danish.png", 234 to "melon_sorbet.png", 235 to "stroganoff.png",+    1146 to "wheat_seeds.png", 1147 to "wheat.png",+    1117 to "blessing_paris.png",+    1141 to "blessing_athena.png", 1142 to "blessing_sekhmet.png", 1143 to "blessing_camazotz.png",+    1144 to "blessing_tangaroa.png", 1145 to "blessing_anubis.png",+    1118 to "raw_meat.png", 1119 to "cooked_meat.png", 1120 to "ramen.png", 1121 to "japanese_curry.png",+    1122 to "green_curry.png", 1123 to "gnocchi.png", 1124 to "naan.png", 1125 to "pupusa.png",+    1126 to "latke.png", 1127 to "bruschetta.png", 1128 to "french_toast.png",+    1129 to "sweet_berry_danish.png", 1130 to "melon_sorbet.png", 1131 to "stroganoff.png",     97 to "copper_ore.png", 98 to "gold_ore.png", 99 to "copper_block.png",     100 to "gold_block.png", 101 to "bronze_block.png",-    236 to "copper_ingot.png", 237 to "gold_ingot.png", 238 to "bronze_ingot.png",-    239 to "bronze_pickaxe.png", 240 to "bronze_sword.png", 241 to "bronze_helmet.png",-    242 to "bronze_chestplate.png", 243 to "bronze_leggings.png", 244 to "bronze_boots.png",-    163 to "wood_pickaxe.png", 164 to "wood_sword.png", 165 to "stone_pickaxe.png", 166 to "stone_sword.png",-    167 to "iron_pickaxe.png", 168 to "iron_sword.png", 169 to "diamond_pickaxe.png", 170 to "diamond_sword.png",-    171 to "iron_helmet.png", 172 to "iron_chestplate.png", 173 to "iron_leggings.png", 174 to "iron_boots.png",-    175 to "diamond_helmet.png", 176 to "diamond_chestplate.png", 177 to "diamond_leggings.png", 178 to "diamond_boots.png",+    1132 to "copper_ingot.png", 1133 to "gold_ingot.png", 1134 to "bronze_ingot.png",+    1135 to "bronze_pickaxe.png", 1136 to "bronze_sword.png", 1137 to "bronze_helmet.png",+    1138 to "bronze_chestplate.png", 1139 to "bronze_leggings.png", 1140 to "bronze_boots.png",+    1059 to "wood_pickaxe.png", 1060 to "wood_sword.png", 1061 to "stone_pickaxe.png", 1062 to "stone_sword.png",+    1063 to "iron_pickaxe.png", 1064 to "iron_sword.png", 1065 to "diamond_pickaxe.png", 1066 to "diamond_sword.png",+    1067 to "iron_helmet.png", 1068 to "iron_chestplate.png", 1069 to "iron_leggings.png", 1070 to "iron_boots.png",+    1071 to "diamond_helmet.png", 1072 to "diamond_chestplate.png", 1073 to "diamond_leggings.png", 1074 to "diamond_boots.png",     82 to "jukebox.png", 83 to "chest.png", 84 to "lava.png", 85 to "end_stone.png", 88 to "beacon.png", 89 to "purpur_block.png",-    179 to "music_disc_13.png", 180 to "music_disc_cat.png", 181 to "music_disc_blocks.png", 182 to "music_disc_chirp.png",-    183 to "music_disc_5.png", 184 to "music_disc_11.png", 185 to "music_disc_bounce.png",-    186 to "flint_and_steel.png", 187 to "nether_star.png", 188 to "elytra.png", 189 to "firework_rocket.png",-    190 to "snowball.png", 191 to "ender_pearl.png",+    1075 to "music_disc_13.png", 1076 to "music_disc_cat.png", 1077 to "music_disc_blocks.png", 1078 to "music_disc_chirp.png",+    1079 to "music_disc_5.png", 1080 to "music_disc_11.png", 1081 to "music_disc_bounce.png",+    1082 to "flint_and_steel.png", 1083 to "nether_star.png", 1084 to "elytra.png", 1085 to "firework_rocket.png",+    1086 to "snowball.png", 1087 to "ender_pearl.png",     90 to "silver_ore.png", 91 to "sulfur_ore.png", 92 to "cinnabar_ore.png",     93 to "silver_block.png", 94 to "steel_block.png", 95 to "adamant_block.png", 96 to "blast_furnace.png",-    192 to "sulfur.png", 193 to "silver_ingot.png", 194 to "quicksilver.png", 195 to "steel_ingot.png",-    196 to "adamant_ingot.png", 197 to "adamant_pickaxe.png", 198 to "adamant_sword.png",-    199 to "adamant_helmet.png", 200 to "adamant_chestplate.png", 201 to "adamant_leggings.png", 202 to "adamant_boots.png",+    1088 to "sulfur.png", 1089 to "silver_ingot.png", 1090 to "quicksilver.png", 1091 to "steel_ingot.png",+    1092 to "adamant_ingot.png", 1093 to "adamant_pickaxe.png", 1094 to "adamant_sword.png",+    1095 to "adamant_helmet.png", 1096 to "adamant_chestplate.png", 1097 to "adamant_leggings.png", 1098 to "adamant_boots.png",     // Slabs and stairs reuse their parent material's icon; the name tells them apart.     102 to "deepslate.png", 103 to "deepslate.png",     104 to "cobblestone.png", 105 to "cobblestone.png",@@ -214,20 +214,20 @@ val catalogNatural = listOf(3, 2, 40, 46, 60, 39, 41, 71, 1, 6, 38, 36, 37, 14,     121, 122, 123) val catalogOres = listOf(18, 19, 20, 21, 22, 90, 91, 92, 97, 98, 23, 24, 25, 93, 94, 95, 99, 100, 101, 73) val catalogOcean = listOf(61, 62, 63, 64, 65, 66, 67, 68, 69)-val catalogItems = listOf(128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,-    146, 147, 148, 149, 150, 151, 152, 153,-    154, 155, 156, 157, 158, 159, 187, 189, 190, 191,-    192, 193, 194, 195, 196,-    222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,-    236, 237, 238, 254, 250, 251)-val catalogBlessings = listOf(160, 161, 162, 203, 204, 205, 206, 207, 208, 209, 210, 211,-    212, 213, 214, 215, 216, 217, 218, 219, 220, 221,-    245, 246, 247, 248, 249)-val catalogGear = listOf(163, 164, 165, 166, 167, 168, 169, 170,-    171, 172, 173, 174, 175, 176, 177, 178, 186, 188,-    239, 240, 241, 242, 243, 244,-    197, 198, 199, 200, 201, 202, 252, 253, 255)-val catalogMusic = listOf(82, 179, 180, 181, 182, 183, 184, 185)+val catalogItems = listOf(1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034,+    1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049,+    1050, 1051, 1052, 1053, 1054, 1055, 1083, 1085, 1086, 1087,+    1088, 1089, 1090, 1091, 1092,+    1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131,+    1132, 1133, 1134, 1150, 1146, 1147)+val catalogBlessings = listOf(1056, 1057, 1058, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,+    1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117,+    1141, 1142, 1143, 1144, 1145)+val catalogGear = listOf(1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066,+    1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1082, 1084,+    1135, 1136, 1137, 1138, 1139, 1140,+    1093, 1094, 1095, 1096, 1097, 1098, 1148, 1149, 1151)+val catalogMusic = listOf(82, 1075, 1076, 1077, 1078, 1079, 1080, 1081) val catalogBuilding = listOf(10, 27, 30, 49, 52, 8, 57, 9, 53, 54, 55, 56, 58, 59, 72, 74, 76, 77, 78, 81, 7, 33, 34, 35, 96, 118, 88, 89,     102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 119) 
games/voxels/src/main/rust/src/blessing.rs
diff --git a/games/voxels/src/main/rust/src/blessing.rs b/games/voxels/src/main/rust/src/blessing.rsindex a84f66f01c..83e331c957 100644--- a/games/voxels/src/main/rust/src/blessing.rs+++ b/games/voxels/src/main/rust/src/blessing.rs@@ -59,35 +59,35 @@ const fn b(id: Id, passive: Passive, icon: &'static str, name: &'static str, eff  // Ids 160..162 predate the pantheon but are folded into it; every icon is Matcha's own artwork. pub const PANTHEON: [Blessing; 27] = [-    b(160, Passive::Traversal,     "blessing_clement.png",     "Blessing of Clement",      "Swift of foot; climbs a full block"),-    b(161, Passive::Might,         "blessing_ares.png",        "Blessing of Ares",         "Melee strikes hit far harder"),-    b(162, Passive::Deep,          "blessing_yamm.png",        "Blessing of Yamm",         "Swim freely beneath the waves"),-    b(203, Passive::ToolWard,      "blessing_daedalus.png",    "Blessing of Daedalus",     "Tools never wear down"),-    b(204, Passive::FeatherFall,   "blessing_icarus.png",      "Blessing of Icarus",       "You take no falling damage"),-    b(205, Passive::Pyre,          "blessing_yama.png",        "Blessing of Yama",         "Fire and lava cannot burn you"),-    b(206, Passive::Impact,        "blessing_talos.png",       "Blessing of Talos",        "Your blows send foes flying"),-    b(207, Passive::SmiteUndead,   "blessing_god_king.png",    "Blessing of the God King", "Double damage to the undead"),-    b(208, Passive::BaneOfHorrors, "blessing_arachnae.png",    "Blessing of Arachnae",     "Double damage to creepers and horrors"),-    b(209, Passive::ArmorWard,     "blessing_prometheus.png",  "Blessing of Prometheus",   "Armor never wears down"),-    b(210, Passive::Mending,       "blessing_lu_ban.png",      "Blessing of Lu Ban",       "Your gear slowly mends itself"),-    b(211, Passive::Fortune,       "blessing_eros.png",        "Blessing of Eros",         "Ores yield twice as much"),-    b(212, Passive::Reach,         "blessing_will.png",        "Blessing of Will",         "You can reach much further"),-    b(213, Passive::DoubleJump,    "blessing_hyacinthus.png",  "Blessing of Hyacinthus",   "Leap a second time in mid-air"),-    b(214, Passive::WindBurst,     "blessing_aeolus.png",      "Blessing of Aeolus",       "Landing a hit throws you skyward"),-    b(215, Passive::SwiftSneak,    "blessing_cronus.png",      "Blessing of Cronus",       "Sneak at a walking pace"),-    b(216, Passive::FrostWalker,   "blessing_demeter.png",     "Blessing of Demeter",      "Water freezes beneath your feet"),-    b(217, Passive::SeaLuck,       "blessing_glaucus.png",     "Blessing of Glaucus",      "Chests and foes give up more"),-    b(218, Passive::Marksman,      "blessing_apollo.png",      "Blessing of Apollo",       "Thrown weapons strike twice as hard"),-    b(219, Passive::Multishot,     "blessing_artemis.png",     "Blessing of Artemis",      "Throw three projectiles at once"),-    b(220, Passive::Thorns,        "blessing_warding.png",     "Blessing of Warding",      "Attackers suffer for striking you"),-    b(221, Passive::Infinity,      "blessing_paris.png",       "Blessing of Paris",        "Thrown items are never used up"),+    b(1056, Passive::Traversal,     "blessing_clement.png",     "Blessing of Clement",      "Swift of foot; climbs a full block"),+    b(1057, Passive::Might,         "blessing_ares.png",        "Blessing of Ares",         "Melee strikes hit far harder"),+    b(1058, Passive::Deep,          "blessing_yamm.png",        "Blessing of Yamm",         "Swim freely beneath the waves"),+    b(1099, Passive::ToolWard,      "blessing_daedalus.png",    "Blessing of Daedalus",     "Tools never wear down"),+    b(1100, Passive::FeatherFall,   "blessing_icarus.png",      "Blessing of Icarus",       "You take no falling damage"),+    b(1101, Passive::Pyre,          "blessing_yama.png",        "Blessing of Yama",         "Fire and lava cannot burn you"),+    b(1102, Passive::Impact,        "blessing_talos.png",       "Blessing of Talos",        "Your blows send foes flying"),+    b(1103, Passive::SmiteUndead,   "blessing_god_king.png",    "Blessing of the God King", "Double damage to the undead"),+    b(1104, Passive::BaneOfHorrors, "blessing_arachnae.png",    "Blessing of Arachnae",     "Double damage to creepers and horrors"),+    b(1105, Passive::ArmorWard,     "blessing_prometheus.png",  "Blessing of Prometheus",   "Armor never wears down"),+    b(1106, Passive::Mending,       "blessing_lu_ban.png",      "Blessing of Lu Ban",       "Your gear slowly mends itself"),+    b(1107, Passive::Fortune,       "blessing_eros.png",        "Blessing of Eros",         "Ores yield twice as much"),+    b(1108, Passive::Reach,         "blessing_will.png",        "Blessing of Will",         "You can reach much further"),+    b(1109, Passive::DoubleJump,    "blessing_hyacinthus.png",  "Blessing of Hyacinthus",   "Leap a second time in mid-air"),+    b(1110, Passive::WindBurst,     "blessing_aeolus.png",      "Blessing of Aeolus",       "Landing a hit throws you skyward"),+    b(1111, Passive::SwiftSneak,    "blessing_cronus.png",      "Blessing of Cronus",       "Sneak at a walking pace"),+    b(1112, Passive::FrostWalker,   "blessing_demeter.png",     "Blessing of Demeter",      "Water freezes beneath your feet"),+    b(1113, Passive::SeaLuck,       "blessing_glaucus.png",     "Blessing of Glaucus",      "Chests and foes give up more"),+    b(1114, Passive::Marksman,      "blessing_apollo.png",      "Blessing of Apollo",       "Thrown weapons strike twice as hard"),+    b(1115, Passive::Multishot,     "blessing_artemis.png",     "Blessing of Artemis",      "Throw three projectiles at once"),+    b(1116, Passive::Thorns,        "blessing_warding.png",     "Blessing of Warding",      "Attackers suffer for striking you"),+    b(1117, Passive::Infinity,      "blessing_paris.png",       "Blessing of Paris",        "Thrown items are never used up"),     // These five carry Matcha enchantments with no earlier equivalent, so their charms are recoloured     // rather than drawn from the pack's own artwork.-    b(245, Passive::Divinity,      "blessing_athena.png",      "Blessing of Athena",       "A shield that reforms out of combat"),-    b(246, Passive::Bloodrage,     "blessing_sekhmet.png",     "Blessing of Sekhmet",      "Near death you grow stronger and harder to kill"),-    b(247, Passive::Lifesteal,     "blessing_camazotz.png",    "Blessing of Camazotz",     "Your strikes drink the life from foes"),-    b(248, Passive::Conduit,       "blessing_tangaroa.png",    "Blessing of Tangaroa",     "You see and fight at full strength underwater"),-    b(249, Passive::WardUndead,    "blessing_anubis.png",      "Blessing of Anubis",       "The undead will not come near you"),+    b(1141, Passive::Divinity,      "blessing_athena.png",      "Blessing of Athena",       "A shield that reforms out of combat"),+    b(1142, Passive::Bloodrage,     "blessing_sekhmet.png",     "Blessing of Sekhmet",      "Near death you grow stronger and harder to kill"),+    b(1143, Passive::Lifesteal,     "blessing_camazotz.png",    "Blessing of Camazotz",     "Your strikes drink the life from foes"),+    b(1144, Passive::Conduit,       "blessing_tangaroa.png",    "Blessing of Tangaroa",     "You see and fight at full strength underwater"),+    b(1145, Passive::WardUndead,    "blessing_anubis.png",      "Blessing of Anubis",       "The undead will not come near you"), ];  pub fn is_blessing(id: Id) -> bool { PANTHEON.iter().any(|b| b.id == id) }@@ -162,11 +162,11 @@ mod tests {     #[test]     fn attuning_fills_slots_and_rejects_duplicates() {         let mut a = Attunement::default();-        assert!(a.attune(160));-        assert!(!a.attune(160), "the same blessing must not stack");-        assert!(a.attune(204));-        assert!(a.attune(211));-        assert!(!a.attune(212), "there are only {SLOTS} slots");+        assert!(a.attune(1056));+        assert!(!a.attune(1056), "the same blessing must not stack");+        assert!(a.attune(1100));+        assert!(a.attune(1107));+        assert!(!a.attune(1108), "there are only {SLOTS} slots");         assert!(a.has(Passive::Traversal));         assert!(a.has(Passive::Fortune));         assert!(!a.has(Passive::Reach));@@ -175,19 +175,19 @@ mod tests {     #[test]     fn releasing_returns_the_charm() {         let mut a = Attunement::default();-        a.attune(205);+        a.attune(1101);         assert!(a.has(Passive::Pyre));-        assert_eq!(a.release(0), Some(205));+        assert_eq!(a.release(0), Some(1101));         assert!(!a.has(Passive::Pyre));         assert_eq!(a.release(0), None, "an empty slot gives nothing back");-        assert!(a.attune(212), "the slot is free again");+        assert!(a.attune(1108), "the slot is free again");     }      #[test]     fn non_blessings_cannot_be_attuned() {         let mut a = Attunement::default();         assert!(!a.attune(0));-        assert!(!a.attune(155)); // a diamond-        assert!(!a.attune(169)); // a pickaxe+        assert!(!a.attune(1051)); // a diamond+        assert!(!a.attune(1065)); // a pickaxe     } }
games/voxels/src/main/rust/src/container.rs
diff --git a/games/voxels/src/main/rust/src/container.rs b/games/voxels/src/main/rust/src/container.rsindex af20133a53..4aacdc2ad2 100644--- a/games/voxels/src/main/rust/src/container.rs+++ b/games/voxels/src/main/rust/src/container.rs@@ -104,9 +104,9 @@ pub fn roll_loot(x: i32, y: i32, z: i32, dim: u8, lucky: bool) -> Vec<InvSlot> {     let mut r = ((x as u64).wrapping_mul(73856093) ^ (y as u64).wrapping_mul(19349663) ^ (z as u64).wrapping_mul(83492791)) | 1;     let next = |r: &mut u64| { *r ^= *r << 13; *r ^= *r >> 7; *r ^= *r << 17; *r };     // (item id, max stack from this chest).-    let end_pool: [(Id, i32); 9] = [(188, 1), (176, 1), (175, 1), (170, 1), (129, 1), (155, 3), (156, 4), (133, 2), (24, 2)];-    let nether_pool: [(Id, i32); 7] = [(192, 6), (194, 2), (195, 2), (157, 8), (154, 4), (133, 1), (138, 3)];-    let over_pool: [(Id, i32); 12] = [(157, 8), (154, 4), (155, 1), (156, 2), (131, 4), (133, 1), (168, 1), (128, 1), (138, 3), (137, 2), (193, 2), (223, 3)];+    let end_pool: [(Id, i32); 9] = [(1084, 1), (1072, 1), (1071, 1), (1066, 1), (1025, 1), (1051, 3), (1052, 4), (1029, 2), (24, 2)];+    let nether_pool: [(Id, i32); 7] = [(1088, 6), (1090, 2), (1091, 2), (1053, 8), (1050, 4), (1029, 1), (1034, 3)];+    let over_pool: [(Id, i32); 12] = [(1053, 8), (1050, 4), (1051, 1), (1052, 2), (1027, 4), (1029, 1), (1064, 1), (1024, 1), (1034, 3), (1033, 2), (1089, 2), (1119, 3)];     let pool: &[(Id, i32)] = match dim { 2 => &end_pool, 1 => &nether_pool, _ => &over_pool };      let mut slots = vec![InvSlot::default(); CONTAINER_SLOTS];@@ -203,18 +203,18 @@ mod tests {     fn take_from_leaves_the_remainder_when_inventory_is_full() {         let mut inv = Inventory::default();         for s in inv.slots.iter_mut() { *s = InvSlot { id: 2, count: STACK }; } // all dirt, no room-        let mut slot = InvSlot { id: 155, count: 7 }; // 7 diamonds in the chest+        let mut slot = InvSlot { id: 1051, count: 7 }; // 7 diamonds in the chest         inv.take_from(&mut slot);         assert_eq!(slot.count, 7, "nothing fit, so nothing should have left the chest");-        assert_eq!(slot.id, 155);+        assert_eq!(slot.id, 1051);     }      #[test]     fn take_from_moves_what_fits() {         let mut inv = Inventory::default();         for s in inv.slots.iter_mut() { *s = InvSlot { id: 2, count: STACK }; }-        inv.slots[5] = InvSlot { id: 155, count: STACK - 3 }; // room for exactly 3 diamonds-        let mut slot = InvSlot { id: 155, count: 10 };+        inv.slots[5] = InvSlot { id: 1051, count: STACK - 3 }; // room for exactly 3 diamonds+        let mut slot = InvSlot { id: 1051, count: 10 };         inv.take_from(&mut slot);         assert_eq!(slot.count, 7, "only 3 of 10 should have moved");         assert_eq!(inv.slots[5].count, STACK);
games/voxels/src/main/rust/src/engine.rs
diff --git a/games/voxels/src/main/rust/src/engine.rs b/games/voxels/src/main/rust/src/engine.rsindex 12725bdc76..b317b3e7ce 100644--- a/games/voxels/src/main/rust/src/engine.rs+++ b/games/voxels/src/main/rust/src/engine.rs@@ -471,7 +471,7 @@ pub fn tick_and_render() {         if state.dim == 0 { state.deepest_y = state.deepest_y.min(state.player.pos.y as i32); }          // Elytra equipped in the chest slot enables gliding.-        state.player.elytra = state.inventory.armor[1].id == 188;+        state.player.elytra = state.inventory.armor[1].id == 1084;         state.player.tick(dt, &input_mut, &state.chunks);         state.player.tick_status(dt);         // Lava burns (Fire Resistance negates it).@@ -517,8 +517,8 @@ pub fn tick_and_render() {                 state.respawn = Some(cp);                 if state.checkpoint_cd <= 0.0 {                     state.checkpoint_cd = 2.0;-                    let have: i32 = state.inventory.slots.iter().filter(|s| s.id == 128).map(|s| s.count).sum();-                    if have < 4 { state.inventory.add_block(128); }+                    let have: i32 = state.inventory.slots.iter().filter(|s| s.id == 1024).map(|s| s.count).sum();+                    if have < 4 { state.inventory.add_block(1024); }                     state.player.add_effect(crate::item::Effect::Regeneration, 2.5, 0);                 }             }@@ -806,8 +806,8 @@ fn publish_ui(state: &EngineState) {         "elytra": state.player.elytra,         "maxHearts": state.player.max_health >= crate::player::CAP_MAX_HEALTH,         // Full diamond (175..178) or full adamant (199..202) counts as end-tier armor.-        "fullArmor": armor_at_least(175, 178) || armor_at_least(199, 202),-        "silver": has(193), "steel": has(195), "adamant": has(196),+        "fullArmor": armor_at_least(1071, 1074) || armor_at_least(1095, 1098),+        "silver": has(1089), "steel": has(1091), "adamant": has(1092),         "blessing": state.inventory.slots.iter().any(|s| s.count > 0 && crate::blessing::is_blessing(s.id))             || state.player.blessings.slots.iter().any(|&id| id != 0),         "depth": state.deepest_y,@@ -822,7 +822,7 @@ fn publish_ui(state: &EngineState) {     }).to_string();     let inv = state.inventory.to_json();     let effects: Vec<_> = state.player.effects.iter().map(|e| serde_json::json!({"k": e.kind.key(), "amp": e.amp, "t": e.secs.ceil() as i32})).collect();-    let estus: i32 = state.inventory.slots.iter().filter(|s| s.id == 128).map(|s| s.count).sum();+    let estus: i32 = state.inventory.slots.iter().filter(|s| s.id == 1024).map(|s| s.count).sum();     let boss_mob = state.mobs.iter().find(|m| m.kind.is_boss());     let boss: f32 = boss_mob.map(|m| (m.health / m.max_health).clamp(0.0, 1.0)).unwrap_or(-1.0);     let boss_name = match boss_mob.map(|m| m.kind) { Some(MobKind::Dragon) => "Ender Dragon", Some(MobKind::Wither) => "The Wither", _ => "" };@@ -1552,7 +1552,7 @@ fn do_break(state: &mut EngineState, origin: Vec3, dir: Vec3) -> bool {             if is_leaves(id) {                 let r = &mut state.spawn_rng;                 *r ^= *r << 13; *r ^= *r >> 17; *r ^= *r << 5;-                if *r % 20 == 0 { state.inventory.add_block(130); }+                if *r % 20 == 0 { state.inventory.add_block(1026); }             }             let crop = Block::from_id(id);             if crop.is_crop() {@@ -1799,12 +1799,12 @@ fn harvest_crop(state: &mut EngineState, crop: Block, meta: u8) { /// model, so the pool is the small treasures a buried cache would plausibly hold. pub fn buried_find(roll: f32) -> Id {     match (roll.clamp(0.0, 0.999) * 100.0) as u32 {-        0..=29 => 137,                                  // leather scraps-        30..=54 => 236,                                 // copper ingot+        0..=29 => 1033,                                 // leather scraps+        30..=54 => 1132,                                // copper ingot         55..=74 => Block::Amethyst as Id,-        75..=89 => 237,                                 // gold ingot-        90..=96 => 156,                                 // emerald-        _ => 155,                                       // diamond+        75..=89 => 1133,                                // gold ingot+        90..=96 => 1052,                                // emerald+        _ => 1051,                                      // diamond     } } @@ -2109,8 +2109,8 @@ mod tests {         for i in 0..n {             let id = buried_find(i as f32 / n as f32);             assert!(id != 0, "an empty dig site");-            assert!(id <= crate::world::block::MAX_LOW_BLOCK_ID || crate::item::is_item(id), "{id} is not an id");-            if id == 155 { diamonds += 1; }+            assert!(id <= crate::world::block::MAX_BLOCK_ID || crate::item::is_item(id), "{id} is not an id");+            if id == 1051 { diamonds += 1; }         }         let rate = diamonds as f32 / n as f32;         assert!(rate > 0.0 && rate < 0.06, "diamonds turn up {rate} of the time, which is not a treasure");
games/voxels/src/main/rust/src/entity.rs
diff --git a/games/voxels/src/main/rust/src/entity.rs b/games/voxels/src/main/rust/src/entity.rsindex fe2e16ed1d..8f193fc013 100644--- a/games/voxels/src/main/rust/src/entity.rs+++ b/games/voxels/src/main/rust/src/entity.rs@@ -138,12 +138,12 @@ impl MobKind {     // Item ids dropped on death (auto-collected into the inventory).     pub fn loot(self) -> &'static [Id] {         match self {-            // Livestock give up raw meat (222); it has to be cooked in a furnace before it feeds you.-            MobKind::Pig => &[222], MobKind::Cow => &[137, 222], MobKind::Sheep => &[222], MobKind::Chicken => &[222, 149],-            MobKind::Creeper => &[138], MobKind::Zombie => &[131], MobKind::Villager => &[], MobKind::Dragon => &[85, 25, 25],-            MobKind::Wither => &[187, 155, 155],-            MobKind::Blaze => &[157], MobKind::WitherSkeleton => &[157, 154], MobKind::Shulker => &[89, 191],-            MobKind::Ghast => &[138, 138],+            // Livestock give up raw meat (1118); it has to be cooked in a furnace before it feeds you.+            MobKind::Pig => &[1118], MobKind::Cow => &[1033, 1118], MobKind::Sheep => &[1118], MobKind::Chicken => &[1118, 1045],+            MobKind::Creeper => &[1034], MobKind::Zombie => &[1027], MobKind::Villager => &[], MobKind::Dragon => &[85, 25, 25],+            MobKind::Wither => &[1083, 1051, 1051],+            MobKind::Blaze => &[1053], MobKind::WitherSkeleton => &[1053, 1050], MobKind::Shulker => &[89, 1087],+            MobKind::Ghast => &[1034, 1034],         }     }     // Matcha makes zombies notably fast; they're the pressure mob, so they out-run a walking player.
games/voxels/src/main/rust/src/fishing.rs
diff --git a/games/voxels/src/main/rust/src/fishing.rs b/games/voxels/src/main/rust/src/fishing.rsindex aee0a07a9e..275cf2e4a9 100644--- a/games/voxels/src/main/rust/src/fishing.rs+++ b/games/voxels/src/main/rust/src/fishing.rs@@ -6,9 +6,9 @@ /// Item 254. Cook it in a furnace for the cooked fish the villagers sell. use crate::world::block::Id; -pub const RAW_FISH: Id = 254;+pub const RAW_FISH: Id = 1150; /// Item 253.-pub const ROD: Id = 253;+pub const ROD: Id = 1149;  /// Shortest and longest wait before a bite. const WAIT_MIN: f32 = 3.0;@@ -70,10 +70,10 @@ pub fn catch_of_the_day(roll: f32, lucky: bool) -> Id {     if r < treasure {         // Four treasures, evenly split within the treasure band.         match ((r / treasure) * 4.0) as u32 {-            0 => 191,                                  // ender pearl-            1 => 156,                                  // emerald+            0 => 1087,                                  // ender pearl+            1 => 1052,                                  // emerald             2 => crate::world::block::Block::SeaLantern as Id,-            _ => 137,                                  // leather (a waterlogged boot, near enough)+            _ => 1033,                                  // leather (a waterlogged boot, near enough)         }     } else if r < treasure + junk {         crate::world::block::Block::Kelp as Id@@ -133,7 +133,7 @@ mod tests {             for i in 0..n {                 let id = catch_of_the_day(i as f32 / n as f32, lucky);                 assert!(id != 0, "the hook came up with nothing");-                assert!(id <= crate::world::block::MAX_LOW_BLOCK_ID || crate::item::is_item(id), "{id} is not an id");+                assert!(id <= crate::world::block::MAX_BLOCK_ID || crate::item::is_item(id), "{id} is not an id");                 if id == RAW_FISH { fish += 1; }                 else if id == crate::world::block::Block::Kelp as Id { junk += 1; }                 else { treasure += 1; }
games/voxels/src/main/rust/src/inventory.rs
diff --git a/games/voxels/src/main/rust/src/inventory.rs b/games/voxels/src/main/rust/src/inventory.rsindex c4033fa2aa..9ea7a7c12a 100644--- a/games/voxels/src/main/rust/src/inventory.rs+++ b/games/voxels/src/main/rust/src/inventory.rs@@ -21,7 +21,7 @@ pub struct Inventory {     pub armor: [InvSlot; 4], } -// Item ids 154+ are materials/tools (see item.rs). Ore -> material conversions live in SMELTING+// Item ids 1050+ are materials/tools (see item.rs). Ore -> material conversions live in SMELTING // instead, since those need a furnace, fuel and time. /// One crafting recipe. `in2 == 0` means a single ingredient. ///@@ -41,104 +41,104 @@ const fn r(in1: Id, n1: i32, in2: Id, n2: i32, out: Id, out_n: i32, unlocked_by: }  pub const RECIPES: [Recipe; 96] = [-    r(154, 1, 157, 1, 186, 1, 165), // iron + coal -> flint & steel-    r(154, 2, 0, 0, 252, 1, 165),   // iron            -> shears-    r(159, 3, 137, 2, 253, 1, 159), // sticks + leather -> fishing rod-    r(159, 1, 236, 1, 255, 1, 159), // stick + copper   -> archaeologist's brush-    r(251, 3, 0, 0, 131, 1, 250),   // wheat            -> bread-    r(Block::HayBlock as Id, 1, 0, 0, 250, 4, 0), // hay bale -> wheat seeds-    r(187, 1, Block::Glass as Id, 5, Block::Beacon as Id, 1, 169), // nether star + glass -> beacon-    r(138, 2, 0, 0, 189, 3, 0), // gunpowder -> firework rockets-    r(Block::Snow as Id, 1, 0, 0, 190, 4, 0), // snow -> snowballs+    r(1050, 1, 1053, 1, 1082, 1, 1061), // iron + coal -> flint & steel+    r(1050, 2, 0, 0, 1148, 1, 1061),   // iron            -> shears+    r(1055, 3, 1033, 2, 1149, 1, 1055), // sticks + leather -> fishing rod+    r(1055, 1, 1132, 1, 1151, 1, 1055), // stick + copper   -> archaeologist's brush+    r(1147, 3, 0, 0, 1027, 1, 1146),   // wheat            -> bread+    r(Block::HayBlock as Id, 1, 0, 0, 1146, 4, 0), // hay bale -> wheat seeds+    r(1083, 1, Block::Glass as Id, 5, Block::Beacon as Id, 1, 1065), // nether star + glass -> beacon+    r(1034, 2, 0, 0, 1085, 3, 0), // gunpowder -> firework rockets+    r(Block::Snow as Id, 1, 0, 0, 1086, 4, 0), // snow -> snowballs     r(Block::Wood as Id, 1, 0, 0, Block::Planks as Id, 4, 0),     r(Block::BirchLog as Id, 1, 0, 0, Block::BirchPlanks as Id, 4, 0),     r(Block::SpruceLog as Id, 1, 0, 0, Block::SprucePlanks as Id, 4, 0),     r(Block::Planks as Id, 4, 0, 0, Block::CraftingTable as Id, 1, 0),     r(Block::Cobble as Id, 8, 0, 0, Block::Furnace as Id, 1, 0),     r(Block::Diorite as Id, 4, 0, 0, Block::PolishedDiorite as Id, 4, 0),-    r(Block::Planks as Id, 2, 0, 0, 159 /*Stick*/, 4, 0),+    r(Block::Planks as Id, 2, 0, 0, 1055 /*Stick*/, 4, 0),     // Material -> block.-    r(154, 9, 0, 0, Block::IronBlock as Id, 1, 165),-    r(155, 9, 0, 0, Block::DiamondBlock as Id, 1, 167),-    r(156, 9, 0, 0, Block::EmeraldBlock as Id, 1, 167),-    // Tools: material + stick(159).-    r(Block::Planks as Id, 3, 159, 2, 163, 1, 0), // wood pickaxe-    r(Block::Planks as Id, 2, 159, 1, 164, 1, 0), // wood sword-    r(Block::Cobble as Id, 3, 159, 2, 165, 1, 163), // stone pickaxe-    r(Block::Cobble as Id, 2, 159, 1, 166, 1, 163), // stone sword-    r(154, 3, 159, 2, 167, 1, 165),                 // iron pickaxe-    r(154, 2, 159, 1, 168, 1, 165),                 // iron sword-    r(155, 3, 159, 2, 169, 1, 167),                 // diamond pickaxe-    r(155, 2, 159, 1, 170, 1, 167),                 // diamond sword+    r(1050, 9, 0, 0, Block::IronBlock as Id, 1, 1061),+    r(1051, 9, 0, 0, Block::DiamondBlock as Id, 1, 1063),+    r(1052, 9, 0, 0, Block::EmeraldBlock as Id, 1, 1063),+    // Tools: material + stick(1055).+    r(Block::Planks as Id, 3, 1055, 2, 1059, 1, 0), // wood pickaxe+    r(Block::Planks as Id, 2, 1055, 1, 1060, 1, 0), // wood sword+    r(Block::Cobble as Id, 3, 1055, 2, 1061, 1, 1059), // stone pickaxe+    r(Block::Cobble as Id, 2, 1055, 1, 1062, 1, 1059), // stone sword+    r(1050, 3, 1055, 2, 1063, 1, 1061),                 // iron pickaxe+    r(1050, 2, 1055, 1, 1064, 1, 1061),                 // iron sword+    r(1051, 3, 1055, 2, 1065, 1, 1063),                 // diamond pickaxe+    r(1051, 2, 1055, 1, 1066, 1, 1063),                 // diamond sword     // Armor: material only.-    r(154, 5, 0, 0, 171, 1, 167), r(154, 8, 0, 0, 172, 1, 167), r(154, 7, 0, 0, 173, 1, 167), r(154, 4, 0, 0, 174, 1, 167), // iron-    r(155, 5, 0, 0, 175, 1, 169), r(155, 8, 0, 0, 176, 1, 169), r(155, 7, 0, 0, 177, 1, 169), r(155, 4, 0, 0, 178, 1, 169), // diamond+    r(1050, 5, 0, 0, 1067, 1, 1063), r(1050, 8, 0, 0, 1068, 1, 1063), r(1050, 7, 0, 0, 1069, 1, 1063), r(1050, 4, 0, 0, 1070, 1, 1063), // iron+    r(1051, 5, 0, 0, 1071, 1, 1065), r(1051, 8, 0, 0, 1072, 1, 1065), r(1051, 7, 0, 0, 1073, 1, 1065), r(1051, 4, 0, 0, 1074, 1, 1065), // diamond     // --- Matcha alloy tier ---     // Adamant gear: the tier above diamond.-    r(196, 3, 159, 2, 197, 1, Block::BlastFurnace as Id), // adamant pickaxe-    r(196, 2, 159, 1, 198, 1, 197), // adamant sword-    r(196, 5, 0, 0, 199, 1, 197), r(196, 8, 0, 0, 200, 1, 197), r(196, 7, 0, 0, 201, 1, 197), r(196, 4, 0, 0, 202, 1, 197),+    r(1092, 3, 1055, 2, 1093, 1, Block::BlastFurnace as Id), // adamant pickaxe+    r(1092, 2, 1055, 1, 1094, 1, 1093), // adamant sword+    r(1092, 5, 0, 0, 1095, 1, 1093), r(1092, 8, 0, 0, 1096, 1, 1093), r(1092, 7, 0, 0, 1097, 1, 1093), r(1092, 4, 0, 0, 1098, 1, 1093),     // Metal storage blocks (silver/steel/adamant also power beacons).-    r(193, 9, 0, 0, Block::SilverBlock as Id, 1, Block::BlastFurnace as Id),-    r(195, 9, 0, 0, Block::SteelBlock as Id, 1, Block::BlastFurnace as Id),-    r(196, 9, 0, 0, Block::AdamantBlock as Id, 1, Block::BlastFurnace as Id),+    r(1089, 9, 0, 0, Block::SilverBlock as Id, 1, Block::BlastFurnace as Id),+    r(1091, 9, 0, 0, Block::SteelBlock as Id, 1, Block::BlastFurnace as Id),+    r(1092, 9, 0, 0, Block::AdamantBlock as Id, 1, Block::BlastFurnace as Id),     // A steel-lined furnace: the only place the alloy recipes will smelt.-    r(Block::Furnace as Id, 1, 195, 5, Block::BlastFurnace as Id, 1, Block::Furnace as Id),+    r(Block::Furnace as Id, 1, 1091, 5, Block::BlastFurnace as Id, 1, Block::Furnace as Id),     // Blessings: quicksilver charms bound to a thematic offering. Attuning one grants a permanent     // passive (see blessing.rs), so the ingredient cost tracks roughly how strong the passive is.-    r(194, 2, 193, 1, 160, 1, Block::BlastFurnace as Id),  // silver          -> Clement, swift of foot-    r(194, 2, 154, 4, 161, 1, Block::BlastFurnace as Id),  // iron            -> Ares, might-    r(194, 2, 156, 2, 162, 1, Block::BlastFurnace as Id),  // emerald         -> Yamm, the deep-    r(194, 2, 195, 3, 203, 1, Block::BlastFurnace as Id),  // steel           -> Daedalus, tools never wear-    r(194, 2, 189, 4, 204, 1, Block::BlastFurnace as Id),  // fireworks       -> Icarus, no fall damage-    r(194, 2, 192, 6, 205, 1, Block::BlastFurnace as Id),  // sulfur          -> Yama, immune to fire-    r(194, 2, Block::Obsidian as Id, 4, 206, 1, Block::BlastFurnace as Id),   // Talos, crushing blows-    r(194, 2, 187, 1, 207, 1, Block::BlastFurnace as Id),  // nether star     -> the God King, smite the undead-    r(194, 2, 138, 8, 208, 1, Block::BlastFurnace as Id),  // gunpowder       -> Arachnae, bane of horrors-    r(194, 2, 196, 2, 209, 1, Block::BlastFurnace as Id),  // adamant         -> Prometheus, armor never wears-    r(194, 2, 155, 3, 210, 1, Block::BlastFurnace as Id),  // diamond         -> Lu Ban, mending-    r(194, 2, Block::EmeraldBlock as Id, 1, 211, 1, Block::BlastFurnace as Id), // Eros, fortune-    r(194, 2, 191, 3, 212, 1, Block::BlastFurnace as Id),  // ender pearls    -> Will, reach-    r(194, 2, Block::Glowstone as Id, 4, 213, 1, Block::BlastFurnace as Id),  // Hyacinthus, second jump-    r(194, 2, Block::Purpur as Id, 6, 214, 1, Block::BlastFurnace as Id),     // Aeolus, wind burst-    r(194, 2, Block::Sculk as Id, 8, 215, 1, Block::BlastFurnace as Id),      // Cronus, swift sneak-    r(194, 2, Block::BlueIce as Id, 4, 216, 1, Block::BlastFurnace as Id),    // Demeter, frost walker-    r(194, 2, Block::SeaLantern as Id, 4, 217, 1, Block::BlastFurnace as Id), // Glaucus, sea luck-    r(194, 2, Block::Amethyst as Id, 6, 218, 1, Block::BlastFurnace as Id),   // Apollo, marksman-    r(194, 2, 190, 16, 219, 1, Block::BlastFurnace as Id), // snowballs       -> Artemis, multishot-    r(194, 2, Block::WardingStone as Id, 2, 220, 1, Block::BlastFurnace as Id), // Warding, thorns-    r(194, 2, Block::DiamondBlock as Id, 1, 221, 1, Block::BlastFurnace as Id), // Paris, infinity+    r(1090, 2, 1089, 1, 1056, 1, Block::BlastFurnace as Id),  // silver          -> Clement, swift of foot+    r(1090, 2, 1050, 4, 1057, 1, Block::BlastFurnace as Id),  // iron            -> Ares, might+    r(1090, 2, 1052, 2, 1058, 1, Block::BlastFurnace as Id),  // emerald         -> Yamm, the deep+    r(1090, 2, 1091, 3, 1099, 1, Block::BlastFurnace as Id),  // steel           -> Daedalus, tools never wear+    r(1090, 2, 1085, 4, 1100, 1, Block::BlastFurnace as Id),  // fireworks       -> Icarus, no fall damage+    r(1090, 2, 1088, 6, 1101, 1, Block::BlastFurnace as Id),  // sulfur          -> Yama, immune to fire+    r(1090, 2, Block::Obsidian as Id, 4, 1102, 1, Block::BlastFurnace as Id),   // Talos, crushing blows+    r(1090, 2, 1083, 1, 1103, 1, Block::BlastFurnace as Id),  // nether star     -> the God King, smite the undead+    r(1090, 2, 1034, 8, 1104, 1, Block::BlastFurnace as Id),  // gunpowder       -> Arachnae, bane of horrors+    r(1090, 2, 1092, 2, 1105, 1, Block::BlastFurnace as Id),  // adamant         -> Prometheus, armor never wears+    r(1090, 2, 1051, 3, 1106, 1, Block::BlastFurnace as Id),  // diamond         -> Lu Ban, mending+    r(1090, 2, Block::EmeraldBlock as Id, 1, 1107, 1, Block::BlastFurnace as Id), // Eros, fortune+    r(1090, 2, 1087, 3, 1108, 1, Block::BlastFurnace as Id),  // ender pearls    -> Will, reach+    r(1090, 2, Block::Glowstone as Id, 4, 1109, 1, Block::BlastFurnace as Id),  // Hyacinthus, second jump+    r(1090, 2, Block::Purpur as Id, 6, 1110, 1, Block::BlastFurnace as Id),     // Aeolus, wind burst+    r(1090, 2, Block::Sculk as Id, 8, 1111, 1, Block::BlastFurnace as Id),      // Cronus, swift sneak+    r(1090, 2, Block::BlueIce as Id, 4, 1112, 1, Block::BlastFurnace as Id),    // Demeter, frost walker+    r(1090, 2, Block::SeaLantern as Id, 4, 1113, 1, Block::BlastFurnace as Id), // Glaucus, sea luck+    r(1090, 2, Block::Amethyst as Id, 6, 1114, 1, Block::BlastFurnace as Id),   // Apollo, marksman+    r(1090, 2, 1086, 16, 1115, 1, Block::BlastFurnace as Id), // snowballs       -> Artemis, multishot+    r(1090, 2, Block::WardingStone as Id, 2, 1116, 1, Block::BlastFurnace as Id), // Warding, thorns+    r(1090, 2, Block::DiamondBlock as Id, 1, 1117, 1, Block::BlastFurnace as Id), // Paris, infinity     // The five late additions cost the alloy tier, so they arrive after the Blast Furnace does.-    r(194, 2, Block::IronBlock as Id, 2, 245, 1, Block::BlastFurnace as Id),    // Athena, absorption shield-    r(194, 2, Block::Magma as Id, 4, 246, 1, Block::BlastFurnace as Id),        // Sekhmet, bloodrage-    r(194, 2, 222, 12, 247, 1, Block::BlastFurnace as Id), // raw meat        -> Camazotz, lifesteal-    r(194, 2, Block::Prismarine as Id, 8, 248, 1, Block::BlastFurnace as Id),   // Tangaroa, conduit-    r(194, 2, Block::Sculk as Id, 4, 249, 1, Block::BlastFurnace as Id),        // Anubis, ward undead+    r(1090, 2, Block::IronBlock as Id, 2, 1141, 1, Block::BlastFurnace as Id),    // Athena, absorption shield+    r(1090, 2, Block::Magma as Id, 4, 1142, 1, Block::BlastFurnace as Id),        // Sekhmet, bloodrage+    r(1090, 2, 1118, 12, 1143, 1, Block::BlastFurnace as Id), // raw meat        -> Camazotz, lifesteal+    r(1090, 2, Block::Prismarine as Id, 8, 1144, 1, Block::BlastFurnace as Id),   // Tangaroa, conduit+    r(1090, 2, Block::Sculk as Id, 4, 1145, 1, Block::BlastFurnace as Id),        // Anubis, ward undead     // --- Matcha's kitchen. Cooked meat is the base ingredient; everything else builds on it. ----    r(223, 1, 131, 1, 224, 1, 131),  // cooked meat + bread          -> ramen-    r(223, 2, 135, 2, 225, 1, 131),  // cooked meat + carrot         -> japanese curry-    r(132, 2, 135, 2, 226, 1, 131),  // cooked fish + carrot         -> green curry-    r(146, 2, 131, 1, 227, 1, 131),  // baked potato + bread         -> gnocchi-    r(131, 2, 0, 0, 228, 2, 131),    // bread                        -> naan-    r(131, 1, 223, 2, 229, 1, 131),  // bread + cooked meat          -> pupusa-    r(146, 3, 0, 0, 230, 1, 131),    // baked potato                 -> latke-    r(131, 1, 130, 2, 231, 1, 131),  // bread + apple                -> bruschetta-    r(131, 1, 149, 1, 232, 1, 131),  // bread + fried egg            -> french toast-    r(131, 1, 152, 1, 233, 1, 131),  // bread + glow berry crumble   -> sweet berry danish-    r(136, 2, Block::Snow as Id, 2, 234, 1, 131), // melon + snow    -> melon sorbet-    r(223, 3, 131, 1, 235, 1, 131),  // cooked meat + bread          -> stroganoff-    r(130, 2, 131, 1, 151, 1, 131),  // apple + bread                -> apple empanada-    r(130, 1, Block::Glowstone as Id, 1, 152, 1, 131), // apple + glowstone -> glow berry crumble+    r(1119, 1, 1027, 1, 1120, 1, 1027),  // cooked meat + bread          -> ramen+    r(1119, 2, 1031, 2, 1121, 1, 1027),  // cooked meat + carrot         -> japanese curry+    r(1028, 2, 1031, 2, 1122, 1, 1027),  // cooked fish + carrot         -> green curry+    r(1042, 2, 1027, 1, 1123, 1, 1027),  // baked potato + bread         -> gnocchi+    r(1027, 2, 0, 0, 1124, 2, 1027),    // bread                        -> naan+    r(1027, 1, 1119, 2, 1125, 1, 1027),  // bread + cooked meat          -> pupusa+    r(1042, 3, 0, 0, 1126, 1, 1027),    // baked potato                 -> latke+    r(1027, 1, 1026, 2, 1127, 1, 1027),  // bread + apple                -> bruschetta+    r(1027, 1, 1045, 1, 1128, 1, 1027),  // bread + fried egg            -> french toast+    r(1027, 1, 1048, 1, 1129, 1, 1027),  // bread + glow berry crumble   -> sweet berry danish+    r(1032, 2, Block::Snow as Id, 2, 1130, 1, 1027), // melon + snow    -> melon sorbet+    r(1119, 3, 1027, 1, 1131, 1, 1027),  // cooked meat + bread          -> stroganoff+    r(1026, 2, 1027, 1, 1047, 1, 1027),  // apple + bread                -> apple empanada+    r(1026, 1, Block::Glowstone as Id, 1, 1048, 1, 1027), // apple + glowstone -> glow berry crumble     // --- Bronze: Matcha alloys copper with gold, landing between iron and diamond. ----    // 236 copper ingot, 237 gold ingot, 238 bronze ingot.-    r(238, 3, 159, 2, 239, 1, 167), // bronze pickaxe-    r(238, 2, 159, 1, 240, 1, 239), // bronze sword-    r(238, 5, 0, 0, 241, 1, 239), r(238, 8, 0, 0, 242, 1, 239), r(238, 7, 0, 0, 243, 1, 239), r(238, 4, 0, 0, 244, 1, 239),-    r(236, 9, 0, 0, Block::CopperBlock as Id, 1, 167),-    r(237, 9, 0, 0, Block::GoldBlock as Id, 1, 167),-    r(238, 9, 0, 0, Block::BronzeBlock as Id, 1, 167),+    // 1132 copper ingot, 1133 gold ingot, 1134 bronze ingot.+    r(1134, 3, 1055, 2, 1135, 1, 1063), // bronze pickaxe+    r(1134, 2, 1055, 1, 1136, 1, 1135), // bronze sword+    r(1134, 5, 0, 0, 1137, 1, 1135), r(1134, 8, 0, 0, 1138, 1, 1135), r(1134, 7, 0, 0, 1139, 1, 1135), r(1134, 4, 0, 0, 1140, 1, 1135),+    r(1132, 9, 0, 0, Block::CopperBlock as Id, 1, 1063),+    r(1133, 9, 0, 0, Block::GoldBlock as Id, 1, 1063),+    r(1134, 9, 0, 0, Block::BronzeBlock as Id, 1, 1063),     // The stonecutter itself: an iron blade on a stone bed.-    r(Block::Stone as Id, 3, 154, 1, Block::Stonecutter as Id, 1, 165),+    r(Block::Stone as Id, 3, 1050, 1, Block::Stonecutter as Id, 1, 1061), ];  // Furnace recipes. Unlike crafting these cost fuel and take `secs` of real time, and the ones marked@@ -155,42 +155,42 @@ const fn smelt(in1: Id, n1: i32, in2: Id, n2: i32, out: Id, out_n: i32, secs: f3     Smelt { in1, n1, in2, n2, out, out_n, secs, blast } } pub const SMELTING: [Smelt; 19] = [-    smelt(254, 1, 0, 0, 132, 1, 6.0, false), // raw fish -> cooked fish-    smelt(Block::CoalOre as Id,     1, 0, 0, 157, 1,  6.0, false), // coal-    smelt(Block::IronOre as Id,     1, 0, 0, 154, 1,  8.0, false), // iron ingot-    smelt(Block::DiamondOre as Id,  1, 0, 0, 155, 1, 10.0, false),-    smelt(Block::EmeraldOre as Id,  1, 0, 0, 156, 1, 10.0, false),-    smelt(Block::RedstoneOre as Id, 1, 0, 0, 158, 1,  6.0, false),-    smelt(Block::SilverOre as Id,   1, 0, 0, 193, 1,  9.0, false), // silver ingot+    smelt(1150, 1, 0, 0, 1028, 1, 6.0, false), // raw fish -> cooked fish+    smelt(Block::CoalOre as Id,     1, 0, 0, 1053, 1,  6.0, false), // coal+    smelt(Block::IronOre as Id,     1, 0, 0, 1050, 1,  8.0, false), // iron ingot+    smelt(Block::DiamondOre as Id,  1, 0, 0, 1051, 1, 10.0, false),+    smelt(Block::EmeraldOre as Id,  1, 0, 0, 1052, 1, 10.0, false),+    smelt(Block::RedstoneOre as Id, 1, 0, 0, 1054, 1,  6.0, false),+    smelt(Block::SilverOre as Id,   1, 0, 0, 1089, 1,  9.0, false), // silver ingot     smelt(Block::Sand as Id,        2, 0, 0, Block::Glass as Id,  1, 5.0, false),     smelt(Block::Cobble as Id,      4, 0, 0, Block::Stone as Id,  1, 5.0, false),     smelt(Block::Clay as Id,        4, 0, 0, Block::Brick as Id,  1, 6.0, false),-    smelt(222, 1, 0, 0, 223, 1, 6.0, false), // raw meat -> cooked meat-    smelt(131, 1, 0, 0, 147, 3, 5.0, false), // bread -> cookies (baking)-    smelt(Block::CopperOre as Id, 1, 0, 0, 236, 1, 6.0, false), // copper ingot-    smelt(Block::GoldOre as Id,   1, 0, 0, 237, 1, 8.0, false), // gold ingot-    smelt(236, 6, 237, 1, 238, 1, 14.0, true),                  // copper + gold -> bronze+    smelt(1118, 1, 0, 0, 1119, 1, 6.0, false), // raw meat -> cooked meat+    smelt(1027, 1, 0, 0, 1043, 3, 5.0, false), // bread -> cookies (baking)+    smelt(Block::CopperOre as Id, 1, 0, 0, 1132, 1, 6.0, false), // copper ingot+    smelt(Block::GoldOre as Id,   1, 0, 0, 1133, 1, 8.0, false), // gold ingot+    smelt(1132, 6, 1133, 1, 1134, 1, 14.0, true),                  // copper + gold -> bronze     // Blast furnace only: the alloy line.-    smelt(Block::SulfurOre as Id,   1, 0, 0, 192, 2,  5.0, true),  // sulfur-    smelt(Block::CinnabarOre as Id, 1, 0, 0, 194, 1,  7.0, true),  // quicksilver-    smelt(154, 1, 192, 1, 195, 1, 12.0, true),                     // iron + sulfur -> steel-    smelt(195, 4, 194, 2, 196, 1, 20.0, true),                     // steel + quicksilver -> adamant+    smelt(Block::SulfurOre as Id,   1, 0, 0, 1088, 2,  5.0, true),  // sulfur+    smelt(Block::CinnabarOre as Id, 1, 0, 0, 1090, 1,  7.0, true),  // quicksilver+    smelt(1050, 1, 1088, 1, 1091, 1, 12.0, true),                     // iron + sulfur -> steel+    smelt(1091, 4, 1090, 2, 1092, 1, 20.0, true),                     // steel + quicksilver -> adamant ];  // Seconds of furnace burn a stack item is worth. Anything not listed can't be used as fuel. pub fn fuel_secs(id: Id) -> f32 {     match id {-        157 => 80.0,                                        // coal+        1053 => 80.0,                                        // coal         84 => 200.0,                                        // a lava block-        192 => 60.0,                                        // sulfur burns hot-        4 | 26 | 29 | 47 | 50 | 51 => 15.0,                 // logs-        10 | 27 | 30 | 49 | 52 => 15.0,                     // planks-        159 => 5.0,                                         // sticks+        1088 => 60.0,                                        // sulfur burns hot+        4  |  26  |  29  |  47  |  50  |  51 => 15.0,                 // logs+        10  |  27  |  30  |  49  |  52 => 15.0,                     // planks+        1055 => 5.0,                                         // sticks         _ => 0.0,     } } // Fuels with no use other than burning, tried before anything a player might be saving.-const DEDICATED_FUELS: [Id; 3] = [157, 84, 192];+const DEDICATED_FUELS: [Id; 3] = [1053, 84, 1088];  // Villager trades live in `villager.rs`, tiered per profession. Emerald = item 156. @@ -566,25 +566,25 @@ mod tests {     #[test]     fn a_locked_recipe_crafts_nothing() {         // Diamond armour sits behind the diamond pickaxe.-        let idx = RECIPES.iter().position(|r| r.out == 176).expect("diamond chestplate");+        let idx = RECIPES.iter().position(|r| r.out == 1072).expect("diamond chestplate");         let need = RECIPES[idx].n1;         let mut inv = Inventory::default();         for s in inv.slots.iter_mut() { *s = InvSlot::default(); }-        inv.slots[0] = InvSlot { id: 155, count: need };+        inv.slots[0] = InvSlot { id: 1051, count: need };          let mut crafted = vec![false; RECIPES.len()];         assert!(!recipe_unlocked(idx, &crafted), "it should start locked");         assert!(!inv.craft(idx, &crafted), "a locked recipe must refuse");-        assert_eq!(inv.count_of(155), need, "and must not take the diamonds");-        assert_eq!(inv.count_of(176), 0);+        assert_eq!(inv.count_of(1051), need, "and must not take the diamonds");+        assert_eq!(inv.count_of(1072), 0);          // Crafting the prerequisite opens it.         let pick = RECIPES.iter().position(|r| r.out == RECIPES[idx].unlocked_by).unwrap();         crafted[pick] = true;         assert!(recipe_unlocked(idx, &crafted));         assert!(inv.craft(idx, &crafted), "now it should go through");-        assert_eq!(inv.count_of(155), 0);-        assert!(inv.count_of(176) > 0);+        assert_eq!(inv.count_of(1051), 0);+        assert!(inv.count_of(1072) > 0);     }      // A root recipe has to work from a standing start, or a new world is unplayable.@@ -618,38 +618,38 @@ mod tests {     // ingredients and drop the tool on the floor, because the room check skipped durable output.     #[test]     fn crafting_a_tool_with_no_empty_slot_is_refused() {-        let idx = RECIPES.iter().position(|r| r.out == 163).expect("wood pickaxe");+        let idx = RECIPES.iter().position(|r| r.out == 1059).expect("wood pickaxe");         let none = vec![false; RECIPES.len()];         let mut inv = Inventory::default();         // Every slot occupied, but the two ingredients are present in the stacks that fill it.         for s in inv.slots.iter_mut() { *s = InvSlot { id: Block::Dirt as Id, count: STACK }; }         inv.slots[0] = InvSlot { id: Block::Planks as Id, count: STACK };-        inv.slots[1] = InvSlot { id: 159, count: STACK };+        inv.slots[1] = InvSlot { id: 1055, count: STACK };          assert!(!inv.craft(idx, &none), "there is nowhere to put a pickaxe");         assert_eq!(inv.count_of(Block::Planks as Id), STACK, "the planks must survive");-        assert_eq!(inv.count_of(159), STACK, "the sticks must survive");-        assert_eq!(inv.count_of(163), 0);+        assert_eq!(inv.count_of(1055), STACK, "the sticks must survive");+        assert_eq!(inv.count_of(1059), 0);          // Free one slot and it goes through.         inv.slots[5] = InvSlot::default();         assert!(inv.craft(idx, &none));-        assert!(inv.count_of(163) > 0);+        assert!(inv.count_of(1059) > 0);     }      // Same hazard on the trade path: a forged tool with nowhere to go must not eat the payment.     #[test]     fn trading_for_a_tool_with_no_empty_slot_is_refused() {         use crate::villager::{Offer, EMERALD};-        let forge = Offer { cost: EMERALD, cost_n: 4, cost2: 154, cost2_n: 2, give: 167, give_n: 1 };+        let forge = Offer { cost: EMERALD, cost_n: 4, cost2: 1050, cost2_n: 2, give: 1063, give_n: 1 };         let mut inv = Inventory::default();         for s in inv.slots.iter_mut() { *s = InvSlot { id: Block::Dirt as Id, count: STACK }; }         inv.slots[0] = InvSlot { id: EMERALD, count: STACK };-        inv.slots[1] = InvSlot { id: 154, count: STACK };+        inv.slots[1] = InvSlot { id: 1050, count: STACK };          assert!(!inv.trade_offer(&forge), "nowhere to put the pickaxe");         assert_eq!(inv.count_of(EMERALD), STACK, "the emeralds must survive");-        assert_eq!(inv.count_of(154), STACK);+        assert_eq!(inv.count_of(1050), STACK);     }      #[test]@@ -671,8 +671,8 @@ mod tests {     // three Blessings must remain craftable so they aren't creative-only content again.     #[test]     fn alloy_line_is_gated_and_blessings_are_craftable() {-        let steel = SMELTING.iter().find(|s| s.out == 195).expect("steel must be smeltable");-        let adamant = SMELTING.iter().find(|s| s.out == 196).expect("adamant must be smeltable");+        let steel = SMELTING.iter().find(|s| s.out == 1091).expect("steel must be smeltable");+        let adamant = SMELTING.iter().find(|s| s.out == 1092).expect("adamant must be smeltable");         assert!(steel.blast && adamant.blast, "the alloy line must require a blast furnace");         // Every blessing in the pantheon must be reachable in normal play, not creative-only.         for b in crate::blessing::PANTHEON.iter() {@@ -694,17 +694,17 @@ mod tests {         let mut inv = Inventory::default();         for s in inv.slots.iter_mut() { *s = InvSlot::default(); }         inv.slots[0] = InvSlot { id: 19, count: 3 };  // 3 iron ore-        inv.slots[1] = InvSlot { id: 157, count: 1 }; // 1 coal+        inv.slots[1] = InvSlot { id: 1053, count: 1 }; // 1 coal -        let recipe = SMELTING.iter().find(|s| s.out == 154).unwrap();+        let recipe = SMELTING.iter().find(|s| s.out == 1050).unwrap();         assert!(inv.can_smelt(recipe));-        assert_eq!(inv.consume_fuel(&[recipe.in1, recipe.in2]), Some(fuel_secs(157)));-        assert_eq!(inv.count_of(157), 0, "the coal should be burnt");+        assert_eq!(inv.consume_fuel(&[recipe.in1, recipe.in2]), Some(fuel_secs(1053)));+        assert_eq!(inv.count_of(1053), 0, "the coal should be burnt");          inv.take_smelt_inputs(recipe);         inv.give_smelt_output(recipe);         assert_eq!(inv.count_of(19), 2, "one ore should be consumed");-        assert_eq!(inv.count_of(154), 1, "one ingot should be produced");+        assert_eq!(inv.count_of(1050), 1, "one ingot should be produced");          // With no fuel left the furnace can't run again.         assert_eq!(inv.consume_fuel(&[recipe.in1, recipe.in2]), None);@@ -714,15 +714,15 @@ mod tests {     // input and leave the player with nothing.     #[test]     fn a_recipe_never_burns_its_own_ingredients() {-        let steel = SMELTING.iter().find(|s| s.out == 195).unwrap();+        let steel = SMELTING.iter().find(|s| s.out == 1091).unwrap();         let mut inv = Inventory::default();         for s in inv.slots.iter_mut() { *s = InvSlot::default(); }-        inv.slots[0] = InvSlot { id: 154, count: 1 };  // iron ingot-        inv.slots[1] = InvSlot { id: 192, count: 1 };  // the only sulfur, also a valid fuel+        inv.slots[0] = InvSlot { id: 1050, count: 1 };  // iron ingot+        inv.slots[1] = InvSlot { id: 1088, count: 1 };  // the only sulfur, also a valid fuel          assert!(inv.can_smelt(steel));         assert_eq!(inv.consume_fuel(&[steel.in1, steel.in2]), None, "the sulfur input must be spared");-        assert_eq!(inv.count_of(192), 1);+        assert_eq!(inv.count_of(1088), 1);         assert!(inv.can_smelt(steel), "the recipe must still be runnable");     } @@ -732,11 +732,11 @@ mod tests {         let mut inv = Inventory::default();         for s in inv.slots.iter_mut() { *s = InvSlot::default(); }         inv.slots[0] = InvSlot { id: 10, count: 4 };   // planks, earlier in the inventory-        inv.slots[5] = InvSlot { id: 157, count: 2 };  // coal+        inv.slots[5] = InvSlot { id: 1053, count: 2 };  // coal -        assert_eq!(inv.consume_fuel(&[]), Some(fuel_secs(157)));+        assert_eq!(inv.consume_fuel(&[]), Some(fuel_secs(1053)));         assert_eq!(inv.count_of(10), 4, "the planks should be untouched");-        assert_eq!(inv.count_of(157), 1);+        assert_eq!(inv.count_of(1053), 1);     }      // A full inventory must not let a furnace eat its inputs and throw the result away.@@ -744,16 +744,16 @@ mod tests {     fn a_full_inventory_has_no_room() {         let mut inv = Inventory::default();         for s in inv.slots.iter_mut() { *s = InvSlot { id: 2, count: STACK }; }-        assert!(!inv.has_room_for(154, 1), "no free slot and no matching stack");+        assert!(!inv.has_room_for(1050, 1), "no free slot and no matching stack");         assert!(!inv.has_room_for(2, 1), "every dirt stack is already full"); -        inv.slots[3] = InvSlot { id: 154, count: STACK - 2 };-        assert!(inv.has_room_for(154, 2));-        assert!(!inv.has_room_for(154, 3), "only 2 of 3 would fit");+        inv.slots[3] = InvSlot { id: 1050, count: STACK - 2 };+        assert!(inv.has_room_for(1050, 2));+        assert!(!inv.has_room_for(1050, 3), "only 2 of 3 would fit");          inv.slots[4] = InvSlot::default();-        assert!(inv.has_room_for(154, 3));-        assert!(inv.has_room_for(169, 1), "an empty slot can hold a tool");+        assert!(inv.has_room_for(1050, 3));+        assert!(inv.has_room_for(1065, 1), "an empty slot can hold a tool");     }      // The stonecutter is the only route to slabs and stairs, so every shape must be reachable and@@ -809,9 +809,9 @@ mod tests {      #[test]     fn only_listed_items_burn() {-        assert!(fuel_secs(157) > 0.0);   // coal+        assert!(fuel_secs(1053) > 0.0);   // coal         assert!(fuel_secs(10) > 0.0);    // planks-        assert_eq!(fuel_secs(155), 0.0); // diamonds are not firewood+        assert_eq!(fuel_secs(1051), 0.0); // diamonds are not firewood         assert_eq!(fuel_secs(0), 0.0);     } @@ -820,20 +820,20 @@ mod tests {     #[test]     fn a_half_affordable_trade_takes_nothing() {         use crate::villager::{Offer, EMERALD};-        let forge = Offer { cost: EMERALD, cost_n: 4, cost2: 154, cost2_n: 2, give: 167, give_n: 1 };+        let forge = Offer { cost: EMERALD, cost_n: 4, cost2: 1050, cost2_n: 2, give: 1063, give_n: 1 };         let mut inv = Inventory::default();         inv.slots[0] = InvSlot { id: EMERALD, count: 8 };-        inv.slots[1] = InvSlot { id: 154, count: 1 };+        inv.slots[1] = InvSlot { id: 1050, count: 1 };          assert!(!inv.trade_offer(&forge), "one iron ingot short");         assert_eq!(inv.count_of(EMERALD), 8, "the emeralds must survive a refused trade");-        assert_eq!(inv.count_of(154), 1);+        assert_eq!(inv.count_of(1050), 1);          inv.slots[1].count = 2;         assert!(inv.trade_offer(&forge));         assert_eq!(inv.count_of(EMERALD), 4);-        assert_eq!(inv.count_of(154), 0);-        assert!(inv.count_of(167) > 0, "the pickaxe arrives with durability");+        assert_eq!(inv.count_of(1050), 0);+        assert!(inv.count_of(1063) > 0, "the pickaxe arrives with durability");     }      #[test]
games/voxels/src/main/rust/src/item.rs
diff --git a/games/voxels/src/main/rust/src/item.rs b/games/voxels/src/main/rust/src/item.rsindex 0df85bfd6a..f1d908201d 100644--- a/games/voxels/src/main/rust/src/item.rs+++ b/games/voxels/src/main/rust/src/item.rs@@ -1,6 +1,5 @@ // Non-block inventory items (food, consumables, materials) and the status-effect model.-// Inventory ids outside ITEM_BASE..=ITEM_MAX are blocks; ids inside it are items and are never-// placeable.+// Inventory ids below ITEM_BASE are blocks; ids at or above it are items and are never placeable. // Design follows the Matcha/Raspberry survival overhaul: no hunger โ€” food applies Regeneration // (the heal) plus a themed buff; Estus is a fast multi-charge heal; Heart Containers raise max HP. @@ -30,67 +29,67 @@ pub struct ActiveEffect { pub kind: Effect, pub secs: f32, pub amp: u8 }  use crate::world::block::Id; -pub const ITEM_BASE: Id = 128;-/// The item window's upper bound. Blocks resume at `BLOCK_HIGH_BASE` one past it, so the numbers-/// already written into saves keep their meaning and both kinds have room to grow.-pub const ITEM_MAX: Id = 1023;-// Matcha alloy line: 192 Sulfur, 193 Silver Ingot, 194 Quicksilver, 195 Steel Ingot,-// 196 Adamant Ingot, 197/198 adamant pickaxe/sword, 199..202 adamant armor.-pub fn is_item(id: Id) -> bool { (ITEM_BASE..=ITEM_MAX).contains(&id) }-pub fn is_estus(id: Id) -> bool { id == 128 }-pub fn is_heart_container(id: Id) -> bool { id == 129 }+/// Blocks own ids below this; items own it and everything above. One boundary, 16 bits wide, with+/// room on both sides: blocks have 900 spare, items have 64512.+pub const ITEM_BASE: Id = 1024;+// The item block, in order: 1024 Estus .. 1151 Brush. Matcha alloy line: 1088 Sulfur,+// 1089 Silver Ingot, 1090 Quicksilver, 1091 Steel Ingot, 1092 Adamant Ingot, 1093/1094 adamant+// pickaxe/sword, 1095..1098 adamant armor.+pub fn is_item(id: Id) -> bool { id >= ITEM_BASE }+pub fn is_estus(id: Id) -> bool { id == 1024 }+pub fn is_heart_container(id: Id) -> bool { id == 1025 } pub fn is_food(id: Id) -> bool { food_effects(id).is_some() }  // ---- Tools & armor -----// Tools 163..170: {wood,stone,iron,diamond} x {pickaxe,sword}. Armor 171..178: {iron,diamond} x-// {helmet,chestplate,leggings,boots}. Matcha's bronze sits between iron and diamond at 239..244,-// and adamant tops the ladder at 197..202. Durability is stored in the inventory slot's `count`.-pub fn is_tool(id: Id) -> bool { (163..=170).contains(&id) || matches!(id, 197 | 198 | 239 | 240 | 252 | 253 | 255) }-/// Item 255. Brushing suspicious sand is the only thing it does.-pub const BRUSH: Id = 255;+// Tools 1059..1066: {wood,stone,iron,diamond} x {pickaxe,sword}. Armor 1067..1074: {iron,diamond} x+// {helmet,chestplate,leggings,boots}. Matcha's bronze sits between iron and diamond at 1135..1140,+// and adamant tops the ladder at 1093..1098. Durability is stored in the inventory slot's `count`.+pub fn is_tool(id: Id) -> bool { (1059..=1066).contains(&id) || matches!(id, 1093 | 1094 | 1135 | 1136 | 1148 | 1149 | 1151) }+/// Brushing suspicious sand is the only thing it does.+pub const BRUSH: Id = 1151; /// Shears: used on a sheep rather than on terrain, so they're a tool that mines nothing.-pub fn is_shears(id: Id) -> bool { id == 252 }-pub fn is_pickaxe(id: Id) -> bool { matches!(id, 163 | 165 | 167 | 169 | 197 | 239) }-pub fn is_sword(id: Id) -> bool { matches!(id, 164 | 166 | 168 | 170 | 198 | 240) }-pub fn is_elytra(id: Id) -> bool { id == 188 }+pub fn is_shears(id: Id) -> bool { id == 1148 }+pub fn is_pickaxe(id: Id) -> bool { matches!(id, 1059 | 1061 | 1063 | 1065 | 1093 | 1135) }+pub fn is_sword(id: Id) -> bool { matches!(id, 1060 | 1062 | 1064 | 1066 | 1094 | 1136) }+pub fn is_elytra(id: Id) -> bool { id == 1084 } pub fn is_armor(id: Id) -> bool {-    (171..=178).contains(&id) || (199..=202).contains(&id) || (241..=244).contains(&id) || id == 188+    (1067..=1074).contains(&id) || (1095..=1098).contains(&id) || (1137..=1140).contains(&id) || id == 1084 } // elytra occupies the chest slot pub fn armor_slot(id: Id) -> usize {-    if id == 188 { 1 }-    else if id >= 241 { (id - 241) as usize }-    else if id >= 199 { (id - 199) as usize }-    else { ((id - 171) % 4) as usize }+    if id == 1084 { 1 }+    else if id >= 1137 { (id - 1137) as usize }+    else if id >= 1095 { (id - 1095) as usize }+    else { ((id - 1067) % 4) as usize } } // 0 helm, 1 chest, 2 legs, 3 boots-pub fn is_flint_steel(id: Id) -> bool { id == 186 }-pub fn is_firework(id: Id) -> bool { id == 189 }-pub fn has_durability(id: Id) -> bool { is_tool(id) || is_armor(id) || id == 186 }+pub fn is_flint_steel(id: Id) -> bool { id == 1082 }+pub fn is_firework(id: Id) -> bool { id == 1085 }+pub fn has_durability(id: Id) -> bool { is_tool(id) || is_armor(id) || id == 1082 } -pub fn sword_damage(id: Id) -> f32 { match id { 164 => 5.0, 166 => 6.0, 168 => 7.0, 240 => 8.0, 170 => 9.0, 198 => 11.0, _ => 0.0 } }-pub fn pick_damage(id: Id) -> f32 { match id { 163 => 2.0, 165 => 3.0, 167 => 4.0, 239 => 4.5, 169 => 5.0, 197 => 6.0, _ => 0.0 } }+pub fn sword_damage(id: Id) -> f32 { match id { 1060 => 5.0, 1062 => 6.0, 1064 => 7.0, 1136 => 8.0, 1066 => 9.0, 1094 => 11.0, _ => 0.0 } }+pub fn pick_damage(id: Id) -> f32 { match id { 1059 => 2.0, 1061 => 3.0, 1063 => 4.0, 1135 => 4.5, 1065 => 5.0, 1093 => 6.0, _ => 0.0 } } pub fn armor_defense(id: Id) -> f32 {     match id {-        171 => 2.0, 172 => 6.0, 173 => 5.0, 174 => 2.0, // iron helm/chest/legs/boots-        241 => 2.0, 242 => 7.0, 243 => 5.0, 244 => 3.0, // bronze-        175 => 3.0, 176 => 8.0, 177 => 6.0, 178 => 3.0, // diamond-        199 => 4.0, 200 => 9.0, 201 => 7.0, 202 => 4.0, // adamant-        188 => 1.0,                                     // elytra (mostly for mobility, minor defense)+        1067 => 2.0, 1068 => 6.0, 1069 => 5.0, 1070 => 2.0, // iron helm/chest/legs/boots+        1137 => 2.0, 1138 => 7.0, 1139 => 5.0, 1140 => 3.0, // bronze+        1071 => 3.0, 1072 => 8.0, 1073 => 6.0, 1074 => 3.0, // diamond+        1095 => 4.0, 1096 => 9.0, 1097 => 7.0, 1098 => 4.0, // adamant+        1084 => 1.0,                                        // elytra (mobility, minor defense)         _ => 0.0,     } } pub fn max_durability(id: Id) -> i32 {     match id {-        163 | 164 => 60, 165 | 166 => 132, 167 | 168 => 250, 169 | 170 => 1562, // wood/stone/iron/diamond tools-        171..=174 => 240, 175..=178 => 528,                                       // iron/diamond armor-        186 => 64,                                                                // flint & steel-        252 => 238,                                                               // shears-        253 => 64,                                                                // fishing rod-        255 => 64,                                                                // brush-        188 => 432,                                                               // elytra-        197 | 198 => 2031,                                                        // adamant tools-        199..=202 => 666,                                                         // adamant armor-        239 | 240 => 700,                                                         // bronze tools-        241..=244 => 380,                                                         // bronze armor+        1059 | 1060 => 60, 1061 | 1062 => 132, 1063 | 1064 => 250, 1065 | 1066 => 1562, // wood/stone/iron/diamond tools+        1067..=1070 => 240, 1071..=1074 => 528,                                          // iron/diamond armor+        1082 => 64,                                                                      // flint & steel+        1148 => 238,                                                                     // shears+        1149 => 64,                                                                      // fishing rod+        1151 => 64,                                                                      // brush+        1084 => 432,                                                                     // elytra+        1093 | 1094 => 2031,                                                             // adamant tools+        1095..=1098 => 666,                                                              // adamant armor+        1135 | 1136 => 700,                                                              // bronze tools+        1137..=1140 => 380,                                                              // bronze armor         _ => 0,     } }@@ -99,36 +98,36 @@ pub fn max_durability(id: Id) -> i32 { pub fn food_effects(id: Id) -> Option<&'static [(Effect, f32, u8)]> {     use Effect::*;     Some(match id {-        130 => &[(Regeneration, 4.0, 0)],                                   // apple-        131 => &[(Regeneration, 6.0, 0)],                                   // bread-        132 => &[(Regeneration, 5.0, 1)],                                   // cooked fish-        133 => &[(Regeneration, 5.0, 1), (Absorption, 120.0, 0), (Resistance, 30.0, 0), (Strength, 60.0, 0)], // golden apple-        134 => &[(Regeneration, 3.6, 2), (Haste, 150.0, 1)],               // brownie-        135 => &[(Regeneration, 4.0, 0), (NightVision, 30.0, 0)],          // carrot (good for your eyes)-        136 => &[(Regeneration, 4.0, 1), (Speed, 30.0, 0)],                // glistering melon slice-        146 => &[(Regeneration, 5.0, 0), (FireResistance, 30.0, 0)],       // baked potato (hot!)-        147 => &[(Regeneration, 2.0, 0)],                                   // cookie-        148 => &[(Regeneration, 5.0, 1)],                                   // cooked salmon-        149 => &[(Regeneration, 4.0, 0)],                                   // fried egg-        150 => &[(Regeneration, 5.0, 1), (JumpBoost, 45.0, 0)],            // cooked rabbit (leaping)-        151 => &[(Regeneration, 4.0, 0), (Speed, 20.0, 0)],                // apple empanada-        152 => &[(Regeneration, 4.0, 0), (NightVision, 90.0, 0)],          // glow berry crumble-        153 => &[(Regeneration, 3.0, 0), (Haste, 60.0, 0)],                // chocolate chip cookie+        1026 => &[(Regeneration, 4.0, 0)],                                   // apple+        1027 => &[(Regeneration, 6.0, 0)],                                   // bread+        1028 => &[(Regeneration, 5.0, 1)],                                   // cooked fish+        1029 => &[(Regeneration, 5.0, 1), (Absorption, 120.0, 0), (Resistance, 30.0, 0), (Strength, 60.0, 0)], // golden apple+        1030 => &[(Regeneration, 3.6, 2), (Haste, 150.0, 1)],               // brownie+        1031 => &[(Regeneration, 4.0, 0), (NightVision, 30.0, 0)],          // carrot (good for your eyes)+        1032 => &[(Regeneration, 4.0, 1), (Speed, 30.0, 0)],                // glistering melon slice+        1042 => &[(Regeneration, 5.0, 0), (FireResistance, 30.0, 0)],       // baked potato (hot!)+        1043 => &[(Regeneration, 2.0, 0)],                                   // cookie+        1044 => &[(Regeneration, 5.0, 1)],                                   // cooked salmon+        1045 => &[(Regeneration, 4.0, 0)],                                   // fried egg+        1046 => &[(Regeneration, 5.0, 1), (JumpBoost, 45.0, 0)],            // cooked rabbit (leaping)+        1047 => &[(Regeneration, 4.0, 0), (Speed, 20.0, 0)],                // apple empanada+        1048 => &[(Regeneration, 4.0, 0), (NightVision, 90.0, 0)],          // glow berry crumble+        1049 => &[(Regeneration, 3.0, 0), (Haste, 60.0, 0)],                // chocolate chip cookie         // Matcha's kitchen: cooked meat is the survival staple, and each dish above it trades more         // ingredients for a longer, more specialised buff.-        223 => &[(Regeneration, 6.0, 0)],                                   // cooked meat-        224 => &[(Regeneration, 5.0, 0), (Speed, 60.0, 0)],                 // ramen-        225 => &[(Regeneration, 6.0, 1), (Strength, 90.0, 0)],              // japanese curry-        226 => &[(Regeneration, 5.0, 0), (Haste, 90.0, 0)],                 // green curry-        227 => &[(Regeneration, 5.0, 0), (Resistance, 60.0, 0)],            // gnocchi-        228 => &[(Regeneration, 6.0, 0)],                                   // naan-        229 => &[(Regeneration, 5.0, 0), (Absorption, 120.0, 0)],           // pupusa-        230 => &[(Regeneration, 5.0, 0), (FireResistance, 60.0, 0)],        // latke-        231 => &[(Regeneration, 4.0, 0), (Speed, 45.0, 0)],                 // bruschetta-        232 => &[(Regeneration, 5.0, 0), (JumpBoost, 60.0, 0)],             // french toast-        233 => &[(Regeneration, 5.0, 0), (NightVision, 120.0, 0)],          // sweet berry danish-        234 => &[(Regeneration, 4.0, 0), (Speed, 60.0, 0), (Haste, 60.0, 0)], // melon sorbet-        235 => &[(Regeneration, 8.0, 2), (Strength, 120.0, 0), (Resistance, 60.0, 0)], // stroganoff+        1119 => &[(Regeneration, 6.0, 0)],                                   // cooked meat+        1120 => &[(Regeneration, 5.0, 0), (Speed, 60.0, 0)],                 // ramen+        1121 => &[(Regeneration, 6.0, 1), (Strength, 90.0, 0)],              // japanese curry+        1122 => &[(Regeneration, 5.0, 0), (Haste, 90.0, 0)],                 // green curry+        1123 => &[(Regeneration, 5.0, 0), (Resistance, 60.0, 0)],            // gnocchi+        1124 => &[(Regeneration, 6.0, 0)],                                   // naan+        1125 => &[(Regeneration, 5.0, 0), (Absorption, 120.0, 0)],           // pupusa+        1126 => &[(Regeneration, 5.0, 0), (FireResistance, 60.0, 0)],        // latke+        1127 => &[(Regeneration, 4.0, 0), (Speed, 45.0, 0)],                 // bruschetta+        1128 => &[(Regeneration, 5.0, 0), (JumpBoost, 60.0, 0)],             // french toast+        1129 => &[(Regeneration, 5.0, 0), (NightVision, 120.0, 0)],          // sweet berry danish+        1130 => &[(Regeneration, 4.0, 0), (Speed, 60.0, 0), (Haste, 60.0, 0)], // melon sorbet+        1131 => &[(Regeneration, 8.0, 2), (Strength, 120.0, 0), (Resistance, 60.0, 0)], // stroganoff         _ => return None,     }) }@@ -138,33 +137,64 @@ pub fn food_effects(id: Id) -> Option<&'static [(Effect, f32, u8)]> { mod tests {     use super::*; -    // Blocks and items share one id space, split by range at ITEM_BASE..=ITEM_MAX. If a new block-    // ever crossed that line it would silently become unplaceable, so pin the invariant down.+    // Blocks and items share one id space, split at ITEM_BASE. If a new block ever crossed that+    // line it would silently become unplaceable, so pin the invariant down.     #[test]     fn block_ids_stay_below_the_item_base() {-        assert!(crate::world::block::MAX_LOW_BLOCK_ID < ITEM_BASE);-        assert!(!is_item(crate::world::block::MAX_LOW_BLOCK_ID));-        assert!(!is_item(crate::world::block::BLOCK_HIGH_BASE), "the high block window is not items");+        assert!(crate::world::block::MAX_BLOCK_ID < ITEM_BASE);+        assert!(!is_item(crate::world::block::MAX_BLOCK_ID));+        assert!(is_item(ITEM_BASE), "the boundary itself belongs to items");     }      // armor_slot() does range arithmetic over three disjoint id blocks; a wrong mapping would let     // a helmet occupy the boots slot.     #[test]     fn armor_maps_to_the_right_slot() {-        for (id, slot) in [(171 as Id, 0usize), (172, 1), (173, 2), (174, 3),   // iron-                           (175, 0), (176, 1), (177, 2), (178, 3),          // diamond-                           (199, 0), (200, 1), (201, 2), (202, 3),          // adamant-                           (188, 1)] {                                      // elytra -> chest+        for (id, slot) in [(1067 as Id, 0usize), (1068, 1), (1069, 2), (1070, 3),   // iron+                           (1071, 0), (1072, 1), (1073, 2), (1074, 3),          // diamond+                           (1095, 0), (1096, 1), (1097, 2), (1098, 3),          // adamant+                           (1084, 1)] {                                      // elytra -> chest             assert!(is_armor(id), "{id} should be armor");             assert_eq!(armor_slot(id), slot, "{id} mapped to the wrong slot");         }     } +    // Every predicate in this file is a hand-written list of ids. If one is ever left behind after a+    // renumbering it would silently classify a block as a tool, so pin the whole population down.+    #[test]+    fn every_classified_id_is_really_an_item() {+        use crate::world::block::MAX_BLOCK_ID;+        let mut tools = 0;+        let mut armor = 0;+        let mut foods = 0;+        for id in 0..=ITEM_BASE + 512 {+            for (what, holds) in [+                ("tool", is_tool(id)), ("armor", is_armor(id)), ("food", is_food(id)),+                ("estus", is_estus(id)), ("heart container", is_heart_container(id)),+                ("elytra", is_elytra(id)), ("shears", is_shears(id)),+                ("flint and steel", is_flint_steel(id)), ("firework", is_firework(id)),+            ] {+                if holds {+                    assert!(is_item(id), "{id} is classified as a {what} but is not an item id");+                    assert!(id > MAX_BLOCK_ID, "{id} is classified as a {what} but is a block");+                }+            }+            if is_tool(id) { tools += 1; }+            if is_armor(id) { armor += 1; }+            if is_food(id) { foods += 1; }+        }+        // Counts, so a range that collapses to nothing fails loudly rather than passing vacuously.+        assert_eq!(tools, 15, "expected 15 tools");+        assert_eq!(armor, 17, "expected 16 armour pieces plus the elytra");+        assert!(foods >= 25, "only {foods} foods found");+        assert_eq!(BRUSH, 1151);+    }+     #[test]     fn tools_and_armor_do_not_overlap() {-        // Every tool and every piece of armor lives in the legacy 0..=255 window; sweeping the-        // whole u16 range would cost 256x for nothing.-        for id in 0..=255 as Id {+        // Tools and armour all sit in one contiguous stretch of the item range; sweeping the whole+        // 16-bit space would cost 256x for nothing.+        for id in 0..=ITEM_BASE + 255 {             assert!(!(is_tool(id) && is_armor(id)), "{id} is both a tool and armor");             // Shears and the fishing rod are the exceptions: tools that neither mine nor fight.             if is_tool(id) && !is_shears(id) && id != crate::fishing::ROD && id != BRUSH {@@ -182,14 +212,14 @@ mod tests {     fn every_food_is_obtainable() {         use crate::inventory::{RECIPES, SMELTING};         let mut missing = Vec::new();-        for id in 0..=255 as Id {+        for id in 0..=ITEM_BASE + 255 {             if food_effects(id).is_none() { continue; }             let crafted = RECIPES.iter().any(|r| r.out == id);             let smelted = SMELTING.iter().any(|s| s.out == id);             let dropped = crate::entity::MobKind::ALL.iter().any(|k| k.loot().contains(&id));             let traded = crate::villager::ALL.iter()                 .any(|&p| crate::villager::offers(p, crate::villager::MAX_LEVEL).iter().any(|o| o.give == id));-            let foraged = id == 130; // apples fall out of leaves+            let foraged = id == 1026; // apples fall out of leaves             let looted = (0..40).any(|i| {                 crate::container::roll_loot(i * 7, 40, i * 13, i as u8 % 3, false)                     .iter().any(|s| s.id == id)@@ -202,17 +232,17 @@ mod tests {     // Raw meat is a cooking input, not a snack.     #[test]     fn raw_meat_is_not_edible() {-        assert!(food_effects(222).is_none(), "raw meat must be cooked first");-        assert!(food_effects(223).is_some(), "cooked meat must feed you");+        assert!(food_effects(1118).is_none(), "raw meat must be cooked first");+        assert!(food_effects(1119).is_some(), "cooked meat must feed you");     }      #[test]     fn adamant_outclasses_diamond() {-        assert!(sword_damage(198) > sword_damage(170));-        assert!(pick_damage(197) > pick_damage(169));-        for (adamant, diamond) in [(199 as Id, 175 as Id), (200, 176), (201, 177), (202, 178)] {+        assert!(sword_damage(1094) > sword_damage(1066));+        assert!(pick_damage(1093) > pick_damage(1065));+        for (adamant, diamond) in [(1095 as Id, 1071 as Id), (1096, 1072), (1097, 1073), (1098, 1074)] {             assert!(armor_defense(adamant) > armor_defense(diamond), "{adamant} must beat {diamond}");         }-        assert!(max_durability(197) > max_durability(169));+        assert!(max_durability(1093) > max_durability(1065));     } }
games/voxels/src/main/rust/src/player.rs
diff --git a/games/voxels/src/main/rust/src/player.rs b/games/voxels/src/main/rust/src/player.rsindex 68eade681a..ceb74d0b3f 100644--- a/games/voxels/src/main/rust/src/player.rs+++ b/games/voxels/src/main/rust/src/player.rs@@ -372,7 +372,7 @@ mod tests {         plain.damage(plain.air_max_y - plain.pos.y - 3.5);         assert!(plain.health < 20.0, "an unblessed fall should hurt"); -        let mut blessed = blessed_player(&[204]);+        let mut blessed = blessed_player(&[1100]);         assert!(blessed.blessed(Passive::FeatherFall));         // The tick applies the same drop with the blessing attuned.         assert_eq!(blessed.health, 20.0);@@ -381,15 +381,15 @@ mod tests {     #[test]     fn traversal_makes_you_faster() {         let plain = Player::new(0.0, 64.0, 0.0);-        let swift = blessed_player(&[160]);+        let swift = blessed_player(&[1056]);         assert!(swift.speed_mult() > plain.speed_mult());     }      #[test]     fn ares_multiplies_melee_but_others_do_not() {         assert_eq!(Player::new(0.0, 0.0, 0.0).might_mult(), 1.0);-        assert!(blessed_player(&[161]).might_mult() > 1.0);-        assert_eq!(blessed_player(&[204]).might_mult(), 1.0);+        assert!(blessed_player(&[1057]).might_mult() > 1.0);+        assert_eq!(blessed_player(&[1100]).might_mult(), 1.0);     }      // Aeolus should only launch the player when it is actually attuned.@@ -399,7 +399,7 @@ mod tests {         plain.wind_burst();         assert_eq!(plain.vel.y, 0.0); -        let mut blessed = blessed_player(&[214]);+        let mut blessed = blessed_player(&[1110]);         blessed.wind_burst();         assert!(blessed.vel.y > 0.0, "Aeolus must throw the player upward");         assert!(!blessed.on_ground);@@ -576,7 +576,7 @@ mod tests {      #[test]     fn attunements_are_independent() {-        let p = blessed_player(&[205, 211]);+        let p = blessed_player(&[1101, 1107]);         assert!(p.blessed(Passive::Pyre));         assert!(p.blessed(Passive::Fortune));         assert!(!p.blessed(Passive::Reach));@@ -587,7 +587,7 @@ mod tests {     // unkillable while a mob is still swinging.     #[test]     fn athenas_shield_reforms_only_out_of_combat() {-        let mut p = blessed_player(&[245]);+        let mut p = blessed_player(&[1141]);         p.tick_status(10.0);         assert!(p.absorption > 0.0, "the shield should form when nothing is attacking");         let full = p.absorption;@@ -609,7 +609,7 @@ mod tests {     // Sekhmet is a comeback mechanic: it must be off at full health and on when nearly dead.     #[test]     fn sekhmet_only_rages_when_bloodied() {-        let mut p = blessed_player(&[246]);+        let mut p = blessed_player(&[1142]);         assert!(!p.bloodraging(), "a healthy player is not enraged");         let calm_hit = p.might_mult(); @@ -618,7 +618,7 @@ mod tests {         assert!(p.might_mult() > calm_hit, "rage has to hit harder");          // And it soaks more: the same blow costs less health.-        let mut raging = blessed_player(&[246]);+        let mut raging = blessed_player(&[1142]);         raging.health = raging.max_health * (BLOODRAGE_AT - 0.05);         let before = raging.health;         raging.damage(4.0);@@ -638,7 +638,7 @@ mod tests {      #[test]     fn camazotz_heals_a_share_of_the_damage_dealt() {-        let mut p = blessed_player(&[247]);+        let mut p = blessed_player(&[1143]);         p.health = 10.0;         p.lifesteal(20.0);         assert!((p.health - (10.0 + 20.0 * LIFESTEAL_SHARE)).abs() < 1e-4);
games/voxels/src/main/rust/src/villager.rs
diff --git a/games/voxels/src/main/rust/src/villager.rs b/games/voxels/src/main/rust/src/villager.rsindex 461f02c472..88d361ae68 100644--- a/games/voxels/src/main/rust/src/villager.rs+++ b/games/voxels/src/main/rust/src/villager.rs@@ -14,7 +14,7 @@ use crate::world::block::Id;  use crate::item::{has_durability, max_durability}; -pub const EMERALD: Id = 156;+pub const EMERALD: Id = 1052;  /// One line on a villager's trade list. `cost2` of 0 means a single-ingredient trade. #[derive(Clone, Copy)]@@ -78,42 +78,42 @@ pub const ALL: [Profession; 11] = [  // Produce: the things a player can't grow, since there's no farming yet. const FARMER: &[Level] = &[-    &[buy(1, 135, 4), buy(1, 146, 4), sell(130, 8, 1)],-    &[buy(1, 136, 3), buy(1, 131, 6), buy(1, 58, 2)],-    &[buy(2, 152, 4), buy(3, 133, 1)],+    &[buy(1, 1031, 4), buy(1, 1042, 4), sell(1026, 8, 1)],+    &[buy(1, 1032, 3), buy(1, 1027, 6), buy(1, 58, 2)],+    &[buy(2, 1048, 4), buy(3, 1029, 1)], ];  // Matcha's fisherman lists 49 species; the game has two fish and the reef they came from. const FISHERMAN: &[Level] = &[-    &[buy(2, 132, 4), buy(1, 66, 3)],-    &[buy(2, 148, 4), sell(132, 8, 2)],+    &[buy(2, 1028, 4), buy(1, 66, 3)],+    &[buy(2, 1044, 4), sell(1028, 8, 2)],     &[buy(3, 67, 2), buy(2, 68, 4)], ];  // The butcher sells prepared dishes, and will cook yours if you bring the meat. The counter also // carries the baking Matcha's butcher does โ€” brownies and cookies have no other source. const BUTCHER: &[Level] = &[-    &[sell(222, 8, 1), buy(2, 223, 3), buy(2, 134, 3), buy(2, 153, 4)],-    &[buy(2, 150, 3), forge(3, 223, 2, 224)],-    &[forge(4, 223, 2, 235), buy(3, 225, 2)],+    &[sell(1118, 8, 1), buy(2, 1119, 3), buy(2, 1030, 3), buy(2, 1049, 4)],+    &[buy(2, 1046, 3), forge(3, 1119, 2, 1120)],+    &[forge(4, 1119, 2, 1131), buy(3, 1121, 2)], ];  const TOOLSMITH: &[Level] = &[-    &[sell(157, 12, 1), buy(1, 159, 8)],-    &[forge(4, 154, 2, 167), buy(5, 154, 3)],-    &[forge(8, 155, 2, 169), forge(5, 238, 2, 239)],+    &[sell(1053, 12, 1), buy(1, 1055, 8)],+    &[forge(4, 1050, 2, 1063), buy(5, 1050, 3)],+    &[forge(8, 1051, 2, 1065), forge(5, 1134, 2, 1135)], ];  const WEAPONSMITH: &[Level] = &[-    &[sell(138, 5, 1), buy(2, 166, 1)],-    &[forge(4, 154, 2, 168), forge(6, 238, 2, 240)],-    &[forge(9, 155, 2, 170)],+    &[sell(1034, 5, 1), buy(2, 1062, 1)],+    &[forge(4, 1050, 2, 1064), forge(6, 1134, 2, 1136)],+    &[forge(9, 1051, 2, 1066)], ];  const ARMORER: &[Level] = &[-    &[sell(154, 4, 1), buy(3, 171, 1)],-    &[buy(6, 172, 1), buy(4, 173, 1), buy(3, 174, 1)],-    &[forge(7, 155, 2, 175), forge(10, 155, 3, 176)],+    &[sell(1050, 4, 1), buy(3, 1067, 1)],+    &[buy(6, 1068, 1), buy(4, 1069, 1), buy(3, 1070, 1)],+    &[forge(7, 1051, 2, 1071), forge(10, 1051, 3, 1072)], ];  // Matcha's mason walks the player up a ladder of stone variants; the game's stonecutter turns each@@ -125,33 +125,33 @@ const MASON: &[Level] = &[ ];  const LEATHERWORKER: &[Level] = &[-    &[sell(137, 6, 2), buy(1, 4, 6)],+    &[sell(1033, 6, 2), buy(1, 4, 6)],     &[buy(1, 26, 6), buy(1, 29, 6)],-    &[buy(1, 47, 4), buy(1, 51, 4), buy(2, 137, 3)],+    &[buy(1, 47, 4), buy(1, 51, 4), buy(2, 1033, 3)], ];  // Matcha's librarian sells tomes; here the tomes are Blessings, priced steeply so crafting them stays // the main route. const LIBRARIAN: &[Level] = &[     &[buy(3, 33, 1), buy(1, 7, 4)],-    &[buy(5, 191, 1), buy(9, 218, 1)],-    &[buy(10, 210, 1), buy(10, 203, 1)],+    &[buy(5, 1087, 1), buy(9, 1114, 1)],+    &[buy(10, 1106, 1), buy(10, 1099, 1)], ];  // Matcha's cleric deals in splash potions. This game has no potions, so the cleric deals in the // things that keep you alive: Estus, golden apples, and the one merchant who will sell you a heart. const CLERIC: &[Level] = &[-    &[buy(4, 128, 1), sell(158, 6, 1)],-    &[buy(3, 133, 2), buy(9, 160, 1)],-    &[forge(12, 155, 1, 129), buy(10, 205, 1)],+    &[buy(4, 1024, 1), sell(1054, 6, 1)],+    &[buy(3, 1029, 2), buy(9, 1056, 1)],+    &[forge(12, 1051, 1, 1025), buy(10, 1101, 1)], ];  // Matcha's cartographer sells structure maps and a brush; without maps or archaeology this is the // expedition outfitter instead โ€” fire, throwables, and the obsidian for a portal. const CARTOGRAPHER: &[Level] = &[-    &[buy(2, 186, 1), buy(2, 190, 6)],-    &[buy(6, 78, 2), forge(3, 138, 2, 189)],-    &[buy(10, 78, 4), buy(6, 191, 2)],+    &[buy(2, 1082, 1), buy(2, 1086, 6)],+    &[buy(6, 78, 2), forge(3, 1034, 2, 1085)],+    &[buy(10, 78, 4), buy(6, 1087, 2)], ];  impl Profession {
games/voxels/src/main/rust/src/world/block.rs
diff --git a/games/voxels/src/main/rust/src/world/block.rs b/games/voxels/src/main/rust/src/world/block.rsindex efeecf3220..03ac7c4a3f 100644--- a/games/voxels/src/main/rust/src/world/block.rs+++ b/games/voxels/src/main/rust/src/world/block.rs@@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; -/// One id space for blocks and items, 16 bits wide. The split is by range, not by width:-/// `ITEM_BASE..=ITEM_MAX` is items and everything else is a block. See `item.rs`.+/// One 16-bit id space for blocks and items, split at `ITEM_BASE`: below it is a block, at or above+/// it is an item. See `item.rs`. pub type Id = u16;  #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]@@ -142,19 +142,9 @@ pub enum Block {     MelonCrop = 123, } -/// Blocks live in two windows either side of the item range. The low window is the original-/// `u8` numbering, frozen so no saved chunk needs remapping; new blocks go in the high window.-pub const MAX_LOW_BLOCK_ID: Id = 123;-pub const BLOCK_HIGH_BASE: Id = 1024;-/// One below `BLOCK_HIGH_BASE` while the high window is empty, which makes the range check below-/// match nothing rather than matching `Air`.-pub const MAX_HIGH_BLOCK_ID: Id = BLOCK_HIGH_BASE - 1;--/// Every id that names a real block, low window then high. The plain `0..=MAX` loop that used to-/// work would now walk the item window and half of nothing.-pub fn all_block_ids() -> impl Iterator<Item = Id> {-    (0..=MAX_LOW_BLOCK_ID).chain(BLOCK_HIGH_BASE..=MAX_HIGH_BLOCK_ID)-}+/// Blocks occupy the low 10 bits of the id space; items start where they end. Both sides have room+/// to grow, and there is exactly one boundary to remember.+pub const MAX_BLOCK_ID: Id = 123;  /// Growth stage occupies meta bits 3-4 (bits 0-2 are facing and top-half, used by slabs and stairs). pub const CROP_STAGE_SHIFT: u8 = 3;@@ -209,9 +199,7 @@ impl Boxes {  impl Block {     pub fn from_id(id: Id) -> Self {-        let known = id <= MAX_LOW_BLOCK_ID-            || (BLOCK_HIGH_BASE..=MAX_HIGH_BLOCK_ID).contains(&id);-        if known { unsafe { std::mem::transmute(id) } } else { Self::Air }+        if id <= MAX_BLOCK_ID { unsafe { std::mem::transmute(id) } } else { Self::Air }     }     pub fn id(self) -> Id { self as Id }     pub fn is_air(self) -> bool { matches!(self, Self::Air) }@@ -228,14 +216,14 @@ impl Block {     pub fn is_crop(self) -> bool { matches!(self, Self::WheatCrop | Self::CarrotCrop | Self::MelonCrop) }     /// The seed that plants this crop, and what a ripe one yields.     pub fn crop_seed(self) -> Id {-        match self { Self::WheatCrop => 250, Self::CarrotCrop => 135, Self::MelonCrop => 136, _ => 0 }+        match self { Self::WheatCrop => 1146, Self::CarrotCrop => 1031, Self::MelonCrop => 1032, _ => 0 }     }     pub fn crop_yield(self) -> Id {-        match self { Self::WheatCrop => 251, Self::CarrotCrop => 135, Self::MelonCrop => 136, _ => 0 }+        match self { Self::WheatCrop => 1147, Self::CarrotCrop => 1031, Self::MelonCrop => 1032, _ => 0 }     }     /// The crop a given seed plants, if any.     pub fn crop_from_seed(seed: Id) -> Option<Self> {-        match seed { 250 => Some(Self::WheatCrop), 135 => Some(Self::CarrotCrop), 136 => Some(Self::MelonCrop), _ => None }+        match seed { 1146 => Some(Self::WheatCrop), 1031 => Some(Self::CarrotCrop), 1032 => Some(Self::MelonCrop), _ => None }     }      /// Does this block stop light? Distinct from `is_opaque`, which asks whether a neighbour's face@@ -590,27 +578,25 @@ mod tests {      #[test]     fn every_id_up_to_the_max_maps_to_a_distinct_block() {-        for id in all_block_ids() {+        for id in 0..=MAX_BLOCK_ID {             assert_eq!(Block::from_id(id).id(), id, "id {id} did not round-trip");         }-        // Ids in the gap between the windows must not be mistaken for real blocks.-        assert_eq!(Block::from_id(MAX_LOW_BLOCK_ID + 1), Block::Air);-        assert_eq!(Block::from_id(BLOCK_HIGH_BASE - 1), Block::Air);+        // Anything past the last block reads back as air rather than transmuting into a variant+        // that doesn't exist.+        assert_eq!(Block::from_id(MAX_BLOCK_ID + 1), Block::Air);         assert_eq!(Block::from_id(Id::MAX), Block::Air);-        // The whole item window has to read back as air, or a stray item id in a chunk would-        // transmute into a block that doesn't exist.-        for id in crate::item::ITEM_BASE..=crate::item::ITEM_MAX {-            assert_eq!(Block::from_id(id), Block::Air, "item id {id} decoded as a block");-        }     } -    // The three windows must stay disjoint and in order, or an id would mean two things at once.+    // One boundary, and blocks have to stay on their side of it.     #[test]-    fn the_id_windows_do_not_overlap() {-        assert!(MAX_LOW_BLOCK_ID < crate::item::ITEM_BASE);-        assert!(crate::item::ITEM_BASE <= crate::item::ITEM_MAX);-        assert!(crate::item::ITEM_MAX < BLOCK_HIGH_BASE);-        for id in all_block_ids() { assert!(!crate::item::is_item(id), "block {id} sits in the item window"); }+    fn blocks_and_items_never_share_an_id() {+        assert!(MAX_BLOCK_ID < crate::item::ITEM_BASE);+        for id in 0..=MAX_BLOCK_ID { assert!(!crate::item::is_item(id), "block {id} reads as an item"); }+        assert!(crate::item::is_item(crate::item::ITEM_BASE));+        // Every item id decodes to air, so a stray one in a chunk is a hole rather than a wrong block.+        for id in crate::item::ITEM_BASE..crate::item::ITEM_BASE + 256 {+            assert_eq!(Block::from_id(id), Block::Air, "item id {id} decoded as a block");+        }     }      #[test]@@ -716,7 +702,7 @@ mod tests {     #[test]     fn crops_are_walkable_and_plantable() {         let mut seen = 0;-        for id in all_block_ids() {+        for id in 0..=MAX_BLOCK_ID {             let b = Block::from_id(id);             if !b.is_crop() { continue; }             seen += 1;
games/voxels/src/main/rust/src/world/save.rs
diff --git a/games/voxels/src/main/rust/src/world/save.rs b/games/voxels/src/main/rust/src/world/save.rsindex 188dab7b0f..adba9b72b7 100644--- a/games/voxels/src/main/rust/src/world/save.rs+++ b/games/voxels/src/main/rust/src/world/save.rs@@ -161,16 +161,15 @@ mod tests {         original.set_block(15, 255, 15, 123);         original.set_block_meta(8, 64, 8, 102, 0b100);         original.set_block(0, 255, 0, 123);-        // An id from the high block window, which only VOX3 is wide enough to carry.-        original.set_block(1, 255, 0, crate::world::block::BLOCK_HIGH_BASE);+        // An id past what a byte can hold, which is the whole reason the format is 16-bit.+        original.set_block(1, 255, 0, 900);          let encoded = encode_chunk(&original);         assert_eq!(&encoded[0..4], b"VOX3");          let mut loaded = Chunk::new(ChunkPos(7, 7));         decode_chunk(&encoded, &mut loaded).expect("VOX3 must decode");-        assert_eq!(loaded.get_block(1, 255, 0), crate::world::block::BLOCK_HIGH_BASE,-            "a wide id must survive the round trip intact");+        assert_eq!(loaded.get_block(1, 255, 0), 900, "a wide id must survive the round trip intact");         for (a, b) in original.sections.iter().zip(loaded.sections.iter()) {             match (a, b) {                 (Some(a), Some(b)) => {