@@ -373,13 +373,14 @@ public class FlatteningMap {
373373 colorVariants ("carpet" , "carpet" );
374374
375375 // === Double plant (ID 175) ===
376- // Bottom half has type in meta 0-5; top half is always meta 8 (shared by all types).
377- meta ("sunflower" , "double_plant" , 0 );
378- meta ("lilac" , "double_plant" , 1 );
379- meta ("tall_grass" , "double_plant" , 2 );
380- meta ("large_fern" , "double_plant" , 3 );
381- meta ("rose_bush" , "double_plant" , 4 );
382- meta ("peony" , "double_plant" , 5 );
376+ // Bottom half carries the variant in meta 0-5; the top half's real meta is 8-11.
377+ // We use a synthetic key to tie the variant the bottom is with the top half.
378+ doublePlant ("sunflower" , 0 );
379+ doublePlant ("lilac" , 1 );
380+ doublePlant ("tall_grass" , 2 );
381+ doublePlant ("large_fern" , 3 );
382+ doublePlant ("rose_bush" , 4 );
383+ doublePlant ("peony" , 5 );
383384
384385 // === Water / Lava (IDs 8-11) ===
385386 // In 1.13+, water/lava are single blocks. In 1.7.10, flowing variants are separate.
@@ -861,21 +862,6 @@ public class FlatteningMap {
861862 state (WOOD_TYPES [i ] + "_sapling" , "stage" , "0" , entryMetas ("sapling" , i ));
862863 state (WOOD_TYPES [i ] + "_sapling" , "stage" , "1" , entryMetas ("sapling" , i + 8 ));
863864 }
864-
865- // === Double plant half (ID 175) ===
866- // 1.7.10: bottom half has type in meta 0-5; top half is always meta 8
867- state ("sunflower" , "half" , "lower" , entryMetas ("double_plant" , 0 ));
868- state ("sunflower" , "half" , "upper" , entryMetas ("double_plant" , 8 ));
869- state ("lilac" , "half" , "lower" , entryMetas ("double_plant" , 1 ));
870- state ("lilac" , "half" , "upper" , entryMetas ("double_plant" , 8 ));
871- state ("tall_grass" , "half" , "lower" , entryMetas ("double_plant" , 2 ));
872- state ("tall_grass" , "half" , "upper" , entryMetas ("double_plant" , 8 ));
873- state ("large_fern" , "half" , "lower" , entryMetas ("double_plant" , 3 ));
874- state ("large_fern" , "half" , "upper" , entryMetas ("double_plant" , 8 ));
875- state ("rose_bush" , "half" , "lower" , entryMetas ("double_plant" , 4 ));
876- state ("rose_bush" , "half" , "upper" , entryMetas ("double_plant" , 8 ));
877- state ("peony" , "half" , "lower" , entryMetas ("double_plant" , 5 ));
878- state ("peony" , "half" , "upper" , entryMetas ("double_plant" , 8 ));
879865 }
880866
881867 /**
@@ -1053,6 +1039,17 @@ private static void colorVariants(String modernSuffix, String legacyName) {
10531039 }
10541040 }
10551041
1042+ /**
1043+ * Double plant: the bottom half stores the variant in meta 0-5; the top half stores facing
1044+ * direction, so Angelica's chunk mesher rebuilds a synthetic key 0x8|variant for top halves.
1045+ */
1046+ private static void doublePlant (String modern , int variant ) {
1047+ final int upper = 0x8 | variant ;
1048+ metas (modern , "double_plant" , variant , upper );
1049+ state (modern , "half" , "lower" , entryMetas ("double_plant" , variant ));
1050+ state (modern , "half" , "upper" , entryMetas ("double_plant" , upper ));
1051+ }
1052+
10561053 // ==========================================
10571054 // Blockstate property mapping helpers
10581055 // ==========================================
0 commit comments