11package net .pixaurora .janerator .worldgen .feature ;
22
3- import java .util .ArrayList ;
43import java .util .List ;
54
65import com .mojang .serialization .Codec ;
76
87import net .minecraft .data .worldgen .features .AquaticFeatures ;
98import net .minecraft .data .worldgen .features .CaveFeatures ;
9+ import net .minecraft .data .worldgen .features .EndFeatures ;
1010import net .minecraft .data .worldgen .features .MiscOverworldFeatures ;
1111import net .minecraft .data .worldgen .features .NetherFeatures ;
12+ import net .minecraft .data .worldgen .features .OreFeatures ;
1213import net .minecraft .data .worldgen .features .PileFeatures ;
1314import net .minecraft .data .worldgen .features .TreeFeatures ;
1415import net .minecraft .data .worldgen .features .VegetationFeatures ;
@@ -29,8 +30,8 @@ public enum HandpickedFeatureCategory {
2930 *
3031 * This also includes giant mushrooms, and the nether equivalent of trees.
3132 */
32- ALL_TREES (List .of (CaveFeatures .ROOTED_AZALEA_TREE , TreeFeatures . ACACIA , TreeFeatures .AZALEA_TREE , TreeFeatures .BIRCH ,
33- TreeFeatures .BIRCH_BEES_0002 , TreeFeatures .BIRCH_BEES_002 , TreeFeatures .BIRCH_BEES_005 , TreeFeatures .CHERRY ,
33+ ALL_TREES (List .of (CaveFeatures .ROOTED_AZALEA_TREE , EndFeatures . CHORUS_PLANT , TreeFeatures .ACACIA , TreeFeatures .AZALEA_TREE ,
34+ TreeFeatures .BIRCH , TreeFeatures . BIRCH_BEES_0002 , TreeFeatures .BIRCH_BEES_002 , TreeFeatures .BIRCH_BEES_005 , TreeFeatures .CHERRY ,
3435 TreeFeatures .CHERRY_BEES_005 , TreeFeatures .CRIMSON_FUNGUS , TreeFeatures .CRIMSON_FUNGUS_PLANTED , TreeFeatures .DARK_OAK ,
3536 TreeFeatures .FANCY_OAK , TreeFeatures .FANCY_OAK_BEES , TreeFeatures .FANCY_OAK_BEES_0002 , TreeFeatures .FANCY_OAK_BEES_002 ,
3637 TreeFeatures .FANCY_OAK_BEES_005 , TreeFeatures .HUGE_BROWN_MUSHROOM , TreeFeatures .HUGE_RED_MUSHROOM , TreeFeatures .JUNGLE_BUSH ,
@@ -50,41 +51,88 @@ public enum HandpickedFeatureCategory {
5051 * Small surface plants that don't take up a lot of space, don't replace the
5152 * space they're anchored to, and rest close to the ground or the wall.
5253 *
53- * Notable examples include pumpkin patches, flowers, and vines.
54+ * Notable examples include pumpkin patches, flowers, vines, and plants that
55+ * grow underwater.
5456 */
55- SCATTERED_PLANTS (List .of (CaveFeatures .CAVE_VINE , CaveFeatures .CAVE_VINE_IN_MOSS , CaveFeatures .DRIPLEAF , CaveFeatures .GLOW_LICHEN ,
56- CaveFeatures .MOSS_VEGETATION , CaveFeatures .SPORE_BLOSSOM , PileFeatures .PILE_MELON , PileFeatures .PILE_PUMPKIN ,
57- VegetationFeatures .BAMBOO_NO_PODZOL , VegetationFeatures .FLOWER_CHERRY , VegetationFeatures .FLOWER_DEFAULT ,
58- VegetationFeatures .FLOWER_FLOWER_FOREST , VegetationFeatures .FLOWER_MEADOW , VegetationFeatures .FLOWER_PLAIN ,
59- VegetationFeatures .FLOWER_SWAMP , VegetationFeatures .FOREST_FLOWERS , VegetationFeatures .PATCH_BERRY_BUSH ,
60- VegetationFeatures .PATCH_BROWN_MUSHROOM , VegetationFeatures .PATCH_CACTUS , VegetationFeatures .PATCH_DEAD_BUSH ,
61- VegetationFeatures .PATCH_GRASS , VegetationFeatures .PATCH_GRASS_JUNGLE , VegetationFeatures .PATCH_LARGE_FERN ,
62- VegetationFeatures .PATCH_MELON , VegetationFeatures .PATCH_PUMPKIN , VegetationFeatures .PATCH_RED_MUSHROOM ,
63- VegetationFeatures .PATCH_SUGAR_CANE , VegetationFeatures .PATCH_SUNFLOWER , VegetationFeatures .PATCH_TAIGA_GRASS ,
64- VegetationFeatures .PATCH_TALL_GRASS , VegetationFeatures .PATCH_WATERLILY , VegetationFeatures .SINGLE_PIECE_OF_GRASS ,
65- VegetationFeatures .VINES )),
57+ SCATTERED_PLANTS (List .of (AquaticFeatures .KELP , AquaticFeatures .SEA_PICKLE , AquaticFeatures .SEAGRASS_MID , AquaticFeatures .SEAGRASS_SHORT ,
58+ AquaticFeatures .SEAGRASS_SIMPLE , AquaticFeatures .SEAGRASS_SLIGHTLY_LESS_SHORT , AquaticFeatures .SEAGRASS_TALL ,
59+ AquaticFeatures .WARM_OCEAN_VEGETATION , CaveFeatures .CAVE_VINE , CaveFeatures .CAVE_VINE_IN_MOSS , CaveFeatures .DRIPLEAF ,
60+ CaveFeatures .GLOW_LICHEN , CaveFeatures .MOSS_VEGETATION , CaveFeatures .SPORE_BLOSSOM , NetherFeatures .CRIMSON_FOREST_VEGETATION ,
61+ NetherFeatures .CRIMSON_FOREST_VEGETATION_BONEMEAL , NetherFeatures .NETHER_SPROUTS , NetherFeatures .NETHER_SPROUTS_BONEMEAL ,
62+ NetherFeatures .PATCH_CRIMSON_ROOTS , NetherFeatures .TWISTING_VINES , NetherFeatures .TWISTING_VINES_BONEMEAL ,
63+ NetherFeatures .WARPED_FOREST_VEGETATION_BONEMEAL , NetherFeatures .WARPED_FOREST_VEGETION , NetherFeatures .WEEPING_VINES ,
64+ PileFeatures .PILE_MELON , PileFeatures .PILE_PUMPKIN , VegetationFeatures .BAMBOO_NO_PODZOL , VegetationFeatures .FLOWER_CHERRY ,
65+ VegetationFeatures .FLOWER_DEFAULT , VegetationFeatures .FLOWER_FLOWER_FOREST , VegetationFeatures .FLOWER_MEADOW ,
66+ VegetationFeatures .FLOWER_PLAIN , VegetationFeatures .FLOWER_SWAMP , VegetationFeatures .FOREST_FLOWERS ,
67+ VegetationFeatures .PATCH_BERRY_BUSH , VegetationFeatures .PATCH_BROWN_MUSHROOM , VegetationFeatures .PATCH_CACTUS ,
68+ VegetationFeatures .PATCH_DEAD_BUSH , VegetationFeatures .PATCH_GRASS , VegetationFeatures .PATCH_GRASS_JUNGLE ,
69+ VegetationFeatures .PATCH_LARGE_FERN , VegetationFeatures .PATCH_MELON , VegetationFeatures .PATCH_PUMPKIN ,
70+ VegetationFeatures .PATCH_RED_MUSHROOM , VegetationFeatures .PATCH_SUGAR_CANE , VegetationFeatures .PATCH_SUNFLOWER ,
71+ VegetationFeatures .PATCH_TAIGA_GRASS , VegetationFeatures .PATCH_TALL_GRASS , VegetationFeatures .PATCH_WATERLILY ,
72+ VegetationFeatures .SINGLE_PIECE_OF_GRASS , VegetationFeatures .VINES )),
6673
6774 /**
68- * Features that replace the ground below them , turning it into sand, clay,
69- * podzol, and more.
75+ * Features that replace the existing ground , turning it into sand, clay,
76+ * podzol, ores, and more.
7077 *
7178 * It may also replace the ceiling, but with the general rule that this feature
72- * replaces blocks more than it adds them.
79+ * replaces blocks more than it adds new ones.
80+ *
81+ * Because these features may replace blocks in your flat presets, it makes
82+ * sense to filter them.
7383 */
74- REPLACES_FLOOR (List .of (CaveFeatures .DRIPSTONE_CLUSTER , CaveFeatures .CLAY_POOL_WITH_DRIPLEAVES , CaveFeatures .CLAY_WITH_DRIPLEAVES ,
84+ REPLACES_FLOOR (List .of (CaveFeatures .CLAY_POOL_WITH_DRIPLEAVES , CaveFeatures .CLAY_WITH_DRIPLEAVES , CaveFeatures .DRIPSTONE_CLUSTER ,
7585 CaveFeatures .LUSH_CAVES_CLAY , CaveFeatures .MOSS_PATCH , CaveFeatures .MOSS_PATCH_BONEMEAL , CaveFeatures .MOSS_PATCH_CEILING ,
76- CaveFeatures .SCULK_PATCH_ANCIENT_CITY , CaveFeatures .SCULK_PATCH_DEEP_DARK , CaveFeatures .SCULK_VEIN , MiscOverworldFeatures .DISK_CLAY ,
77- MiscOverworldFeatures .DISK_GRASS , MiscOverworldFeatures .DISK_GRAVEL , MiscOverworldFeatures .DISK_SAND ,
78- MiscOverworldFeatures .FOREST_ROCK , VegetationFeatures .BAMBOO_SOME_PODZOL )),
86+ CaveFeatures .POINTED_DRIPSTONE , CaveFeatures .SCULK_PATCH_ANCIENT_CITY , CaveFeatures .SCULK_PATCH_DEEP_DARK , CaveFeatures .SCULK_VEIN ,
87+ CaveFeatures .UNDERWATER_MAGMA , MiscOverworldFeatures .DISK_CLAY , MiscOverworldFeatures .DISK_GRASS , MiscOverworldFeatures .DISK_GRAVEL ,
88+ MiscOverworldFeatures .DISK_SAND , MiscOverworldFeatures .FOREST_ROCK , MiscOverworldFeatures .ICE_PATCH ,
89+ MiscOverworldFeatures .SPRING_LAVA_FROZEN , MiscOverworldFeatures .SPRING_LAVA_OVERWORLD , MiscOverworldFeatures .SPRING_WATER ,
90+ NetherFeatures .SPRING_LAVA_NETHER , NetherFeatures .SPRING_NETHER_CLOSED , NetherFeatures .SPRING_NETHER_OPEN ,
91+ OreFeatures .ORE_ANCIENT_DEBRIS_LARGE , OreFeatures .ORE_ANCIENT_DEBRIS_SMALL , OreFeatures .ORE_ANDESITE , OreFeatures .ORE_BLACKSTONE ,
92+ OreFeatures .ORE_CLAY , OreFeatures .ORE_COAL , OreFeatures .ORE_COAL_BURIED , OreFeatures .ORE_COPPER_LARGE ,
93+ OreFeatures .ORE_COPPPER_SMALL , OreFeatures .ORE_DIAMOND_BURIED , OreFeatures .ORE_DIAMOND_LARGE , OreFeatures .ORE_DIAMOND_MEDIUM ,
94+ OreFeatures .ORE_DIAMOND_SMALL , OreFeatures .ORE_DIORITE , OreFeatures .ORE_DIRT , OreFeatures .ORE_EMERALD , OreFeatures .ORE_GOLD ,
95+ OreFeatures .ORE_GOLD_BURIED , OreFeatures .ORE_GRANITE , OreFeatures .ORE_GRAVEL , OreFeatures .ORE_GRAVEL_NETHER ,
96+ OreFeatures .ORE_INFESTED , OreFeatures .ORE_IRON , OreFeatures .ORE_IRON_SMALL , OreFeatures .ORE_LAPIS , OreFeatures .ORE_LAPIS_BURIED ,
97+ OreFeatures .ORE_MAGMA , OreFeatures .ORE_NETHER_GOLD , OreFeatures .ORE_QUARTZ , OreFeatures .ORE_REDSTONE , OreFeatures .ORE_SOUL_SAND ,
98+ OreFeatures .ORE_TUFF , VegetationFeatures .BAMBOO_SOME_PODZOL )),
99+
100+ /**
101+ * Rare features that only show up very occasionally.
102+ *
103+ * There's not a ton of reason to filter this category, as these tend to be more
104+ * akin to structures, and are very neat when they pop up.
105+ */
106+ RARITIES (List .of (CaveFeatures .FOSSIL_COAL , CaveFeatures .FOSSIL_DIAMONDS , CaveFeatures .MONSTER_ROOM , EndFeatures .END_GATEWAY_RETURN ,
107+ EndFeatures .END_GATEWAY_DELAYED , MiscOverworldFeatures .BONUS_CHEST , MiscOverworldFeatures .DESERT_WELL ,
108+ MiscOverworldFeatures .VOID_START_PLATFORM )),
109+
110+ /**
111+ * Larger features present only at the surface of the water, such as icebergs
112+ * and shipwrecks.
113+ */
114+ WATER_SURFACE (List .of (MiscOverworldFeatures .BLUE_ICE , MiscOverworldFeatures .ICEBERG_BLUE , MiscOverworldFeatures .ICEBERG_PACKED )),
115+
116+ /**
117+ * This category is just for features that cover the ground, such as snow & ice,
118+ * and fire in the nether.
119+ *
120+ * Usually there's no reason to filter it unless you're making a preset with the
121+ * snow biome, but don't want snow/ice there. Although note that unless you use
122+ * a data pack to override it, snowfall will still cover the ground after it's
123+ * generated.
124+ */
125+ COVERS_GROUND (List .of (MiscOverworldFeatures .FREEZE_TOP_LAYER , NetherFeatures .PATCH_FIRE , NetherFeatures .PATCH_SOUL_FIRE ,
126+ PileFeatures .PILE_HAY , PileFeatures .PILE_ICE , PileFeatures .PILE_SNOW )),
79127
80128 /**
81- * Some subsurface water plants and decoration, similar to the scattered plants.
82- * The similarity lies in that they all rest close to or are at the bottom of
83- * the water.
129+ * Large natural structures that feel more like they're part of the terrain
130+ * rather than a jigsaw piece being placed in the world.
84131 */
85- UNDERWATER_DECORATION (List .of (CaveFeatures .UNDERWATER_MAGMA , AquaticFeatures .KELP , AquaticFeatures .SEA_PICKLE , AquaticFeatures .SEAGRASS_MID ,
86- AquaticFeatures .SEAGRASS_SHORT , AquaticFeatures .SEAGRASS_SIMPLE , AquaticFeatures .SEAGRASS_SLIGHTLY_LESS_SHORT ,
87- AquaticFeatures .SEAGRASS_TALL , AquaticFeatures .WARM_OCEAN_VEGETATION ));
132+ LARGE_NATURAL_STRUCTURE (List .of (CaveFeatures .AMETHYST_GEODE , CaveFeatures .LARGE_DRIPSTONE , EndFeatures .END_SPIKE , EndFeatures .END_ISLAND ,
133+ MiscOverworldFeatures .ICE_SPIKE , MiscOverworldFeatures .LAKE_LAVA , NetherFeatures .BASALT_BLOBS , NetherFeatures .BASALT_PILLAR ,
134+ NetherFeatures .BLACKSTONE_BLOBS , NetherFeatures .DELTA , NetherFeatures .GLOWSTONE_EXTRA , NetherFeatures .LARGE_BASALT_COLUMNS ,
135+ NetherFeatures .SMALL_BASALT_COLUMNS ));
88136
89137 public static final Codec <HandpickedFeatureCategory > CODEC = new EnumCodec <HandpickedFeatureCategory >("Hardcoded Feature Categories" ,
90138 values ());
0 commit comments