136 $commonProperties = CommonProperties::getInstance();
137 self::registerSimpleIdOnlyMappings($reg);
138 self::registerColoredMappings($reg, $commonProperties);
139 self::registerCandleMappings($reg, $commonProperties);
140 self::registerLeavesMappings($reg);
141 self::registerSaplingMappings($reg);
142 self::registerPlantMappings($reg, $commonProperties);
143 self::registerCoralMappings($reg, $commonProperties);
144 self::registerCopperMappings($reg, $commonProperties);
145 self::registerFlattenedEnumMappings($reg, $commonProperties);
146 self::registerFlattenedBoolMappings($reg, $commonProperties);
147 self::registerStoneLikeSlabMappings($reg);
148 self::registerStoneLikeStairMappings($reg);
149 self::registerStoneLikeWallMappings($reg, $commonProperties);
151 self::registerWoodMappings($reg, $commonProperties);
152 self::registerTorchMappings($reg, $commonProperties);
153 self::registerChemistryMappings($reg, $commonProperties);
154 self::register1to1CustomMappings($reg, $commonProperties);
156 self::registerSplitMappings($reg, $commonProperties);
160 $reg->mapSimple(Blocks::AIR(), Ids::AIR);
161 $reg->mapSimple(Blocks::AMETHYST(), Ids::AMETHYST_BLOCK);
162 $reg->mapSimple(Blocks::ANCIENT_DEBRIS(), Ids::ANCIENT_DEBRIS);
163 $reg->mapSimple(Blocks::ANDESITE(), Ids::ANDESITE);
164 $reg->mapSimple(Blocks::BARRIER(), Ids::BARRIER);
165 $reg->mapSimple(Blocks::BEACON(), Ids::BEACON);
166 $reg->mapSimple(Blocks::BLACKSTONE(), Ids::BLACKSTONE);
167 $reg->mapSimple(Blocks::BLUE_ICE(), Ids::BLUE_ICE);
168 $reg->mapSimple(Blocks::BOOKSHELF(), Ids::BOOKSHELF);
169 $reg->mapSimple(Blocks::BRICKS(), Ids::BRICK_BLOCK);
170 $reg->mapSimple(Blocks::BROWN_MUSHROOM(), Ids::BROWN_MUSHROOM);
171 $reg->mapSimple(Blocks::BUDDING_AMETHYST(), Ids::BUDDING_AMETHYST);
172 $reg->mapSimple(Blocks::CALCITE(), Ids::CALCITE);
173 $reg->mapSimple(Blocks::CARTOGRAPHY_TABLE(), Ids::CARTOGRAPHY_TABLE);
174 $reg->mapSimple(Blocks::CHEMICAL_HEAT(), Ids::CHEMICAL_HEAT);
175 $reg->mapSimple(Blocks::CHISELED_DEEPSLATE(), Ids::CHISELED_DEEPSLATE);
176 $reg->mapSimple(Blocks::CHISELED_NETHER_BRICKS(), Ids::CHISELED_NETHER_BRICKS);
177 $reg->mapSimple(Blocks::CHISELED_POLISHED_BLACKSTONE(), Ids::CHISELED_POLISHED_BLACKSTONE);
178 $reg->mapSimple(Blocks::CHISELED_RED_SANDSTONE(), Ids::CHISELED_RED_SANDSTONE);
179 $reg->mapSimple(Blocks::CHISELED_RESIN_BRICKS(), Ids::CHISELED_RESIN_BRICKS);
180 $reg->mapSimple(Blocks::CHISELED_SANDSTONE(), Ids::CHISELED_SANDSTONE);
181 $reg->mapSimple(Blocks::CHISELED_STONE_BRICKS(), Ids::CHISELED_STONE_BRICKS);
182 $reg->mapSimple(Blocks::CHISELED_TUFF(), Ids::CHISELED_TUFF);
183 $reg->mapSimple(Blocks::CHISELED_TUFF_BRICKS(), Ids::CHISELED_TUFF_BRICKS);
184 $reg->mapSimple(Blocks::CHORUS_PLANT(), Ids::CHORUS_PLANT);
185 $reg->mapSimple(Blocks::CLAY(), Ids::CLAY);
186 $reg->mapSimple(Blocks::COAL(), Ids::COAL_BLOCK);
187 $reg->mapSimple(Blocks::COAL_ORE(), Ids::COAL_ORE);
188 $reg->mapSimple(Blocks::COBBLED_DEEPSLATE(), Ids::COBBLED_DEEPSLATE);
189 $reg->mapSimple(Blocks::COBBLESTONE(), Ids::COBBLESTONE);
190 $reg->mapSimple(Blocks::COBWEB(), Ids::WEB);
191 $reg->mapSimple(Blocks::COPPER_ORE(), Ids::COPPER_ORE);
192 $reg->mapSimple(Blocks::CRACKED_DEEPSLATE_BRICKS(), Ids::CRACKED_DEEPSLATE_BRICKS);
193 $reg->mapSimple(Blocks::CRACKED_DEEPSLATE_TILES(), Ids::CRACKED_DEEPSLATE_TILES);
194 $reg->mapSimple(Blocks::CRACKED_NETHER_BRICKS(), Ids::CRACKED_NETHER_BRICKS);
195 $reg->mapSimple(Blocks::CRACKED_POLISHED_BLACKSTONE_BRICKS(), Ids::CRACKED_POLISHED_BLACKSTONE_BRICKS);
196 $reg->mapSimple(Blocks::CRACKED_STONE_BRICKS(), Ids::CRACKED_STONE_BRICKS);
197 $reg->mapSimple(Blocks::CRAFTING_TABLE(), Ids::CRAFTING_TABLE);
198 $reg->mapSimple(Blocks::CRIMSON_ROOTS(), Ids::CRIMSON_ROOTS);
199 $reg->mapSimple(Blocks::CRYING_OBSIDIAN(), Ids::CRYING_OBSIDIAN);
200 $reg->mapSimple(Blocks::DANDELION(), Ids::DANDELION);
201 $reg->mapSimple(Blocks::CUT_RED_SANDSTONE(), Ids::CUT_RED_SANDSTONE);
202 $reg->mapSimple(Blocks::CUT_SANDSTONE(), Ids::CUT_SANDSTONE);
203 $reg->mapSimple(Blocks::DARK_PRISMARINE(), Ids::DARK_PRISMARINE);
204 $reg->mapSimple(Blocks::DEAD_BUSH(), Ids::DEADBUSH);
205 $reg->mapSimple(Blocks::DEEPSLATE_BRICKS(), Ids::DEEPSLATE_BRICKS);
206 $reg->mapSimple(Blocks::DEEPSLATE_COAL_ORE(), Ids::DEEPSLATE_COAL_ORE);
207 $reg->mapSimple(Blocks::DEEPSLATE_COPPER_ORE(), Ids::DEEPSLATE_COPPER_ORE);
208 $reg->mapSimple(Blocks::DEEPSLATE_DIAMOND_ORE(), Ids::DEEPSLATE_DIAMOND_ORE);
209 $reg->mapSimple(Blocks::DEEPSLATE_EMERALD_ORE(), Ids::DEEPSLATE_EMERALD_ORE);
210 $reg->mapSimple(Blocks::DEEPSLATE_GOLD_ORE(), Ids::DEEPSLATE_GOLD_ORE);
211 $reg->mapSimple(Blocks::DEEPSLATE_IRON_ORE(), Ids::DEEPSLATE_IRON_ORE);
212 $reg->mapSimple(Blocks::DEEPSLATE_LAPIS_LAZULI_ORE(), Ids::DEEPSLATE_LAPIS_ORE);
213 $reg->mapSimple(Blocks::DEEPSLATE_TILES(), Ids::DEEPSLATE_TILES);
214 $reg->mapSimple(Blocks::DIAMOND(), Ids::DIAMOND_BLOCK);
215 $reg->mapSimple(Blocks::DIAMOND_ORE(), Ids::DIAMOND_ORE);
216 $reg->mapSimple(Blocks::DIORITE(), Ids::DIORITE);
217 $reg->mapSimple(Blocks::DRAGON_EGG(), Ids::DRAGON_EGG);
218 $reg->mapSimple(Blocks::DRIED_KELP(), Ids::DRIED_KELP_BLOCK);
219 $reg->mapSimple(Blocks::ELEMENT_ACTINIUM(), Ids::ELEMENT_89);
220 $reg->mapSimple(Blocks::ELEMENT_ALUMINUM(), Ids::ELEMENT_13);
221 $reg->mapSimple(Blocks::ELEMENT_AMERICIUM(), Ids::ELEMENT_95);
222 $reg->mapSimple(Blocks::ELEMENT_ANTIMONY(), Ids::ELEMENT_51);
223 $reg->mapSimple(Blocks::ELEMENT_ARGON(), Ids::ELEMENT_18);
224 $reg->mapSimple(Blocks::ELEMENT_ARSENIC(), Ids::ELEMENT_33);
225 $reg->mapSimple(Blocks::ELEMENT_ASTATINE(), Ids::ELEMENT_85);
226 $reg->mapSimple(Blocks::ELEMENT_BARIUM(), Ids::ELEMENT_56);
227 $reg->mapSimple(Blocks::ELEMENT_BERKELIUM(), Ids::ELEMENT_97);
228 $reg->mapSimple(Blocks::ELEMENT_BERYLLIUM(), Ids::ELEMENT_4);
229 $reg->mapSimple(Blocks::ELEMENT_BISMUTH(), Ids::ELEMENT_83);
230 $reg->mapSimple(Blocks::ELEMENT_BOHRIUM(), Ids::ELEMENT_107);
231 $reg->mapSimple(Blocks::ELEMENT_BORON(), Ids::ELEMENT_5);
232 $reg->mapSimple(Blocks::ELEMENT_BROMINE(), Ids::ELEMENT_35);
233 $reg->mapSimple(Blocks::ELEMENT_CADMIUM(), Ids::ELEMENT_48);
234 $reg->mapSimple(Blocks::ELEMENT_CALCIUM(), Ids::ELEMENT_20);
235 $reg->mapSimple(Blocks::ELEMENT_CALIFORNIUM(), Ids::ELEMENT_98);
236 $reg->mapSimple(Blocks::ELEMENT_CARBON(), Ids::ELEMENT_6);
237 $reg->mapSimple(Blocks::ELEMENT_CERIUM(), Ids::ELEMENT_58);
238 $reg->mapSimple(Blocks::ELEMENT_CESIUM(), Ids::ELEMENT_55);
239 $reg->mapSimple(Blocks::ELEMENT_CHLORINE(), Ids::ELEMENT_17);
240 $reg->mapSimple(Blocks::ELEMENT_CHROMIUM(), Ids::ELEMENT_24);
241 $reg->mapSimple(Blocks::ELEMENT_COBALT(), Ids::ELEMENT_27);
242 $reg->mapSimple(Blocks::ELEMENT_COPERNICIUM(), Ids::ELEMENT_112);
243 $reg->mapSimple(Blocks::ELEMENT_COPPER(), Ids::ELEMENT_29);
244 $reg->mapSimple(Blocks::ELEMENT_CURIUM(), Ids::ELEMENT_96);
245 $reg->mapSimple(Blocks::ELEMENT_DARMSTADTIUM(), Ids::ELEMENT_110);
246 $reg->mapSimple(Blocks::ELEMENT_DUBNIUM(), Ids::ELEMENT_105);
247 $reg->mapSimple(Blocks::ELEMENT_DYSPROSIUM(), Ids::ELEMENT_66);
248 $reg->mapSimple(Blocks::ELEMENT_EINSTEINIUM(), Ids::ELEMENT_99);
249 $reg->mapSimple(Blocks::ELEMENT_ERBIUM(), Ids::ELEMENT_68);
250 $reg->mapSimple(Blocks::ELEMENT_EUROPIUM(), Ids::ELEMENT_63);
251 $reg->mapSimple(Blocks::ELEMENT_FERMIUM(), Ids::ELEMENT_100);
252 $reg->mapSimple(Blocks::ELEMENT_FLEROVIUM(), Ids::ELEMENT_114);
253 $reg->mapSimple(Blocks::ELEMENT_FLUORINE(), Ids::ELEMENT_9);
254 $reg->mapSimple(Blocks::ELEMENT_FRANCIUM(), Ids::ELEMENT_87);
255 $reg->mapSimple(Blocks::ELEMENT_GADOLINIUM(), Ids::ELEMENT_64);
256 $reg->mapSimple(Blocks::ELEMENT_GALLIUM(), Ids::ELEMENT_31);
257 $reg->mapSimple(Blocks::ELEMENT_GERMANIUM(), Ids::ELEMENT_32);
258 $reg->mapSimple(Blocks::ELEMENT_GOLD(), Ids::ELEMENT_79);
259 $reg->mapSimple(Blocks::ELEMENT_HAFNIUM(), Ids::ELEMENT_72);
260 $reg->mapSimple(Blocks::ELEMENT_HASSIUM(), Ids::ELEMENT_108);
261 $reg->mapSimple(Blocks::ELEMENT_HELIUM(), Ids::ELEMENT_2);
262 $reg->mapSimple(Blocks::ELEMENT_HOLMIUM(), Ids::ELEMENT_67);
263 $reg->mapSimple(Blocks::ELEMENT_HYDROGEN(), Ids::ELEMENT_1);
264 $reg->mapSimple(Blocks::ELEMENT_INDIUM(), Ids::ELEMENT_49);
265 $reg->mapSimple(Blocks::ELEMENT_IODINE(), Ids::ELEMENT_53);
266 $reg->mapSimple(Blocks::ELEMENT_IRIDIUM(), Ids::ELEMENT_77);
267 $reg->mapSimple(Blocks::ELEMENT_IRON(), Ids::ELEMENT_26);
268 $reg->mapSimple(Blocks::ELEMENT_KRYPTON(), Ids::ELEMENT_36);
269 $reg->mapSimple(Blocks::ELEMENT_LANTHANUM(), Ids::ELEMENT_57);
270 $reg->mapSimple(Blocks::ELEMENT_LAWRENCIUM(), Ids::ELEMENT_103);
271 $reg->mapSimple(Blocks::ELEMENT_LEAD(), Ids::ELEMENT_82);
272 $reg->mapSimple(Blocks::ELEMENT_LITHIUM(), Ids::ELEMENT_3);
273 $reg->mapSimple(Blocks::ELEMENT_LIVERMORIUM(), Ids::ELEMENT_116);
274 $reg->mapSimple(Blocks::ELEMENT_LUTETIUM(), Ids::ELEMENT_71);
275 $reg->mapSimple(Blocks::ELEMENT_MAGNESIUM(), Ids::ELEMENT_12);
276 $reg->mapSimple(Blocks::ELEMENT_MANGANESE(), Ids::ELEMENT_25);
277 $reg->mapSimple(Blocks::ELEMENT_MEITNERIUM(), Ids::ELEMENT_109);
278 $reg->mapSimple(Blocks::ELEMENT_MENDELEVIUM(), Ids::ELEMENT_101);
279 $reg->mapSimple(Blocks::ELEMENT_MERCURY(), Ids::ELEMENT_80);
280 $reg->mapSimple(Blocks::ELEMENT_MOLYBDENUM(), Ids::ELEMENT_42);
281 $reg->mapSimple(Blocks::ELEMENT_MOSCOVIUM(), Ids::ELEMENT_115);
282 $reg->mapSimple(Blocks::ELEMENT_NEODYMIUM(), Ids::ELEMENT_60);
283 $reg->mapSimple(Blocks::ELEMENT_NEON(), Ids::ELEMENT_10);
284 $reg->mapSimple(Blocks::ELEMENT_NEPTUNIUM(), Ids::ELEMENT_93);
285 $reg->mapSimple(Blocks::ELEMENT_NICKEL(), Ids::ELEMENT_28);
286 $reg->mapSimple(Blocks::ELEMENT_NIHONIUM(), Ids::ELEMENT_113);
287 $reg->mapSimple(Blocks::ELEMENT_NIOBIUM(), Ids::ELEMENT_41);
288 $reg->mapSimple(Blocks::ELEMENT_NITROGEN(), Ids::ELEMENT_7);
289 $reg->mapSimple(Blocks::ELEMENT_NOBELIUM(), Ids::ELEMENT_102);
290 $reg->mapSimple(Blocks::ELEMENT_OGANESSON(), Ids::ELEMENT_118);
291 $reg->mapSimple(Blocks::ELEMENT_OSMIUM(), Ids::ELEMENT_76);
292 $reg->mapSimple(Blocks::ELEMENT_OXYGEN(), Ids::ELEMENT_8);
293 $reg->mapSimple(Blocks::ELEMENT_PALLADIUM(), Ids::ELEMENT_46);
294 $reg->mapSimple(Blocks::ELEMENT_PHOSPHORUS(), Ids::ELEMENT_15);
295 $reg->mapSimple(Blocks::ELEMENT_PLATINUM(), Ids::ELEMENT_78);
296 $reg->mapSimple(Blocks::ELEMENT_PLUTONIUM(), Ids::ELEMENT_94);
297 $reg->mapSimple(Blocks::ELEMENT_POLONIUM(), Ids::ELEMENT_84);
298 $reg->mapSimple(Blocks::ELEMENT_POTASSIUM(), Ids::ELEMENT_19);
299 $reg->mapSimple(Blocks::ELEMENT_PRASEODYMIUM(), Ids::ELEMENT_59);
300 $reg->mapSimple(Blocks::ELEMENT_PROMETHIUM(), Ids::ELEMENT_61);
301 $reg->mapSimple(Blocks::ELEMENT_PROTACTINIUM(), Ids::ELEMENT_91);
302 $reg->mapSimple(Blocks::ELEMENT_RADIUM(), Ids::ELEMENT_88);
303 $reg->mapSimple(Blocks::ELEMENT_RADON(), Ids::ELEMENT_86);
304 $reg->mapSimple(Blocks::ELEMENT_RHENIUM(), Ids::ELEMENT_75);
305 $reg->mapSimple(Blocks::ELEMENT_RHODIUM(), Ids::ELEMENT_45);
306 $reg->mapSimple(Blocks::ELEMENT_ROENTGENIUM(), Ids::ELEMENT_111);
307 $reg->mapSimple(Blocks::ELEMENT_RUBIDIUM(), Ids::ELEMENT_37);
308 $reg->mapSimple(Blocks::ELEMENT_RUTHENIUM(), Ids::ELEMENT_44);
309 $reg->mapSimple(Blocks::ELEMENT_RUTHERFORDIUM(), Ids::ELEMENT_104);
310 $reg->mapSimple(Blocks::ELEMENT_SAMARIUM(), Ids::ELEMENT_62);
311 $reg->mapSimple(Blocks::ELEMENT_SCANDIUM(), Ids::ELEMENT_21);
312 $reg->mapSimple(Blocks::ELEMENT_SEABORGIUM(), Ids::ELEMENT_106);
313 $reg->mapSimple(Blocks::ELEMENT_SELENIUM(), Ids::ELEMENT_34);
314 $reg->mapSimple(Blocks::ELEMENT_SILICON(), Ids::ELEMENT_14);
315 $reg->mapSimple(Blocks::ELEMENT_SILVER(), Ids::ELEMENT_47);
316 $reg->mapSimple(Blocks::ELEMENT_SODIUM(), Ids::ELEMENT_11);
317 $reg->mapSimple(Blocks::ELEMENT_STRONTIUM(), Ids::ELEMENT_38);
318 $reg->mapSimple(Blocks::ELEMENT_SULFUR(), Ids::ELEMENT_16);
319 $reg->mapSimple(Blocks::ELEMENT_TANTALUM(), Ids::ELEMENT_73);
320 $reg->mapSimple(Blocks::ELEMENT_TECHNETIUM(), Ids::ELEMENT_43);
321 $reg->mapSimple(Blocks::ELEMENT_TELLURIUM(), Ids::ELEMENT_52);
322 $reg->mapSimple(Blocks::ELEMENT_TENNESSINE(), Ids::ELEMENT_117);
323 $reg->mapSimple(Blocks::ELEMENT_TERBIUM(), Ids::ELEMENT_65);
324 $reg->mapSimple(Blocks::ELEMENT_THALLIUM(), Ids::ELEMENT_81);
325 $reg->mapSimple(Blocks::ELEMENT_THORIUM(), Ids::ELEMENT_90);
326 $reg->mapSimple(Blocks::ELEMENT_THULIUM(), Ids::ELEMENT_69);
327 $reg->mapSimple(Blocks::ELEMENT_TIN(), Ids::ELEMENT_50);
328 $reg->mapSimple(Blocks::ELEMENT_TITANIUM(), Ids::ELEMENT_22);
329 $reg->mapSimple(Blocks::ELEMENT_TUNGSTEN(), Ids::ELEMENT_74);
330 $reg->mapSimple(Blocks::ELEMENT_URANIUM(), Ids::ELEMENT_92);
331 $reg->mapSimple(Blocks::ELEMENT_VANADIUM(), Ids::ELEMENT_23);
332 $reg->mapSimple(Blocks::ELEMENT_XENON(), Ids::ELEMENT_54);
333 $reg->mapSimple(Blocks::ELEMENT_YTTERBIUM(), Ids::ELEMENT_70);
334 $reg->mapSimple(Blocks::ELEMENT_YTTRIUM(), Ids::ELEMENT_39);
335 $reg->mapSimple(Blocks::ELEMENT_ZERO(), Ids::ELEMENT_0);
336 $reg->mapSimple(Blocks::ELEMENT_ZINC(), Ids::ELEMENT_30);
337 $reg->mapSimple(Blocks::ELEMENT_ZIRCONIUM(), Ids::ELEMENT_40);
338 $reg->mapSimple(Blocks::EMERALD(), Ids::EMERALD_BLOCK);
339 $reg->mapSimple(Blocks::EMERALD_ORE(), Ids::EMERALD_ORE);
340 $reg->mapSimple(Blocks::ENCHANTING_TABLE(), Ids::ENCHANTING_TABLE);
341 $reg->mapSimple(Blocks::END_STONE(), Ids::END_STONE);
342 $reg->mapSimple(Blocks::END_STONE_BRICKS(), Ids::END_BRICKS);
343 $reg->mapSimple(Blocks::FERN(), Ids::FERN);
344 $reg->mapSimple(Blocks::FLETCHING_TABLE(), Ids::FLETCHING_TABLE);
345 $reg->mapSimple(Blocks::GILDED_BLACKSTONE(), Ids::GILDED_BLACKSTONE);
346 $reg->mapSimple(Blocks::GLASS(), Ids::GLASS);
347 $reg->mapSimple(Blocks::GLASS_PANE(), Ids::GLASS_PANE);
348 $reg->mapSimple(Blocks::GLOWING_OBSIDIAN(), Ids::GLOWINGOBSIDIAN);
349 $reg->mapSimple(Blocks::GLOWSTONE(), Ids::GLOWSTONE);
350 $reg->mapSimple(Blocks::GOLD(), Ids::GOLD_BLOCK);
351 $reg->mapSimple(Blocks::GOLD_ORE(), Ids::GOLD_ORE);
352 $reg->mapSimple(Blocks::GRANITE(), Ids::GRANITE);
353 $reg->mapSimple(Blocks::GRASS(), Ids::GRASS_BLOCK);
354 $reg->mapSimple(Blocks::GRASS_PATH(), Ids::GRASS_PATH);
355 $reg->mapSimple(Blocks::GRAVEL(), Ids::GRAVEL);
356 $reg->mapSimple(Blocks::HANGING_ROOTS(), Ids::HANGING_ROOTS);
357 $reg->mapSimple(Blocks::HARDENED_CLAY(), Ids::HARDENED_CLAY);
358 $reg->mapSimple(Blocks::HARDENED_GLASS(), Ids::HARD_GLASS);
359 $reg->mapSimple(Blocks::HARDENED_GLASS_PANE(), Ids::HARD_GLASS_PANE);
360 $reg->mapSimple(Blocks::HONEYCOMB(), Ids::HONEYCOMB_BLOCK);
361 $reg->mapSimple(Blocks::ICE(), Ids::ICE);
362 $reg->mapSimple(Blocks::INFESTED_CHISELED_STONE_BRICK(), Ids::INFESTED_CHISELED_STONE_BRICKS);
363 $reg->mapSimple(Blocks::INFESTED_COBBLESTONE(), Ids::INFESTED_COBBLESTONE);
364 $reg->mapSimple(Blocks::INFESTED_CRACKED_STONE_BRICK(), Ids::INFESTED_CRACKED_STONE_BRICKS);
365 $reg->mapSimple(Blocks::INFESTED_MOSSY_STONE_BRICK(), Ids::INFESTED_MOSSY_STONE_BRICKS);
366 $reg->mapSimple(Blocks::INFESTED_STONE(), Ids::INFESTED_STONE);
367 $reg->mapSimple(Blocks::INFESTED_STONE_BRICK(), Ids::INFESTED_STONE_BRICKS);
368 $reg->mapSimple(Blocks::INFO_UPDATE(), Ids::INFO_UPDATE);
369 $reg->mapSimple(Blocks::INFO_UPDATE2(), Ids::INFO_UPDATE2);
370 $reg->mapSimple(Blocks::INVISIBLE_BEDROCK(), Ids::INVISIBLE_BEDROCK);
371 $reg->mapSimple(Blocks::IRON(), Ids::IRON_BLOCK);
372 $reg->mapSimple(Blocks::IRON_BARS(), Ids::IRON_BARS);
373 $reg->mapSimple(Blocks::IRON_ORE(), Ids::IRON_ORE);
374 $reg->mapSimple(Blocks::JUKEBOX(), Ids::JUKEBOX);
375 $reg->mapSimple(Blocks::LAPIS_LAZULI(), Ids::LAPIS_BLOCK);
376 $reg->mapSimple(Blocks::LAPIS_LAZULI_ORE(), Ids::LAPIS_ORE);
377 $reg->mapSimple(Blocks::LEGACY_STONECUTTER(), Ids::STONECUTTER);
378 $reg->mapSimple(Blocks::LILY_PAD(), Ids::WATERLILY);
379 $reg->mapSimple(Blocks::MAGMA(), Ids::MAGMA);
380 $reg->mapSimple(Blocks::MANGROVE_ROOTS(), Ids::MANGROVE_ROOTS);
381 $reg->mapSimple(Blocks::MELON(), Ids::MELON_BLOCK);
382 $reg->mapSimple(Blocks::MONSTER_SPAWNER(), Ids::MOB_SPAWNER);
383 $reg->mapSimple(Blocks::MOSSY_COBBLESTONE(), Ids::MOSSY_COBBLESTONE);
384 $reg->mapSimple(Blocks::MOSSY_STONE_BRICKS(), Ids::MOSSY_STONE_BRICKS);
385 $reg->mapSimple(Blocks::MUD(), Ids::MUD);
386 $reg->mapSimple(Blocks::MUD_BRICKS(), Ids::MUD_BRICKS);
387 $reg->mapSimple(Blocks::MYCELIUM(), Ids::MYCELIUM);
388 $reg->mapSimple(Blocks::NETHERITE(), Ids::NETHERITE_BLOCK);
389 $reg->mapSimple(Blocks::NETHERRACK(), Ids::NETHERRACK);
390 $reg->mapSimple(Blocks::NETHER_BRICKS(), Ids::NETHER_BRICK);
391 $reg->mapSimple(Blocks::NETHER_BRICK_FENCE(), Ids::NETHER_BRICK_FENCE);
392 $reg->mapSimple(Blocks::NETHER_GOLD_ORE(), Ids::NETHER_GOLD_ORE);
393 $reg->mapSimple(Blocks::NETHER_QUARTZ_ORE(), Ids::QUARTZ_ORE);
394 $reg->mapSimple(Blocks::NETHER_REACTOR_CORE(), Ids::NETHERREACTOR);
395 $reg->mapSimple(Blocks::NETHER_WART_BLOCK(), Ids::NETHER_WART_BLOCK);
396 $reg->mapSimple(Blocks::NOTE_BLOCK(), Ids::NOTEBLOCK);
397 $reg->mapSimple(Blocks::OBSIDIAN(), Ids::OBSIDIAN);
398 $reg->mapSimple(Blocks::PACKED_ICE(), Ids::PACKED_ICE);
399 $reg->mapSimple(Blocks::PACKED_MUD(), Ids::PACKED_MUD);
400 $reg->mapSimple(Blocks::PODZOL(), Ids::PODZOL);
401 $reg->mapSimple(Blocks::POLISHED_ANDESITE(), Ids::POLISHED_ANDESITE);
402 $reg->mapSimple(Blocks::POLISHED_BLACKSTONE(), Ids::POLISHED_BLACKSTONE);
403 $reg->mapSimple(Blocks::POLISHED_BLACKSTONE_BRICKS(), Ids::POLISHED_BLACKSTONE_BRICKS);
404 $reg->mapSimple(Blocks::POLISHED_DEEPSLATE(), Ids::POLISHED_DEEPSLATE);
405 $reg->mapSimple(Blocks::POLISHED_DIORITE(), Ids::POLISHED_DIORITE);
406 $reg->mapSimple(Blocks::POLISHED_GRANITE(), Ids::POLISHED_GRANITE);
407 $reg->mapSimple(Blocks::POLISHED_TUFF(), Ids::POLISHED_TUFF);
408 $reg->mapSimple(Blocks::PRISMARINE(), Ids::PRISMARINE);
409 $reg->mapSimple(Blocks::PRISMARINE_BRICKS(), Ids::PRISMARINE_BRICKS);
410 $reg->mapSimple(Blocks::QUARTZ_BRICKS(), Ids::QUARTZ_BRICKS);
411 $reg->mapSimple(Blocks::RAW_COPPER(), Ids::RAW_COPPER_BLOCK);
412 $reg->mapSimple(Blocks::RAW_GOLD(), Ids::RAW_GOLD_BLOCK);
413 $reg->mapSimple(Blocks::RAW_IRON(), Ids::RAW_IRON_BLOCK);
414 $reg->mapSimple(Blocks::REDSTONE(), Ids::REDSTONE_BLOCK);
415 $reg->mapSimple(Blocks::RED_MUSHROOM(), Ids::RED_MUSHROOM);
416 $reg->mapSimple(Blocks::RED_NETHER_BRICKS(), Ids::RED_NETHER_BRICK);
417 $reg->mapSimple(Blocks::RED_SAND(), Ids::RED_SAND);
418 $reg->mapSimple(Blocks::RED_SANDSTONE(), Ids::RED_SANDSTONE);
419 $reg->mapSimple(Blocks::REINFORCED_DEEPSLATE(), Ids::REINFORCED_DEEPSLATE);
420 $reg->mapSimple(Blocks::RESERVED6(), Ids::RESERVED6);
421 $reg->mapSimple(Blocks::RESIN(), Ids::RESIN_BLOCK);
422 $reg->mapSimple(Blocks::RESIN_BRICKS(), Ids::RESIN_BRICKS);
423 $reg->mapSimple(Blocks::SAND(), Ids::SAND);
424 $reg->mapSimple(Blocks::SANDSTONE(), Ids::SANDSTONE);
425 $reg->mapSimple(Blocks::SCULK(), Ids::SCULK);
426 $reg->mapSimple(Blocks::SEA_LANTERN(), Ids::SEA_LANTERN);
427 $reg->mapSimple(Blocks::SHROOMLIGHT(), Ids::SHROOMLIGHT);
428 $reg->mapSimple(Blocks::SHULKER_BOX(), Ids::UNDYED_SHULKER_BOX);
429 $reg->mapSimple(Blocks::SLIME(), Ids::SLIME);
430 $reg->mapSimple(Blocks::SMITHING_TABLE(), Ids::SMITHING_TABLE);
431 $reg->mapSimple(Blocks::SMOOTH_BASALT(), Ids::SMOOTH_BASALT);
432 $reg->mapSimple(Blocks::SMOOTH_RED_SANDSTONE(), Ids::SMOOTH_RED_SANDSTONE);
433 $reg->mapSimple(Blocks::SMOOTH_SANDSTONE(), Ids::SMOOTH_SANDSTONE);
434 $reg->mapSimple(Blocks::SMOOTH_STONE(), Ids::SMOOTH_STONE);
435 $reg->mapSimple(Blocks::SNOW(), Ids::SNOW);
436 $reg->mapSimple(Blocks::SOUL_SAND(), Ids::SOUL_SAND);
437 $reg->mapSimple(Blocks::SOUL_SOIL(), Ids::SOUL_SOIL);
438 $reg->mapSimple(Blocks::SPORE_BLOSSOM(), Ids::SPORE_BLOSSOM);
439 $reg->mapSimple(Blocks::STONE(), Ids::STONE);
440 $reg->mapSimple(Blocks::STONE_BRICKS(), Ids::STONE_BRICKS);
441 $reg->mapSimple(Blocks::TALL_GRASS(), Ids::SHORT_GRASS);
442 $reg->mapSimple(Blocks::TINTED_GLASS(), Ids::TINTED_GLASS);
443 $reg->mapSimple(Blocks::TORCHFLOWER(), Ids::TORCHFLOWER);
444 $reg->mapSimple(Blocks::TUFF(), Ids::TUFF);
445 $reg->mapSimple(Blocks::TUFF_BRICKS(), Ids::TUFF_BRICKS);
446 $reg->mapSimple(Blocks::WARPED_WART_BLOCK(), Ids::WARPED_WART_BLOCK);
447 $reg->mapSimple(Blocks::WARPED_ROOTS(), Ids::WARPED_ROOTS);
448 $reg->mapSimple(Blocks::WITHER_ROSE(), Ids::WITHER_ROSE);
450 $reg->mapSimple(Blocks::ALLIUM(), Ids::ALLIUM);
451 $reg->mapSimple(Blocks::CORNFLOWER(), Ids::CORNFLOWER);
452 $reg->mapSimple(Blocks::AZURE_BLUET(), Ids::AZURE_BLUET);
453 $reg->mapSimple(Blocks::LILY_OF_THE_VALLEY(), Ids::LILY_OF_THE_VALLEY);
454 $reg->mapSimple(Blocks::BLUE_ORCHID(), Ids::BLUE_ORCHID);
455 $reg->mapSimple(Blocks::OXEYE_DAISY(), Ids::OXEYE_DAISY);
456 $reg->mapSimple(Blocks::POPPY(), Ids::POPPY);
457 $reg->mapSimple(Blocks::ORANGE_TULIP(), Ids::ORANGE_TULIP);
458 $reg->mapSimple(Blocks::PINK_TULIP(), Ids::PINK_TULIP);
459 $reg->mapSimple(Blocks::RED_TULIP(), Ids::RED_TULIP);
460 $reg->mapSimple(Blocks::WHITE_TULIP(), Ids::WHITE_TULIP);
464 $reg->
mapColored(Blocks::STAINED_HARDENED_GLASS(),
"minecraft:hard_",
"_stained_glass");
465 $reg->
mapColored(Blocks::STAINED_HARDENED_GLASS_PANE(),
"minecraft:hard_",
"_stained_glass_pane");
467 $reg->
mapColored(Blocks::CARPET(),
"minecraft:",
"_carpet");
468 $reg->
mapColored(Blocks::CONCRETE(),
"minecraft:",
"_concrete");
469 $reg->
mapColored(Blocks::CONCRETE_POWDER(),
"minecraft:",
"_concrete_powder");
470 $reg->
mapColored(Blocks::DYED_SHULKER_BOX(),
"minecraft:",
"_shulker_box");
471 $reg->
mapColored(Blocks::STAINED_CLAY(),
"minecraft:",
"_terracotta");
472 $reg->
mapColored(Blocks::STAINED_GLASS(),
"minecraft:",
"_stained_glass");
473 $reg->
mapColored(Blocks::STAINED_GLASS_PANE(),
"minecraft:",
"_stained_glass_pane");
474 $reg->
mapColored(Blocks::WOOL(),
"minecraft:",
"_wool");
482 ->properties([$commonProperties->horizontalFacingClassic])
487 $candleProperties = [
488 $commonProperties->lit,
491 $cakeWithCandleProperties = [$commonProperties->lit];
493 $reg->
mapModel(
Model::create(Blocks::CAKE_WITH_CANDLE(), Ids::CANDLE_CAKE)->properties($cakeWithCandleProperties));
498 $commonProperties->dyeColorIdInfix,
501 ->properties($candleProperties)
506 $commonProperties->dyeColorIdInfix,
509 ->properties($cakeWithCandleProperties)
519 Ids::ACACIA_LEAVES => Blocks::ACACIA_LEAVES(),
520 Ids::AZALEA_LEAVES => Blocks::AZALEA_LEAVES(),
521 Ids::AZALEA_LEAVES_FLOWERED => Blocks::FLOWERING_AZALEA_LEAVES(),
522 Ids::BIRCH_LEAVES => Blocks::BIRCH_LEAVES(),
523 Ids::CHERRY_LEAVES => Blocks::CHERRY_LEAVES(),
524 Ids::DARK_OAK_LEAVES => Blocks::DARK_OAK_LEAVES(),
525 Ids::JUNGLE_LEAVES => Blocks::JUNGLE_LEAVES(),
526 Ids::MANGROVE_LEAVES => Blocks::MANGROVE_LEAVES(),
527 Ids::OAK_LEAVES => Blocks::OAK_LEAVES(),
528 Ids::PALE_OAK_LEAVES => Blocks::PALE_OAK_LEAVES(),
529 Ids::SPRUCE_LEAVES => Blocks::SPRUCE_LEAVES()
540 Ids::ACACIA_SAPLING => Blocks::ACACIA_SAPLING(),
541 Ids::BIRCH_SAPLING => Blocks::BIRCH_SAPLING(),
542 Ids::DARK_OAK_SAPLING => Blocks::DARK_OAK_SAPLING(),
543 Ids::JUNGLE_SAPLING => Blocks::JUNGLE_SAPLING(),
544 Ids::OAK_SAPLING => Blocks::OAK_SAPLING(),
545 Ids::SPRUCE_SAPLING => Blocks::SPRUCE_SAPLING(),
552 $reg->
mapModel(
Model::create(Blocks::BEETROOTS(), Ids::BEETROOT)->properties([$commonProperties->cropAgeMax7]));
553 $reg->
mapModel(
Model::create(Blocks::CARROTS(), Ids::CARROTS)->properties([$commonProperties->cropAgeMax7]));
554 $reg->
mapModel(
Model::create(Blocks::POTATOES(), Ids::POTATOES)->properties([$commonProperties->cropAgeMax7]));
555 $reg->
mapModel(
Model::create(Blocks::WHEAT(), Ids::WHEAT)->properties([$commonProperties->cropAgeMax7]));
557 $reg->
mapModel(
Model::create(Blocks::MELON_STEM(), Ids::MELON_STEM)->properties($commonProperties->stemProperties));
558 $reg->
mapModel(
Model::create(Blocks::PUMPKIN_STEM(), Ids::PUMPKIN_STEM)->properties($commonProperties->stemProperties));
561 [Blocks::DOUBLE_TALLGRASS(), Ids::TALL_GRASS],
562 [Blocks::LARGE_FERN(), Ids::LARGE_FERN],
563 [Blocks::LILAC(), Ids::LILAC],
564 [Blocks::PEONY(), Ids::PEONY],
565 [Blocks::ROSE_BUSH(), Ids::ROSE_BUSH],
566 [Blocks::SUNFLOWER(), Ids::SUNFLOWER],
572 [Blocks::BROWN_MUSHROOM_BLOCK(), Ids::BROWN_MUSHROOM_BLOCK],
573 [Blocks::RED_MUSHROOM_BLOCK(), Ids::RED_MUSHROOM_BLOCK]
580 $reg->
mapModel(
Model::create(Blocks::GLOW_LICHEN(), Ids::GLOW_LICHEN)->properties([$commonProperties->multiFacingFlags]));
581 $reg->
mapModel(
Model::create(Blocks::RESIN_CLUMP(), Ids::RESIN_CLUMP)->properties([$commonProperties->multiFacingFlags]));
585 StateNames::VINE_DIRECTION_BITS,
587 Facing::NORTH => BlockLegacyMetadata::VINE_FLAG_NORTH,
588 Facing::SOUTH => BlockLegacyMetadata::VINE_FLAG_SOUTH,
589 Facing::WEST => BlockLegacyMetadata::VINE_FLAG_WEST,
590 Facing::EAST => BlockLegacyMetadata::VINE_FLAG_EAST,
611 ->idComponents([...$commonProperties->coralIdPrefixes,
"_coral_fan"])
617 ->idComponents([...$commonProperties->coralIdPrefixes,
"_coral_wall_fan"])
626 ->idComponents([...$commonProperties->copperIdPrefixes,
"copper_bulb"])
628 $commonProperties->lit,
634 ...$commonProperties->copperIdPrefixes,
637 new BoolFromStringProperty(
"bruhhhh",
"",
"_block", fn(
Copper $b) => !$b->isWaxed() && $b->getOxidation() === CopperOxidation::NONE, fn() =>
null)
644 ->idComponents([...$commonProperties->copperIdPrefixes,
"cut_copper_stairs"])
645 ->properties($commonProperties->stairProperties)
648 ->idComponents([...$commonProperties->copperIdPrefixes,
"copper_trapdoor"])
649 ->properties($commonProperties->trapdoorProperties)
652 ->idComponents([...$commonProperties->copperIdPrefixes,
"copper_door"])
653 ->properties($commonProperties->doorProperties)
658 ...$commonProperties->copperIdPrefixes,
659 $commonProperties->slabIdInfix,
662 ->properties([$commonProperties->slabPositionProperty])
672 1 => Ids::CHIPPED_ANVIL,
673 2 => Ids::DAMAGED_ANVIL,
676 ->properties([$commonProperties->horizontalFacingCardinal])
681 AmethystCluster::STAGE_SMALL_BUD => Ids::SMALL_AMETHYST_BUD,
682 AmethystCluster::STAGE_MEDIUM_BUD => Ids::MEDIUM_AMETHYST_BUD,
683 AmethystCluster::STAGE_LARGE_BUD => Ids::LARGE_AMETHYST_BUD,
684 AmethystCluster::STAGE_CLUSTER => Ids::AMETHYST_CLUSTER
687 ->properties([$commonProperties->blockFace])
695 "minecraft:cave_vines",
701 FlattenedCaveVinesVariant::HEAD_WITH_BERRIES :
702 FlattenedCaveVinesVariant::BODY_WITH_BERRIES) :
703 FlattenedCaveVinesVariant::NO_BERRIES,
704 fn(
CaveVines $b, FlattenedCaveVinesVariant $v) => match($v){
705 FlattenedCaveVinesVariant::HEAD_WITH_BERRIES => $b->setBerries(
true)->setHead(
true),
706 FlattenedCaveVinesVariant::BODY_WITH_BERRIES => $b->setBerries(
true)->setHead(
false),
707 FlattenedCaveVinesVariant::NO_BERRIES => $b->setBerries(
false)->setHead(
false),
720 DirtType::NORMAL => Ids::DIRT,
721 DirtType::COARSE => Ids::COARSE_DIRT,
722 DirtType::ROOTED => Ids::DIRT_WITH_ROOTS,
723 }), fn(
Dirt $b) => $b->getDirtType(), fn(
Dirt $b, DirtType $v) => $b->setDirtType($v))
732 ->properties([$commonProperties->pillarAxis])
738 "minecraft:light_block_",
744 fn(
Light $b,
int $v) => $b->setLightLevel($v)
760 [Blocks::LAVA(),
"lava"],
761 [Blocks::WATER(),
"water"]
762 ] as [$block, $idSuffix]){
764 ->idComponents([...$commonProperties->liquidIdPrefixes, $idSuffix])
765 ->properties([$commonProperties->liquidData])
772 [Blocks::BLAST_FURNACE(),
"blast_furnace"],
773 [Blocks::FURNACE(),
"furnace"],
774 [Blocks::SMOKER(),
"smoker"]
775 ] as [$block, $idSuffix]){
777 ->idComponents([...$commonProperties->furnaceIdPrefixes, $idSuffix])
778 ->properties([$commonProperties->horizontalFacingCardinal])
783 [Blocks::REDSTONE_LAMP(),
"redstone_lamp"],
784 [Blocks::REDSTONE_ORE(),
"redstone_ore"],
785 [Blocks::DEEPSLATE_REDSTONE_ORE(),
"deepslate_redstone_ore"]
786 ] as [$block, $idSuffix]){
792 "minecraft:daylight_detector",
795 ->properties([$commonProperties->analogRedstoneSignal])
804 $commonProperties->horizontalFacingCardinal,
817 $commonProperties->horizontalFacingCardinal,
828 ->properties([$commonProperties->torchFacing])
838 new BoolFromStringProperty(
"underwater",
"",
"underwater_", fn(
TNT $b) => $b->worksUnderwater(), fn(
TNT $b,
bool $v) => $b->setWorksUnderwater($v)),
842 new BoolProperty(StateNames::EXPLODE_BIT, fn(
TNT $b) => $b->isUnstable(), fn(
TNT $b,
bool $v) => $b->setUnstable($v)),
848 $reg->mapSlab(Blocks::ANDESITE_SLAB(),
"andesite");
849 $reg->mapSlab(Blocks::BLACKSTONE_SLAB(),
"blackstone");
850 $reg->mapSlab(Blocks::BRICK_SLAB(),
"brick");
851 $reg->mapSlab(Blocks::COBBLED_DEEPSLATE_SLAB(),
"cobbled_deepslate");
852 $reg->mapSlab(Blocks::COBBLESTONE_SLAB(),
"cobblestone");
853 $reg->mapSlab(Blocks::CUT_RED_SANDSTONE_SLAB(),
"cut_red_sandstone");
854 $reg->mapSlab(Blocks::CUT_SANDSTONE_SLAB(),
"cut_sandstone");
855 $reg->mapSlab(Blocks::DARK_PRISMARINE_SLAB(),
"dark_prismarine");
856 $reg->mapSlab(Blocks::DEEPSLATE_BRICK_SLAB(),
"deepslate_brick");
857 $reg->mapSlab(Blocks::DEEPSLATE_TILE_SLAB(),
"deepslate_tile");
858 $reg->mapSlab(Blocks::DIORITE_SLAB(),
"diorite");
859 $reg->mapSlab(Blocks::END_STONE_BRICK_SLAB(),
"end_stone_brick");
860 $reg->mapSlab(Blocks::FAKE_WOODEN_SLAB(),
"petrified_oak");
861 $reg->mapSlab(Blocks::GRANITE_SLAB(),
"granite");
862 $reg->mapSlab(Blocks::MOSSY_COBBLESTONE_SLAB(),
"mossy_cobblestone");
863 $reg->mapSlab(Blocks::MOSSY_STONE_BRICK_SLAB(),
"mossy_stone_brick");
864 $reg->mapSlab(Blocks::MUD_BRICK_SLAB(),
"mud_brick");
865 $reg->mapSlab(Blocks::NETHER_BRICK_SLAB(),
"nether_brick");
866 $reg->mapSlab(Blocks::POLISHED_ANDESITE_SLAB(),
"polished_andesite");
867 $reg->mapSlab(Blocks::POLISHED_BLACKSTONE_BRICK_SLAB(),
"polished_blackstone_brick");
868 $reg->mapSlab(Blocks::POLISHED_BLACKSTONE_SLAB(),
"polished_blackstone");
869 $reg->mapSlab(Blocks::POLISHED_DEEPSLATE_SLAB(),
"polished_deepslate");
870 $reg->mapSlab(Blocks::POLISHED_DIORITE_SLAB(),
"polished_diorite");
871 $reg->mapSlab(Blocks::POLISHED_GRANITE_SLAB(),
"polished_granite");
872 $reg->mapSlab(Blocks::POLISHED_TUFF_SLAB(),
"polished_tuff");
873 $reg->mapSlab(Blocks::PRISMARINE_BRICKS_SLAB(),
"prismarine_brick");
874 $reg->mapSlab(Blocks::PRISMARINE_SLAB(),
"prismarine");
875 $reg->mapSlab(Blocks::PURPUR_SLAB(),
"purpur");
876 $reg->mapSlab(Blocks::QUARTZ_SLAB(),
"quartz");
877 $reg->mapSlab(Blocks::RED_NETHER_BRICK_SLAB(),
"red_nether_brick");
878 $reg->mapSlab(Blocks::RED_SANDSTONE_SLAB(),
"red_sandstone");
879 $reg->mapSlab(Blocks::RESIN_BRICK_SLAB(),
"resin_brick");
880 $reg->mapSlab(Blocks::SANDSTONE_SLAB(),
"sandstone");
881 $reg->mapSlab(Blocks::SMOOTH_QUARTZ_SLAB(),
"smooth_quartz");
882 $reg->mapSlab(Blocks::SMOOTH_RED_SANDSTONE_SLAB(),
"smooth_red_sandstone");
883 $reg->mapSlab(Blocks::SMOOTH_SANDSTONE_SLAB(),
"smooth_sandstone");
884 $reg->mapSlab(Blocks::SMOOTH_STONE_SLAB(),
"smooth_stone");
885 $reg->mapSlab(Blocks::STONE_BRICK_SLAB(),
"stone_brick");
886 $reg->mapSlab(Blocks::STONE_SLAB(),
"normal_stone");
887 $reg->mapSlab(Blocks::TUFF_BRICK_SLAB(),
"tuff_brick");
888 $reg->mapSlab(Blocks::TUFF_SLAB(),
"tuff");
892 $reg->mapStairs(Blocks::ANDESITE_STAIRS(), Ids::ANDESITE_STAIRS);
893 $reg->mapStairs(Blocks::BLACKSTONE_STAIRS(), Ids::BLACKSTONE_STAIRS);
894 $reg->mapStairs(Blocks::BRICK_STAIRS(), Ids::BRICK_STAIRS);
895 $reg->mapStairs(Blocks::COBBLED_DEEPSLATE_STAIRS(), Ids::COBBLED_DEEPSLATE_STAIRS);
896 $reg->mapStairs(Blocks::COBBLESTONE_STAIRS(), Ids::STONE_STAIRS);
897 $reg->mapStairs(Blocks::DARK_PRISMARINE_STAIRS(), Ids::DARK_PRISMARINE_STAIRS);
898 $reg->mapStairs(Blocks::DEEPSLATE_BRICK_STAIRS(), Ids::DEEPSLATE_BRICK_STAIRS);
899 $reg->mapStairs(Blocks::DEEPSLATE_TILE_STAIRS(), Ids::DEEPSLATE_TILE_STAIRS);
900 $reg->mapStairs(Blocks::DIORITE_STAIRS(), Ids::DIORITE_STAIRS);
901 $reg->mapStairs(Blocks::END_STONE_BRICK_STAIRS(), Ids::END_BRICK_STAIRS);
902 $reg->mapStairs(Blocks::GRANITE_STAIRS(), Ids::GRANITE_STAIRS);
903 $reg->mapStairs(Blocks::MOSSY_COBBLESTONE_STAIRS(), Ids::MOSSY_COBBLESTONE_STAIRS);
904 $reg->mapStairs(Blocks::MOSSY_STONE_BRICK_STAIRS(), Ids::MOSSY_STONE_BRICK_STAIRS);
905 $reg->mapStairs(Blocks::MUD_BRICK_STAIRS(), Ids::MUD_BRICK_STAIRS);
906 $reg->mapStairs(Blocks::NETHER_BRICK_STAIRS(), Ids::NETHER_BRICK_STAIRS);
907 $reg->mapStairs(Blocks::POLISHED_ANDESITE_STAIRS(), Ids::POLISHED_ANDESITE_STAIRS);
908 $reg->mapStairs(Blocks::POLISHED_BLACKSTONE_BRICK_STAIRS(), Ids::POLISHED_BLACKSTONE_BRICK_STAIRS);
909 $reg->mapStairs(Blocks::POLISHED_BLACKSTONE_STAIRS(), Ids::POLISHED_BLACKSTONE_STAIRS);
910 $reg->mapStairs(Blocks::POLISHED_DEEPSLATE_STAIRS(), Ids::POLISHED_DEEPSLATE_STAIRS);
911 $reg->mapStairs(Blocks::POLISHED_DIORITE_STAIRS(), Ids::POLISHED_DIORITE_STAIRS);
912 $reg->mapStairs(Blocks::POLISHED_GRANITE_STAIRS(), Ids::POLISHED_GRANITE_STAIRS);
913 $reg->mapStairs(Blocks::POLISHED_TUFF_STAIRS(), Ids::POLISHED_TUFF_STAIRS);
914 $reg->mapStairs(Blocks::PRISMARINE_BRICKS_STAIRS(), Ids::PRISMARINE_BRICKS_STAIRS);
915 $reg->mapStairs(Blocks::PRISMARINE_STAIRS(), Ids::PRISMARINE_STAIRS);
916 $reg->mapStairs(Blocks::PURPUR_STAIRS(), Ids::PURPUR_STAIRS);
917 $reg->mapStairs(Blocks::QUARTZ_STAIRS(), Ids::QUARTZ_STAIRS);
918 $reg->mapStairs(Blocks::RED_NETHER_BRICK_STAIRS(), Ids::RED_NETHER_BRICK_STAIRS);
919 $reg->mapStairs(Blocks::RED_SANDSTONE_STAIRS(), Ids::RED_SANDSTONE_STAIRS);
920 $reg->mapStairs(Blocks::RESIN_BRICK_STAIRS(), Ids::RESIN_BRICK_STAIRS);
921 $reg->mapStairs(Blocks::SANDSTONE_STAIRS(), Ids::SANDSTONE_STAIRS);
922 $reg->mapStairs(Blocks::SMOOTH_QUARTZ_STAIRS(), Ids::SMOOTH_QUARTZ_STAIRS);
923 $reg->mapStairs(Blocks::SMOOTH_RED_SANDSTONE_STAIRS(), Ids::SMOOTH_RED_SANDSTONE_STAIRS);
924 $reg->mapStairs(Blocks::SMOOTH_SANDSTONE_STAIRS(), Ids::SMOOTH_SANDSTONE_STAIRS);
925 $reg->mapStairs(Blocks::STONE_BRICK_STAIRS(), Ids::STONE_BRICK_STAIRS);
926 $reg->mapStairs(Blocks::STONE_STAIRS(), Ids::NORMAL_STONE_STAIRS);
927 $reg->mapStairs(Blocks::TUFF_BRICK_STAIRS(), Ids::TUFF_BRICK_STAIRS);
928 $reg->mapStairs(Blocks::TUFF_STAIRS(), Ids::TUFF_STAIRS);
933 Ids::ANDESITE_WALL => Blocks::ANDESITE_WALL(),
934 Ids::BLACKSTONE_WALL => Blocks::BLACKSTONE_WALL(),
935 Ids::BRICK_WALL => Blocks::BRICK_WALL(),
936 Ids::COBBLED_DEEPSLATE_WALL => Blocks::COBBLED_DEEPSLATE_WALL(),
937 Ids::COBBLESTONE_WALL => Blocks::COBBLESTONE_WALL(),
938 Ids::DEEPSLATE_BRICK_WALL => Blocks::DEEPSLATE_BRICK_WALL(),
939 Ids::DEEPSLATE_TILE_WALL => Blocks::DEEPSLATE_TILE_WALL(),
940 Ids::DIORITE_WALL => Blocks::DIORITE_WALL(),
941 Ids::END_STONE_BRICK_WALL => Blocks::END_STONE_BRICK_WALL(),
942 Ids::GRANITE_WALL => Blocks::GRANITE_WALL(),
943 Ids::MOSSY_COBBLESTONE_WALL => Blocks::MOSSY_COBBLESTONE_WALL(),
944 Ids::MOSSY_STONE_BRICK_WALL => Blocks::MOSSY_STONE_BRICK_WALL(),
945 Ids::MUD_BRICK_WALL => Blocks::MUD_BRICK_WALL(),
946 Ids::NETHER_BRICK_WALL => Blocks::NETHER_BRICK_WALL(),
947 Ids::POLISHED_BLACKSTONE_BRICK_WALL => Blocks::POLISHED_BLACKSTONE_BRICK_WALL(),
948 Ids::POLISHED_BLACKSTONE_WALL => Blocks::POLISHED_BLACKSTONE_WALL(),
949 Ids::POLISHED_DEEPSLATE_WALL => Blocks::POLISHED_DEEPSLATE_WALL(),
950 Ids::POLISHED_TUFF_WALL => Blocks::POLISHED_TUFF_WALL(),
951 Ids::PRISMARINE_WALL => Blocks::PRISMARINE_WALL(),
952 Ids::RED_NETHER_BRICK_WALL => Blocks::RED_NETHER_BRICK_WALL(),
953 Ids::RED_SANDSTONE_WALL => Blocks::RED_SANDSTONE_WALL(),
954 Ids::RESIN_BRICK_WALL => Blocks::RESIN_BRICK_WALL(),
955 Ids::SANDSTONE_WALL => Blocks::SANDSTONE_WALL(),
956 Ids::STONE_BRICK_WALL => Blocks::STONE_BRICK_WALL(),
957 Ids::TUFF_BRICK_WALL => Blocks::TUFF_BRICK_WALL(),
958 Ids::TUFF_WALL => Blocks::TUFF_WALL()
967 [Blocks::ACACIA_BUTTON(), Ids::ACACIA_BUTTON],
968 [Blocks::BIRCH_BUTTON(), Ids::BIRCH_BUTTON],
969 [Blocks::CHERRY_BUTTON(), Ids::CHERRY_BUTTON],
970 [Blocks::CRIMSON_BUTTON(), Ids::CRIMSON_BUTTON],
971 [Blocks::DARK_OAK_BUTTON(), Ids::DARK_OAK_BUTTON],
972 [Blocks::JUNGLE_BUTTON(), Ids::JUNGLE_BUTTON],
973 [Blocks::MANGROVE_BUTTON(), Ids::MANGROVE_BUTTON],
974 [Blocks::OAK_BUTTON(), Ids::WOODEN_BUTTON],
975 [Blocks::PALE_OAK_BUTTON(), Ids::PALE_OAK_BUTTON],
976 [Blocks::SPRUCE_BUTTON(), Ids::SPRUCE_BUTTON],
977 [Blocks::WARPED_BUTTON(), Ids::WARPED_BUTTON]
984 [Blocks::ACACIA_DOOR(), Ids::ACACIA_DOOR],
985 [Blocks::BIRCH_DOOR(), Ids::BIRCH_DOOR],
986 [Blocks::CHERRY_DOOR(), Ids::CHERRY_DOOR],
987 [Blocks::CRIMSON_DOOR(), Ids::CRIMSON_DOOR],
988 [Blocks::DARK_OAK_DOOR(), Ids::DARK_OAK_DOOR],
989 [Blocks::JUNGLE_DOOR(), Ids::JUNGLE_DOOR],
990 [Blocks::MANGROVE_DOOR(), Ids::MANGROVE_DOOR],
991 [Blocks::OAK_DOOR(), Ids::WOODEN_DOOR],
992 [Blocks::PALE_OAK_DOOR(), Ids::PALE_OAK_DOOR],
993 [Blocks::SPRUCE_DOOR(), Ids::SPRUCE_DOOR],
994 [Blocks::WARPED_DOOR(), Ids::WARPED_DOOR]
1001 [Blocks::ACACIA_FENCE(), Ids::ACACIA_FENCE],
1002 [Blocks::BIRCH_FENCE(), Ids::BIRCH_FENCE],
1003 [Blocks::CHERRY_FENCE(), Ids::CHERRY_FENCE],
1004 [Blocks::DARK_OAK_FENCE(), Ids::DARK_OAK_FENCE],
1005 [Blocks::JUNGLE_FENCE(), Ids::JUNGLE_FENCE],
1006 [Blocks::MANGROVE_FENCE(), Ids::MANGROVE_FENCE],
1007 [Blocks::OAK_FENCE(), Ids::OAK_FENCE],
1008 [Blocks::PALE_OAK_FENCE(), Ids::PALE_OAK_FENCE],
1009 [Blocks::SPRUCE_FENCE(), Ids::SPRUCE_FENCE],
1010 [Blocks::CRIMSON_FENCE(), Ids::CRIMSON_FENCE],
1011 [Blocks::WARPED_FENCE(), Ids::WARPED_FENCE]
1012 ] as [$block, $id]){
1013 $reg->mapSimple($block, $id);
1017 [Blocks::ACACIA_FENCE_GATE(), Ids::ACACIA_FENCE_GATE],
1018 [Blocks::BIRCH_FENCE_GATE(), Ids::BIRCH_FENCE_GATE],
1019 [Blocks::CHERRY_FENCE_GATE(), Ids::CHERRY_FENCE_GATE],
1020 [Blocks::DARK_OAK_FENCE_GATE(), Ids::DARK_OAK_FENCE_GATE],
1021 [Blocks::JUNGLE_FENCE_GATE(), Ids::JUNGLE_FENCE_GATE],
1022 [Blocks::MANGROVE_FENCE_GATE(), Ids::MANGROVE_FENCE_GATE],
1023 [Blocks::OAK_FENCE_GATE(), Ids::FENCE_GATE],
1024 [Blocks::PALE_OAK_FENCE_GATE(), Ids::PALE_OAK_FENCE_GATE],
1025 [Blocks::SPRUCE_FENCE_GATE(), Ids::SPRUCE_FENCE_GATE],
1026 [Blocks::CRIMSON_FENCE_GATE(), Ids::CRIMSON_FENCE_GATE],
1027 [Blocks::WARPED_FENCE_GATE(), Ids::WARPED_FENCE_GATE]
1028 ] as [$block, $id]){
1033 [Blocks::ACACIA_SIGN(), Ids::ACACIA_STANDING_SIGN],
1034 [Blocks::BIRCH_SIGN(), Ids::BIRCH_STANDING_SIGN],
1035 [Blocks::CHERRY_SIGN(), Ids::CHERRY_STANDING_SIGN],
1036 [Blocks::DARK_OAK_SIGN(), Ids::DARKOAK_STANDING_SIGN],
1037 [Blocks::JUNGLE_SIGN(), Ids::JUNGLE_STANDING_SIGN],
1038 [Blocks::MANGROVE_SIGN(), Ids::MANGROVE_STANDING_SIGN],
1039 [Blocks::OAK_SIGN(), Ids::STANDING_SIGN],
1040 [Blocks::PALE_OAK_SIGN(), Ids::PALE_OAK_STANDING_SIGN],
1041 [Blocks::SPRUCE_SIGN(), Ids::SPRUCE_STANDING_SIGN],
1042 [Blocks::CRIMSON_SIGN(), Ids::CRIMSON_STANDING_SIGN],
1043 [Blocks::WARPED_SIGN(), Ids::WARPED_STANDING_SIGN]
1044 ] as [$block, $id]){
1050 [Blocks::ACACIA_LOG(),
"acacia_log"],
1051 [Blocks::BIRCH_LOG(),
"birch_log"],
1052 [Blocks::CHERRY_LOG(),
"cherry_log"],
1053 [Blocks::DARK_OAK_LOG(),
"dark_oak_log"],
1054 [Blocks::JUNGLE_LOG(),
"jungle_log"],
1055 [Blocks::MANGROVE_LOG(),
"mangrove_log"],
1056 [Blocks::OAK_LOG(),
"oak_log"],
1057 [Blocks::PALE_OAK_LOG(),
"pale_oak_log"],
1058 [Blocks::SPRUCE_LOG(),
"spruce_log"],
1059 [Blocks::CRIMSON_STEM(),
"crimson_stem"],
1060 [Blocks::WARPED_STEM(),
"warped_stem"],
1063 [Blocks::ACACIA_WOOD(),
"acacia_wood"],
1064 [Blocks::BIRCH_WOOD(),
"birch_wood"],
1065 [Blocks::CHERRY_WOOD(),
"cherry_wood"],
1066 [Blocks::DARK_OAK_WOOD(),
"dark_oak_wood"],
1067 [Blocks::JUNGLE_WOOD(),
"jungle_wood"],
1068 [Blocks::MANGROVE_WOOD(),
"mangrove_wood"],
1069 [Blocks::OAK_WOOD(),
"oak_wood"],
1070 [Blocks::PALE_OAK_WOOD(),
"pale_oak_wood"],
1071 [Blocks::SPRUCE_WOOD(),
"spruce_wood"],
1072 [Blocks::CRIMSON_HYPHAE(),
"crimson_hyphae"],
1073 [Blocks::WARPED_HYPHAE(),
"warped_hyphae"]
1074 ] as [$block, $idSuffix]){
1076 ->idComponents([...$commonProperties->woodIdPrefixes, $idSuffix])
1077 ->properties([$commonProperties->pillarAxis])
1083 [Blocks::ACACIA_PLANKS(), Ids::ACACIA_PLANKS],
1084 [Blocks::BIRCH_PLANKS(), Ids::BIRCH_PLANKS],
1085 [Blocks::CHERRY_PLANKS(), Ids::CHERRY_PLANKS],
1086 [Blocks::DARK_OAK_PLANKS(), Ids::DARK_OAK_PLANKS],
1087 [Blocks::JUNGLE_PLANKS(), Ids::JUNGLE_PLANKS],
1088 [Blocks::MANGROVE_PLANKS(), Ids::MANGROVE_PLANKS],
1089 [Blocks::OAK_PLANKS(), Ids::OAK_PLANKS],
1090 [Blocks::PALE_OAK_PLANKS(), Ids::PALE_OAK_PLANKS],
1091 [Blocks::SPRUCE_PLANKS(), Ids::SPRUCE_PLANKS],
1092 [Blocks::CRIMSON_PLANKS(), Ids::CRIMSON_PLANKS],
1093 [Blocks::WARPED_PLANKS(), Ids::WARPED_PLANKS]
1094 ] as [$block, $id]){
1095 $reg->mapSimple($block, $id);
1100 [Blocks::ACACIA_PRESSURE_PLATE(), Ids::ACACIA_PRESSURE_PLATE],
1101 [Blocks::BIRCH_PRESSURE_PLATE(), Ids::BIRCH_PRESSURE_PLATE],
1102 [Blocks::CHERRY_PRESSURE_PLATE(), Ids::CHERRY_PRESSURE_PLATE],
1103 [Blocks::DARK_OAK_PRESSURE_PLATE(), Ids::DARK_OAK_PRESSURE_PLATE],
1104 [Blocks::JUNGLE_PRESSURE_PLATE(), Ids::JUNGLE_PRESSURE_PLATE],
1105 [Blocks::MANGROVE_PRESSURE_PLATE(), Ids::MANGROVE_PRESSURE_PLATE],
1106 [Blocks::OAK_PRESSURE_PLATE(), Ids::WOODEN_PRESSURE_PLATE],
1107 [Blocks::PALE_OAK_PRESSURE_PLATE(), Ids::PALE_OAK_PRESSURE_PLATE],
1108 [Blocks::SPRUCE_PRESSURE_PLATE(), Ids::SPRUCE_PRESSURE_PLATE],
1109 [Blocks::CRIMSON_PRESSURE_PLATE(), Ids::CRIMSON_PRESSURE_PLATE],
1110 [Blocks::WARPED_PRESSURE_PLATE(), Ids::WARPED_PRESSURE_PLATE]
1111 ] as [$block, $id]){
1112 $reg->
mapModel(
Model::create($block, $id)->properties($commonProperties->simplePressurePlateProperties));
1117 [Blocks::ACACIA_SLAB(),
"acacia"],
1118 [Blocks::BIRCH_SLAB(),
"birch"],
1119 [Blocks::CHERRY_SLAB(),
"cherry"],
1120 [Blocks::DARK_OAK_SLAB(),
"dark_oak"],
1121 [Blocks::JUNGLE_SLAB(),
"jungle"],
1122 [Blocks::MANGROVE_SLAB(),
"mangrove"],
1123 [Blocks::OAK_SLAB(),
"oak"],
1124 [Blocks::PALE_OAK_SLAB(),
"pale_oak"],
1125 [Blocks::SPRUCE_SLAB(),
"spruce"],
1126 [Blocks::CRIMSON_SLAB(),
"crimson"],
1127 [Blocks::WARPED_SLAB(),
"warped"]
1128 ] as [$block, $type]){
1129 $reg->mapSlab($block, $type);
1134 [Blocks::ACACIA_STAIRS(), Ids::ACACIA_STAIRS],
1135 [Blocks::BIRCH_STAIRS(), Ids::BIRCH_STAIRS],
1136 [Blocks::CHERRY_STAIRS(), Ids::CHERRY_STAIRS],
1137 [Blocks::DARK_OAK_STAIRS(), Ids::DARK_OAK_STAIRS],
1138 [Blocks::JUNGLE_STAIRS(), Ids::JUNGLE_STAIRS],
1139 [Blocks::MANGROVE_STAIRS(), Ids::MANGROVE_STAIRS],
1140 [Blocks::OAK_STAIRS(), Ids::OAK_STAIRS],
1141 [Blocks::PALE_OAK_STAIRS(), Ids::PALE_OAK_STAIRS],
1142 [Blocks::SPRUCE_STAIRS(), Ids::SPRUCE_STAIRS],
1143 [Blocks::CRIMSON_STAIRS(), Ids::CRIMSON_STAIRS],
1144 [Blocks::WARPED_STAIRS(), Ids::WARPED_STAIRS]
1145 ] as [$block, $id]){
1146 $reg->mapStairs($block, $id);
1151 [Blocks::ACACIA_TRAPDOOR(), Ids::ACACIA_TRAPDOOR],
1152 [Blocks::BIRCH_TRAPDOOR(), Ids::BIRCH_TRAPDOOR],
1153 [Blocks::CHERRY_TRAPDOOR(), Ids::CHERRY_TRAPDOOR],
1154 [Blocks::DARK_OAK_TRAPDOOR(), Ids::DARK_OAK_TRAPDOOR],
1155 [Blocks::JUNGLE_TRAPDOOR(), Ids::JUNGLE_TRAPDOOR],
1156 [Blocks::MANGROVE_TRAPDOOR(), Ids::MANGROVE_TRAPDOOR],
1157 [Blocks::OAK_TRAPDOOR(), Ids::TRAPDOOR],
1158 [Blocks::PALE_OAK_TRAPDOOR(), Ids::PALE_OAK_TRAPDOOR],
1159 [Blocks::SPRUCE_TRAPDOOR(), Ids::SPRUCE_TRAPDOOR],
1160 [Blocks::CRIMSON_TRAPDOOR(), Ids::CRIMSON_TRAPDOOR],
1161 [Blocks::WARPED_TRAPDOOR(), Ids::WARPED_TRAPDOOR]
1162 ] as [$block, $id]){
1168 [Blocks::ACACIA_WALL_SIGN(), Ids::ACACIA_WALL_SIGN],
1169 [Blocks::BIRCH_WALL_SIGN(), Ids::BIRCH_WALL_SIGN],
1170 [Blocks::CHERRY_WALL_SIGN(), Ids::CHERRY_WALL_SIGN],
1171 [Blocks::DARK_OAK_WALL_SIGN(), Ids::DARKOAK_WALL_SIGN],
1172 [Blocks::JUNGLE_WALL_SIGN(), Ids::JUNGLE_WALL_SIGN],
1173 [Blocks::MANGROVE_WALL_SIGN(), Ids::MANGROVE_WALL_SIGN],
1174 [Blocks::OAK_WALL_SIGN(), Ids::WALL_SIGN],
1175 [Blocks::PALE_OAK_WALL_SIGN(), Ids::PALE_OAK_WALL_SIGN],
1176 [Blocks::SPRUCE_WALL_SIGN(), Ids::SPRUCE_WALL_SIGN],
1177 [Blocks::CRIMSON_WALL_SIGN(), Ids::CRIMSON_WALL_SIGN],
1178 [Blocks::WARPED_WALL_SIGN(), Ids::WARPED_WALL_SIGN]
1179 ] as [$block, $id]){
1180 $reg->
mapModel(
Model::create($block, $id)->properties([$commonProperties->horizontalFacingClassic]));
1186 [Blocks::BLUE_TORCH(), Ids::COLORED_TORCH_BLUE],
1187 [Blocks::GREEN_TORCH(), Ids::COLORED_TORCH_GREEN],
1188 [Blocks::PURPLE_TORCH(), Ids::COLORED_TORCH_PURPLE],
1189 [Blocks::RED_TORCH(), Ids::COLORED_TORCH_RED],
1190 [Blocks::SOUL_TORCH(), Ids::SOUL_TORCH],
1191 [Blocks::TORCH(), Ids::TORCH],
1192 [Blocks::UNDERWATER_TORCH(), Ids::UNDERWATER_TORCH]
1193 ] as [$block, $id]){
1200 [Blocks::COMPOUND_CREATOR(), Ids::COMPOUND_CREATOR],
1201 [Blocks::ELEMENT_CONSTRUCTOR(), Ids::ELEMENT_CONSTRUCTOR],
1202 [Blocks::LAB_TABLE(), Ids::LAB_TABLE],
1203 [Blocks::MATERIAL_REDUCER(), Ids::MATERIAL_REDUCER],
1204 ] as [$block, $id]){
1205 $reg->
mapModel(
Model::create($block, $id)->properties([$commonProperties->horizontalFacingSWNEInverted]));
1219 new ValueFromStringProperty(StateNames::BAMBOO_LEAF_SIZE, ValueMappings::getInstance()->bambooLeafSize, fn(
Bamboo $b) => $b->getLeafSize(), fn(
Bamboo $b,
int $v) => $b->setLeafSize($v)),
1221 new BoolFromStringProperty(StateNames::BAMBOO_STALK_THICKNESS, StringValues::BAMBOO_STALK_THICKNESS_THIN, StringValues::BAMBOO_STALK_THICKNESS_THICK, fn(
Bamboo $b) => $b->isThick(), fn(
Bamboo $b,
bool $v) => $b->setThick($v))
1226 $reg->
mapModel(
Model::create(Blocks::BANNER(), Ids::STANDING_BANNER)->properties([$commonProperties->floorSignLikeRotation]));
1228 $commonProperties->anyFacingClassic,
1231 $reg->
mapModel(
Model::create(Blocks::BASALT(), Ids::BASALT)->properties([$commonProperties->pillarAxis]));
1233 new BoolProperty(StateNames::HEAD_PIECE_BIT, fn(
Bed $b) => $b->isHeadPart(), fn(
Bed $b,
bool $v) => $b->setHead($v)),
1234 new BoolProperty(StateNames::OCCUPIED_BIT, fn(
Bed $b) => $b->isOccupied(), fn(
Bed $b,
bool $v) => $b->setOccupied($v)),
1235 $commonProperties->horizontalFacingSWNE
1242 new ValueFromStringProperty(StateNames::ATTACHMENT, ValueMappings::getInstance()->bellAttachmentType, fn(
Bell $b) => $b->getAttachmentType(), fn(
Bell $b, BellAttachmentType $v) => $b->setAttachmentType($v)),
1243 $commonProperties->horizontalFacingSWNE
1247 $commonProperties->pillarAxis
1251 BrewingStandSlot::EAST => StateNames::BREWING_STAND_SLOT_A_BIT,
1252 BrewingStandSlot::SOUTHWEST => StateNames::BREWING_STAND_SLOT_B_BIT,
1253 BrewingStandSlot::NORTHWEST => StateNames::BREWING_STAND_SLOT_C_BIT
1254 }, fn(
BrewingStand $b) => $b->hasSlot($slot), fn(
BrewingStand $b,
bool $v) => $b->setSlot($slot, $v)), BrewingStandSlot::cases())));
1258 new IntProperty(StateNames::AGE, 0, 15, fn(
Cactus $b) => $b->getAge(), fn(
Cactus $b,
int $v) => $b->setAge($v))
1261 new IntProperty(StateNames::BITE_COUNTER, 0, 6, fn(
Cake $b) => $b->getBites(), fn(
Cake $b,
int $v) => $b->setBites($v))
1263 $reg->
mapModel(
Model::create(Blocks::CAMPFIRE(), Ids::CAMPFIRE)->properties($commonProperties->campfireProperties));
1265 $commonProperties->horizontalFacingCardinal
1267 $reg->
mapModel(
Model::create(Blocks::CHAIN(), Ids::CHAIN)->properties([$commonProperties->pillarAxis]));
1269 $commonProperties->horizontalFacingSWNE,
1271 StateNames::BOOKS_STORED,
1274 ChiseledBookshelfSlot::TOP_LEFT => 1 << 0,
1275 ChiseledBookshelfSlot::TOP_MIDDLE => 1 << 1,
1276 ChiseledBookshelfSlot::TOP_RIGHT => 1 << 2,
1277 ChiseledBookshelfSlot::BOTTOM_LEFT => 1 << 3,
1278 ChiseledBookshelfSlot::BOTTOM_MIDDLE => 1 << 4,
1279 ChiseledBookshelfSlot::BOTTOM_RIGHT => 1 << 5
1285 $reg->
mapModel(
Model::create(Blocks::CHISELED_QUARTZ(), Ids::CHISELED_QUARTZ_BLOCK)->properties([$commonProperties->pillarAxis]));
1286 $reg->
mapModel(
Model::create(Blocks::CHEST(), Ids::CHEST)->properties([$commonProperties->horizontalFacingCardinal]));
1292 $commonProperties->horizontalFacingSWNEInverted
1296 $reg->
mapModel(
Model::create(Blocks::DEEPSLATE(), Ids::DEEPSLATE)->properties([$commonProperties->pillarAxis]));
1303 $reg->
mapModel(
Model::create(Blocks::ENDER_CHEST(), Ids::ENDER_CHEST)->properties([$commonProperties->horizontalFacingCardinal]));
1306 $commonProperties->horizontalFacingCardinal
1309 new ValueFromIntProperty(StateNames::FACING_DIRECTION, ValueMappings::getInstance()->facingEndRod, fn(
EndRod $b) => $b->getFacing(), fn(
EndRod $b,
int $v) => $b->setFacing($v)),
1314 new IntProperty(StateNames::MOISTURIZED_AMOUNT, 0, 7, fn(
Farmland $b) => $b->getWetness(), fn(
Farmland $b,
int $v) => $b->setWetness($v))
1317 new IntProperty(StateNames::AGE, 0, 15, fn(
Fire $b) => $b->getAge(), fn(
Fire $b,
int $v) => $b->setAge($v))
1327 $reg->
mapModel(
Model::create(Blocks::GLOWING_ITEM_FRAME(), Ids::GLOW_FRAME)->properties($commonProperties->itemFrameProperties));
1332 $commonProperties->pillarAxis
1337 new ValueFromIntProperty(StateNames::FACING_DIRECTION, ValueMappings::getInstance()->facingExceptUp, fn(
Hopper $b) => $b->getFacing(), fn(
Hopper $b,
int $v) => $b->setFacing($v)),
1341 $reg->
mapModel(
Model::create(Blocks::IRON_DOOR(), Ids::IRON_DOOR)->properties($commonProperties->doorProperties));
1342 $reg->
mapModel(
Model::create(Blocks::IRON_TRAPDOOR(), Ids::IRON_TRAPDOOR)->properties($commonProperties->trapdoorProperties));
1343 $reg->
mapModel(
Model::create(Blocks::ITEM_FRAME(), Ids::FRAME)->properties($commonProperties->itemFrameProperties));
1346 $reg->
mapModel(
Model::create(Blocks::LADDER(), Ids::LADDER)->properties([$commonProperties->horizontalFacingClassic]));
1351 new BoolProperty(StateNames::POWERED_BIT, fn(
Lectern $b) => $b->isProducingSignal(), fn(
Lectern $b,
bool $v) => $b->setProducingSignal($v)),
1352 $commonProperties->horizontalFacingCardinal,
1355 new ValueFromStringProperty(StateNames::LEVER_DIRECTION, ValueMappings::getInstance()->leverFacing, fn(
Lever $b) => $b->getFacing(), fn(
Lever $b, LeverFacing $v) => $b->setFacing($v)),
1356 new BoolProperty(StateNames::OPEN_BIT, fn(
Lever $b) => $b->isActivated(), fn(
Lever $b,
bool $v) => $b->setActivated($v)),
1358 $reg->
mapModel(
Model::create(Blocks::LIGHTNING_ROD(), Ids::LIGHTNING_ROD)->properties([$commonProperties->anyFacingClassic]));
1359 $reg->
mapModel(
Model::create(Blocks::LIT_PUMPKIN(), Ids::LIT_PUMPKIN)->properties([$commonProperties->horizontalFacingCardinal]));
1360 $reg->
mapModel(
Model::create(Blocks::LOOM(), Ids::LOOM)->properties([$commonProperties->horizontalFacingSWNE]));
1363 $reg->
mapModel(
Model::create(Blocks::MUDDY_MANGROVE_ROOTS(), Ids::MUDDY_MANGROVE_ROOTS)->properties([$commonProperties->pillarAxis]));
1374 new IntProperty(StateNames::GROWTH, 0, 7, fn(
PinkPetals $b) => $b->getCount(), fn(
PinkPetals $b,
int $v) => $b->setCount(min($v, PinkPetals::MAX_COUNT)), offset: 1),
1375 $commonProperties->horizontalFacingCardinal
1384 $reg->
mapModel(
Model::create(Blocks::POLISHED_BASALT(), Ids::POLISHED_BASALT)->properties([$commonProperties->pillarAxis]));
1385 $reg->
mapModel(
Model::create(Blocks::POLISHED_BLACKSTONE_BUTTON(), Ids::POLISHED_BLACKSTONE_BUTTON)->properties($commonProperties->buttonProperties));
1386 $reg->
mapModel(
Model::create(Blocks::POLISHED_BLACKSTONE_PRESSURE_PLATE(), Ids::POLISHED_BLACKSTONE_PRESSURE_PLATE)->properties($commonProperties->simplePressurePlateProperties));
1389 $commonProperties->dummyCardinalDirection
1392 $commonProperties->dummyPillarAxis
1394 $reg->
mapModel(
Model::create(Blocks::PURPUR_PILLAR(), Ids::PURPUR_PILLAR)->properties([$commonProperties->pillarAxis]));
1398 $commonProperties->dummyPillarAxis
1400 $reg->
mapModel(
Model::create(Blocks::QUARTZ_PILLAR(), Ids::QUARTZ_PILLAR)->properties([$commonProperties->pillarAxis]));
1406 $reg->
mapModel(
Model::create(Blocks::REDSTONE_WIRE(), Ids::REDSTONE_WIRE)->properties([$commonProperties->analogRedstoneSignal]));
1413 new IntProperty(StateNames::CLUSTER_COUNT, 0, 3, fn(
SeaPickle $b) => $b->getCount(), fn(
SeaPickle $b,
int $v) => $b->setCount($v), offset: 1),
1414 new BoolProperty(StateNames::DEAD_BIT, fn(
SeaPickle $b) => $b->isUnderwater(), fn(
SeaPickle $b,
bool $v) => $b->setUnderwater($v), inverted:
true)
1418 $commonProperties->horizontalFacingCardinal
1421 $commonProperties->dummyPillarAxis
1427 $reg->
mapModel(
Model::create(Blocks::SOUL_CAMPFIRE(), Ids::SOUL_CAMPFIRE)->properties($commonProperties->campfireProperties));
1434 $reg->
mapModel(
Model::create(Blocks::STONE_BUTTON(), Ids::STONE_BUTTON)->properties($commonProperties->buttonProperties));
1435 $reg->
mapModel(
Model::create(Blocks::STONE_PRESSURE_PLATE(), Ids::STONE_PRESSURE_PLATE)->properties($commonProperties->simplePressurePlateProperties));
1437 $commonProperties->horizontalFacingCardinal
1445 $commonProperties->horizontalFacingCardinal
1456 $commonProperties->horizontalFacingSWNE
1464 $reg->
mapModel(
Model::create(Blocks::WALL_BANNER(), Ids::WALL_BANNER)->properties([$commonProperties->horizontalFacingClassic]));
1468 $reg->
mapModel(
Model::create(Blocks::WEIGHTED_PRESSURE_PLATE_HEAVY(), Ids::HEAVY_WEIGHTED_PRESSURE_PLATE)->properties([$commonProperties->analogRedstoneSignal]));
1469 $reg->
mapModel(
Model::create(Blocks::WEIGHTED_PRESSURE_PLATE_LIGHT(), Ids::LIGHT_WEIGHTED_PRESSURE_PLATE)->properties([$commonProperties->analogRedstoneSignal]));
1477 $id = $model->getId();
1479 $reg->serializer->map($model->
getBlock(),
function(
Block $block) use ($id, $properties) : Writer{
1480 $writer =
new Writer($id);
1481 foreach($properties as $property){
1482 $property->serialize($block, $writer);
1493 private static function deserializeAsymmetric(
Model $model, Reader $in) :
Block{
1496 $property->deserialize($block, $in);
1509 $bigDripleafHeadModel =
Model::create(Blocks::BIG_DRIPLEAF_HEAD(), Ids::BIG_DRIPLEAF)->properties([
1510 $commonProperties->horizontalFacingCardinal,
1514 $bigDripleafStemModel =
Model::create(Blocks::BIG_DRIPLEAF_STEM(), Ids::BIG_DRIPLEAF)->properties([
1515 $commonProperties->horizontalFacingCardinal,
1516 new DummyProperty(StateNames::BIG_DRIPLEAF_TILT, StringValues::BIG_DRIPLEAF_TILT_NONE),
1519 self::mapAsymmetricSerializer($reg, $bigDripleafHeadModel);
1520 self::mapAsymmetricSerializer($reg, $bigDripleafStemModel);
1521 $reg->deserializer->map(Ids::BIG_DRIPLEAF, fn(Reader $in) => $in->readBool(StateNames::BIG_DRIPLEAF_HEAD) ?
1522 self::deserializeAsymmetric($bigDripleafHeadModel, $in) :
1523 self::deserializeAsymmetric($bigDripleafStemModel, $in)
1529 self::mapAsymmetricSerializer($reg,
Model::create(Blocks::POTION_CAULDRON(), Ids::CAULDRON)->properties([$fillLevelProperty,
new DummyProperty(StateNames::CAULDRON_LIQUID, StringValues::CAULDRON_LIQUID_WATER)]));
1531 $lavaCauldronModel =
Model::create(Blocks::LAVA_CAULDRON(), Ids::CAULDRON)->properties([
1533 new DummyProperty(StateNames::CAULDRON_LIQUID, StringValues::CAULDRON_LIQUID_LAVA)
1535 $waterCauldronModel =
Model::create(Blocks::WATER_CAULDRON(), Ids::CAULDRON)->properties([
1537 new DummyProperty(StateNames::CAULDRON_LIQUID, StringValues::CAULDRON_LIQUID_WATER)
1539 $emptyCauldronModel =
Model::create(Blocks::CAULDRON(), Ids::CAULDRON)->properties([
1541 new DummyProperty(StateNames::CAULDRON_LIQUID, StringValues::CAULDRON_LIQUID_WATER)
1543 self::mapAsymmetricSerializer($reg, $lavaCauldronModel);
1544 self::mapAsymmetricSerializer($reg, $waterCauldronModel);
1545 self::mapAsymmetricSerializer($reg, $emptyCauldronModel);
1546 $reg->deserializer->map(Ids::CAULDRON, fn(Reader $in) => $in->readInt(StateNames::FILL_LEVEL) === 0 ?
1547 self::deserializeAsymmetric($emptyCauldronModel, $in) :
1548 match ($liquid = $in->readString(StateNames::CAULDRON_LIQUID)) {
1549 StringValues::CAULDRON_LIQUID_WATER => self::deserializeAsymmetric($waterCauldronModel, $in),
1550 StringValues::CAULDRON_LIQUID_LAVA => self::deserializeAsymmetric($lavaCauldronModel, $in),
1551 StringValues::CAULDRON_LIQUID_POWDER_SNOW => throw new UnsupportedBlockStateException(
"Powder snow is not supported yet"),
1552 default => throw $in->badValueException(StateNames::CAULDRON_LIQUID, $liquid)
1557 $allSidedMushroomStemModel =
Model::create(Blocks::ALL_SIDED_MUSHROOM_STEM(), Ids::MUSHROOM_STEM)->properties([
new DummyProperty(StateNames::HUGE_MUSHROOM_BITS, BlockLegacyMetadata::MUSHROOM_BLOCK_ALL_STEM)]);
1558 $mushroomStemModel =
Model::create(Blocks::MUSHROOM_STEM(), Ids::MUSHROOM_STEM)->properties([
new DummyProperty(StateNames::HUGE_MUSHROOM_BITS, BlockLegacyMetadata::MUSHROOM_BLOCK_STEM)]);
1559 self::mapAsymmetricSerializer($reg, $allSidedMushroomStemModel);
1560 self::mapAsymmetricSerializer($reg, $mushroomStemModel);
1561 $reg->deserializer->map(Ids::MUSHROOM_STEM, fn(Reader $in) :
Block => match ($in->readInt(StateNames::HUGE_MUSHROOM_BITS)) {
1562 BlockLegacyMetadata::MUSHROOM_BLOCK_ALL_STEM => self::deserializeAsymmetric($allSidedMushroomStemModel, $in),
1563 BlockLegacyMetadata::MUSHROOM_BLOCK_STEM => self::deserializeAsymmetric($mushroomStemModel, $in),
1564 default => throw new BlockStateDeserializeException(
"This state does not exist"),
1569 $pitcherCropModel =
Model::create(Blocks::PITCHER_CROP(), Ids::PITCHER_CROP)->properties([
1573 $doublePitcherCropAgeOffset = PitcherCrop::MAX_AGE + 1;
1574 $doublePitcherCropModel =
Model::create(Blocks::DOUBLE_PITCHER_CROP(), Ids::PITCHER_CROP)->properties([
1577 $doublePitcherCropAgeOffset,
1580 fn(
DoublePitcherCrop $b,
int $v) => $b->setAge(min($v, DoublePitcherCrop::MAX_AGE)),
1581 offset: -$doublePitcherCropAgeOffset
1585 self::mapAsymmetricSerializer($reg, $pitcherCropModel);
1586 self::mapAsymmetricSerializer($reg, $doublePitcherCropModel);
1587 $reg->deserializer->map(Ids::PITCHER_CROP, fn(Reader $in) => $in->readInt(StateNames::GROWTH) <= PitcherCrop::MAX_AGE ?
1588 ($in->readBool(StateNames::UPPER_BLOCK_BIT) ?
1591 self::deserializeAsymmetric($pitcherCropModel, $in)
1592 ) : self::deserializeAsymmetric($doublePitcherCropModel, $in)
1597 self::mapAsymmetricSerializer($reg,
Model::create(Blocks::OMINOUS_BANNER(), Ids::STANDING_BANNER)->properties([$commonProperties->floorSignLikeRotation]));
1598 self::mapAsymmetricSerializer($reg,
Model::create(Blocks::OMINOUS_WALL_BANNER(), Ids::WALL_BANNER)->properties([$commonProperties->horizontalFacingClassic]));
1601 Ids::ACACIA_HANGING_SIGN => [Blocks::ACACIA_CEILING_CENTER_HANGING_SIGN(), Blocks::ACACIA_CEILING_EDGES_HANGING_SIGN(), Blocks::ACACIA_WALL_HANGING_SIGN()],
1602 Ids::BIRCH_HANGING_SIGN => [Blocks::BIRCH_CEILING_CENTER_HANGING_SIGN(), Blocks::BIRCH_CEILING_EDGES_HANGING_SIGN(), Blocks::BIRCH_WALL_HANGING_SIGN()],
1603 Ids::CHERRY_HANGING_SIGN => [Blocks::CHERRY_CEILING_CENTER_HANGING_SIGN(), Blocks::CHERRY_CEILING_EDGES_HANGING_SIGN(), Blocks::CHERRY_WALL_HANGING_SIGN()],
1604 Ids::CRIMSON_HANGING_SIGN => [Blocks::CRIMSON_CEILING_CENTER_HANGING_SIGN(), Blocks::CRIMSON_CEILING_EDGES_HANGING_SIGN(), Blocks::CRIMSON_WALL_HANGING_SIGN()],
1605 Ids::DARK_OAK_HANGING_SIGN => [Blocks::DARK_OAK_CEILING_CENTER_HANGING_SIGN(), Blocks::DARK_OAK_CEILING_EDGES_HANGING_SIGN(), Blocks::DARK_OAK_WALL_HANGING_SIGN()],
1606 Ids::JUNGLE_HANGING_SIGN => [Blocks::JUNGLE_CEILING_CENTER_HANGING_SIGN(), Blocks::JUNGLE_CEILING_EDGES_HANGING_SIGN(), Blocks::JUNGLE_WALL_HANGING_SIGN()],
1607 Ids::MANGROVE_HANGING_SIGN => [Blocks::MANGROVE_CEILING_CENTER_HANGING_SIGN(), Blocks::MANGROVE_CEILING_EDGES_HANGING_SIGN(), Blocks::MANGROVE_WALL_HANGING_SIGN()],
1608 Ids::OAK_HANGING_SIGN => [Blocks::OAK_CEILING_CENTER_HANGING_SIGN(), Blocks::OAK_CEILING_EDGES_HANGING_SIGN(), Blocks::OAK_WALL_HANGING_SIGN()],
1609 Ids::PALE_OAK_HANGING_SIGN => [Blocks::PALE_OAK_CEILING_CENTER_HANGING_SIGN(), Blocks::PALE_OAK_CEILING_EDGES_HANGING_SIGN(), Blocks::PALE_OAK_WALL_HANGING_SIGN()],
1610 Ids::SPRUCE_HANGING_SIGN => [Blocks::SPRUCE_CEILING_CENTER_HANGING_SIGN(), Blocks::SPRUCE_CEILING_EDGES_HANGING_SIGN(), Blocks::SPRUCE_WALL_HANGING_SIGN()],
1611 Ids::WARPED_HANGING_SIGN => [Blocks::WARPED_CEILING_CENTER_HANGING_SIGN(), Blocks::WARPED_CEILING_EDGES_HANGING_SIGN(), Blocks::WARPED_WALL_HANGING_SIGN()],
1612 ] as $id => [$center, $edges, $wall]){
1618 $commonProperties->floorSignLikeRotation,
1627 $commonProperties->horizontalFacingClassic,
1633 $commonProperties->horizontalFacingClassic
1635 self::mapAsymmetricSerializer($reg, $centerModel);
1636 self::mapAsymmetricSerializer($reg, $edgesModel);
1637 self::mapAsymmetricSerializer($reg, $wallModel);
1638 $reg->deserializer->map($id, fn(Reader $in) => $in->readBool(StateNames::HANGING) ?
1639 ($in->readBool(StateNames::ATTACHED_BIT) ?
1640 self::deserializeAsymmetric($centerModel, $in) :
1641 self::deserializeAsymmetric($edgesModel, $in)
1643 self::deserializeAsymmetric($wallModel, $in));