From ce09fc287aa9f0b9d1b2f63797bf7fe1b99ec485 Mon Sep 17 00:00:00 2001 From: nelle Date: Sat, 21 Dec 2024 16:32:40 -0700 Subject: [PATCH] proper worldgen! --- .../configured_feature/cyan_rose_flower.json | 22 +-- .../configured_feature/rose_flower.json | 20 ++- .../placed_feature/cyan_rose_bush_placed.json | 2 +- .../cyan_rose_common_placed.json} | 4 +- .../placed_feature/cyan_rose_placed.json | 19 +++ .../placed_feature/cyan_rose_rare_placed.json | 19 +++ .../placed_feature/rose_common_placed.json} | 4 +- .../worldgen/placed_feature/rose_placed.json} | 6 +- .../placed_feature/rose_rare_placed.json | 19 +++ .../roses/world/RosesConfiguredFeatures.java | 23 ++++ .../roses/world/RosesPlacedFeatures.java | 64 ++++++++- .../world/gen/RosesVegetationGeneration.java | 128 ++++++++++++++++++ .../roses/world/gen/RosesWorldGeneration.java | 2 +- .../configured_feature/cyan_rose_bush.json | 33 ----- 14 files changed, 304 insertions(+), 61 deletions(-) rename MC1.20.6/src/main/{resources/ignore => generated/data/roses_mod}/worldgen/configured_feature/cyan_rose_flower.json (65%) rename MC1.20.6/src/main/{resources/ignore => generated/data/roses_mod}/worldgen/configured_feature/rose_flower.json (70%) rename MC1.20.6/src/main/{resources/ignore/worldgen/placed_feature/cyan_rose_flower.json => generated/data/roses_mod/worldgen/placed_feature/cyan_rose_common_placed.json} (93%) create mode 100644 MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_placed.json create mode 100644 MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_rare_placed.json rename MC1.20.6/src/main/{resources/ignore/worldgen/placed_feature/rose_flower.json => generated/data/roses_mod/worldgen/placed_feature/rose_common_placed.json} (93%) rename MC1.20.6/src/main/{resources/ignore/worldgen/placed_feature/cyan_rose_bush.json => generated/data/roses_mod/worldgen/placed_feature/rose_placed.json} (80%) create mode 100644 MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_rare_placed.json create mode 100644 MC1.20.6/src/main/java/observer/nelle/roses/world/gen/RosesVegetationGeneration.java delete mode 100644 MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/cyan_rose_bush.json diff --git a/MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/cyan_rose_flower.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/cyan_rose_flower.json similarity index 65% rename from MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/cyan_rose_flower.json rename to MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/cyan_rose_flower.json index 4a7ecb1..651f024 100644 --- a/MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/cyan_rose_flower.json +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/cyan_rose_flower.json @@ -1,9 +1,6 @@ { "type": "minecraft:flower", "config": { - "tries": 2, - "xz_spread": 2, - "y_spread": 1, "feature": { "feature": { "type": "minecraft:simple_block", @@ -12,10 +9,16 @@ "type": "minecraft:weighted_state_provider", "entries": [ { - "weight": 2, "data": { - "Name": "roses_mod:cyan_rose_flower" - } + "Name": "roses_mod:cyan_rose" + }, + "weight": 2 + }, + { + "data": { + "Name": "roses_mod:cyan_rose" + }, + "weight": 1 } ] } @@ -30,6 +33,9 @@ } } ] - } + }, + "tries": 64, + "xz_spread": 7, + "y_spread": 3 } -} +} \ No newline at end of file diff --git a/MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/rose_flower.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/rose_flower.json similarity index 70% rename from MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/rose_flower.json rename to MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/rose_flower.json index eee2d69..1ae6fb1 100644 --- a/MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/rose_flower.json +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/rose_flower.json @@ -1,9 +1,6 @@ { "type": "minecraft:flower", "config": { - "tries": 6, - "xz_spread": 5, - "y_spread": 5, "feature": { "feature": { "type": "minecraft:simple_block", @@ -12,10 +9,16 @@ "type": "minecraft:weighted_state_provider", "entries": [ { - "weight": 5, "data": { "Name": "roses_mod:rose_flower" - } + }, + "weight": 2 + }, + { + "data": { + "Name": "roses_mod:rose_flower" + }, + "weight": 1 } ] } @@ -30,6 +33,9 @@ } } ] - } + }, + "tries": 64, + "xz_spread": 7, + "y_spread": 3 } -} +} \ No newline at end of file diff --git a/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_bush_placed.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_bush_placed.json index 06a17f0..9b99c8b 100644 --- a/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_bush_placed.json +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_bush_placed.json @@ -3,7 +3,7 @@ "placement": [ { "type": "minecraft:rarity_filter", - "chance": 7 + "chance": 85 }, { "type": "minecraft:in_square" diff --git a/MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/cyan_rose_flower.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_common_placed.json similarity index 93% rename from MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/cyan_rose_flower.json rename to MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_common_placed.json index 5aa23d1..bd9cc93 100644 --- a/MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/cyan_rose_flower.json +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_common_placed.json @@ -3,7 +3,7 @@ "placement": [ { "type": "minecraft:rarity_filter", - "chance": 1 + "chance": 45 }, { "type": "minecraft:in_square" @@ -16,4 +16,4 @@ "type": "minecraft:biome" } ] -} +} \ No newline at end of file diff --git a/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_placed.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_placed.json new file mode 100644 index 0000000..c66607b --- /dev/null +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_placed.json @@ -0,0 +1,19 @@ +{ + "feature": "roses_mod:cyan_rose_flower", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 70 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_rare_placed.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_rare_placed.json new file mode 100644 index 0000000..0c919f2 --- /dev/null +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_rare_placed.json @@ -0,0 +1,19 @@ +{ + "feature": "roses_mod:cyan_rose_flower", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 90 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/rose_flower.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_common_placed.json similarity index 93% rename from MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/rose_flower.json rename to MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_common_placed.json index 8d06035..95d3106 100644 --- a/MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/rose_flower.json +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_common_placed.json @@ -3,7 +3,7 @@ "placement": [ { "type": "minecraft:rarity_filter", - "chance": 1 + "chance": 4 }, { "type": "minecraft:in_square" @@ -16,4 +16,4 @@ "type": "minecraft:biome" } ] -} +} \ No newline at end of file diff --git a/MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/cyan_rose_bush.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_placed.json similarity index 80% rename from MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/cyan_rose_bush.json rename to MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_placed.json index 4449e17..1b71a0f 100644 --- a/MC1.20.6/src/main/resources/ignore/worldgen/placed_feature/cyan_rose_bush.json +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_placed.json @@ -1,9 +1,9 @@ { - "feature": "roses_mod:cyan_rose_bush", + "feature": "roses_mod:rose_flower", "placement": [ { "type": "minecraft:rarity_filter", - "chance": 1 + "chance": 32 }, { "type": "minecraft:in_square" @@ -16,4 +16,4 @@ "type": "minecraft:biome" } ] -} +} \ No newline at end of file diff --git a/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_rare_placed.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_rare_placed.json new file mode 100644 index 0000000..79fbde8 --- /dev/null +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/rose_rare_placed.json @@ -0,0 +1,19 @@ +{ + "feature": "roses_mod:rose_flower", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 80 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/MC1.20.6/src/main/java/observer/nelle/roses/world/RosesConfiguredFeatures.java b/MC1.20.6/src/main/java/observer/nelle/roses/world/RosesConfiguredFeatures.java index 17cf6f8..e944fa2 100644 --- a/MC1.20.6/src/main/java/observer/nelle/roses/world/RosesConfiguredFeatures.java +++ b/MC1.20.6/src/main/java/observer/nelle/roses/world/RosesConfiguredFeatures.java @@ -2,12 +2,15 @@ package observer.nelle.roses.world; // Configured Feature (flowers, how does this look like) -> Placed Feature (How is this feature placed) -> WorldGen/BiomeMod (Where is our feature placed) +import net.minecraft.block.BlockState; import net.minecraft.registry.Registerable; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; import net.minecraft.util.Identifier; +import net.minecraft.util.collection.DataPool; import net.minecraft.world.gen.feature.*; import net.minecraft.world.gen.stateprovider.BlockStateProvider; +import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; import observer.nelle.roses.RosesBlocks; import observer.nelle.roses.RosesModKt; @@ -15,12 +18,28 @@ import java.util.Objects; public class RosesConfiguredFeatures { public static final RegistryKey> cyanRoseBushKey = registerKey("cyan_rose_bush"); + public static final RegistryKey> cyanRoseKey = registerKey("cyan_rose_flower"); + public static final RegistryKey> roseKey = registerKey("rose_flower"); public static void bootstrap(Registerable> context) { // pretty much exactly as FOREST_FLOWERS register(context, cyanRoseBushKey, Feature.RANDOM_PATCH, ConfiguredFeatures.createRandomPatchFeatureConfig(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(BlockStateProvider.of(Objects.requireNonNull(RosesBlocks.INSTANCE.getCyanRoseBush()))))); + + register(context, cyanRoseKey, Feature.FLOWER, + createRandomFlowerPatchFeatureConfig( + new WeightedBlockStateProvider(DataPool.builder() + .add(Objects.requireNonNull(RosesBlocks.INSTANCE.getCyanRoseFlower()).getDefaultState(), 2) + .add(Objects.requireNonNull(RosesBlocks.INSTANCE.getCyanRoseFlower()).getDefaultState(), 1)), 64 + )); + + register(context, roseKey, Feature.FLOWER, + createRandomFlowerPatchFeatureConfig( + new WeightedBlockStateProvider(DataPool.builder() + .add(Objects.requireNonNull(RosesBlocks.INSTANCE.getRoseFlower()).getDefaultState(), 2) + .add(Objects.requireNonNull(RosesBlocks.INSTANCE.getRoseFlower()).getDefaultState(), 1)), 64 + )); } public static RegistryKey> registerKey(String name) { @@ -31,4 +50,8 @@ public class RosesConfiguredFeatures { RegistryKey> key, F feature, FC configuration) { context.register(key, new ConfiguredFeature<>(feature, configuration)); } + + private static RandomPatchFeatureConfig createRandomFlowerPatchFeatureConfig(BlockStateProvider block, int tries) { + return ConfiguredFeatures.createRandomPatchFeatureConfig(tries, PlacedFeatures.createEntry(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig(block))); + } } diff --git a/MC1.20.6/src/main/java/observer/nelle/roses/world/RosesPlacedFeatures.java b/MC1.20.6/src/main/java/observer/nelle/roses/world/RosesPlacedFeatures.java index fad8d50..24c9b4d 100644 --- a/MC1.20.6/src/main/java/observer/nelle/roses/world/RosesPlacedFeatures.java +++ b/MC1.20.6/src/main/java/observer/nelle/roses/world/RosesPlacedFeatures.java @@ -5,20 +5,76 @@ import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.Identifier; -import net.minecraft.world.gen.feature.ConfiguredFeature; -import net.minecraft.world.gen.feature.Feature; -import net.minecraft.world.gen.feature.FeatureConfig; -import net.minecraft.world.gen.feature.PlacedFeature; +import net.minecraft.util.math.intprovider.ClampedIntProvider; +import net.minecraft.util.math.intprovider.UniformIntProvider; +import net.minecraft.world.gen.feature.*; import net.minecraft.world.gen.placementmodifier.PlacementModifier; +import net.minecraft.world.gen.placementmodifier.*; import observer.nelle.roses.RosesModKt; import java.util.List; public class RosesPlacedFeatures { + public static final RegistryKey cyanRoseBushPlacedKey = registerKey("cyan_rose_bush_placed"); + + public static final RegistryKey cyanRosePlacedKey = registerKey("cyan_rose_placed"); + public static final RegistryKey rosePlacedKey = registerKey("rose_placed"); + + public static final RegistryKey cyanRoseRarerPlacedKey = registerKey("cyan_rose_rare_placed"); + public static final RegistryKey roseRarerPlacedKey = registerKey("rose_rare_placed"); + + public static final RegistryKey cyanRoseCommonPlacedKey = registerKey("cyan_rose_common_placed"); + public static final RegistryKey roseCommonPlacedKey = registerKey("rose_common_placed"); + public static void bootstrap(Registerable context) { var configuredFeatures = context.getRegistryLookup(RegistryKeys.CONFIGURED_FEATURE); + register(context, cyanRoseBushPlacedKey, configuredFeatures.getOrThrow(RosesConfiguredFeatures.cyanRoseBushKey), + RarityFilterPlacementModifier.of(85), + SquarePlacementModifier.of(), + PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, + CountPlacementModifier.of(ClampedIntProvider.create(UniformIntProvider.create(-1, 3), 0, 3)), + BiomePlacementModifier.of()); + + // regular + register(context, cyanRosePlacedKey, configuredFeatures.getOrThrow(RosesConfiguredFeatures.cyanRoseKey), + RarityFilterPlacementModifier.of(70), + SquarePlacementModifier.of(), + PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, + BiomePlacementModifier.of()); + + register(context, rosePlacedKey, configuredFeatures.getOrThrow(RosesConfiguredFeatures.roseKey), + RarityFilterPlacementModifier.of(32), + SquarePlacementModifier.of(), + PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, + BiomePlacementModifier.of()); + + // rarer + register(context, cyanRoseRarerPlacedKey, configuredFeatures.getOrThrow(RosesConfiguredFeatures.cyanRoseKey), + RarityFilterPlacementModifier.of(90), + SquarePlacementModifier.of(), + PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, + BiomePlacementModifier.of()); + + register(context, roseRarerPlacedKey, configuredFeatures.getOrThrow(RosesConfiguredFeatures.roseKey), + RarityFilterPlacementModifier.of(80), + SquarePlacementModifier.of(), + PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, + BiomePlacementModifier.of()); + + // more common + register(context, cyanRoseCommonPlacedKey, configuredFeatures.getOrThrow(RosesConfiguredFeatures.cyanRoseKey), + RarityFilterPlacementModifier.of(45), + SquarePlacementModifier.of(), + PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, + BiomePlacementModifier.of()); + + register(context, roseCommonPlacedKey, configuredFeatures.getOrThrow(RosesConfiguredFeatures.roseKey), + RarityFilterPlacementModifier.of(4), + SquarePlacementModifier.of(), + PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, + BiomePlacementModifier.of()); } public static RegistryKey registerKey(String name) { diff --git a/MC1.20.6/src/main/java/observer/nelle/roses/world/gen/RosesVegetationGeneration.java b/MC1.20.6/src/main/java/observer/nelle/roses/world/gen/RosesVegetationGeneration.java new file mode 100644 index 0000000..80cdf6b --- /dev/null +++ b/MC1.20.6/src/main/java/observer/nelle/roses/world/gen/RosesVegetationGeneration.java @@ -0,0 +1,128 @@ +package observer.nelle.roses.world.gen; + +import net.fabricmc.fabric.api.biome.v1.BiomeModifications; +import net.fabricmc.fabric.api.biome.v1.BiomeSelectors; +import net.minecraft.world.biome.BiomeKeys; +import net.minecraft.world.gen.GenerationStep; +import observer.nelle.roses.world.RosesPlacedFeatures; + +public class RosesVegetationGeneration { + public static void generateVegetation() { + BiomeModifications.addFeature( + BiomeSelectors.includeByKey( + BiomeKeys.FOREST, + BiomeKeys.FLOWER_FOREST, + BiomeKeys.BIRCH_FOREST, + BiomeKeys.OLD_GROWTH_BIRCH_FOREST, + BiomeKeys.DARK_FOREST), + GenerationStep.Feature.VEGETAL_DECORATION, RosesPlacedFeatures.cyanRoseBushPlacedKey); + + // regular + BiomeModifications.addFeature( + BiomeSelectors.includeByKey( + BiomeKeys.PLAINS, + BiomeKeys.SUNFLOWER_PLAINS, + BiomeKeys.MEADOW, // https://minecraft.wiki/w/Flower#Flower_gradients + BiomeKeys.FLOWER_FOREST, // https://minecraft.wiki/w/Flower#Flower_gradients + BiomeKeys.SNOWY_PLAINS, + BiomeKeys.FOREST, + BiomeKeys.BIRCH_FOREST, + BiomeKeys.OLD_GROWTH_BIRCH_FOREST, + BiomeKeys.TAIGA, + BiomeKeys.OLD_GROWTH_PINE_TAIGA, + BiomeKeys.OLD_GROWTH_SPRUCE_TAIGA, + BiomeKeys.SNOWY_TAIGA, + BiomeKeys.DARK_FOREST, + BiomeKeys.WINDSWEPT_HILLS, + BiomeKeys.WINDSWEPT_FOREST, + BiomeKeys.WINDSWEPT_GRAVELLY_HILLS, + BiomeKeys.RIVER, + BiomeKeys.FROZEN_RIVER), + GenerationStep.Feature.VEGETAL_DECORATION, RosesPlacedFeatures.cyanRosePlacedKey); + + BiomeModifications.addFeature(BiomeSelectors.includeByKey( + BiomeKeys.PLAINS, + BiomeKeys.SUNFLOWER_PLAINS, + BiomeKeys.MEADOW, // https://minecraft.wiki/w/Flower#Flower_gradients + BiomeKeys.FLOWER_FOREST, // https://minecraft.wiki/w/Flower#Flower_gradients + BiomeKeys.SNOWY_PLAINS, + BiomeKeys.FOREST, + BiomeKeys.BIRCH_FOREST, + BiomeKeys.OLD_GROWTH_BIRCH_FOREST, + BiomeKeys.TAIGA, + BiomeKeys.OLD_GROWTH_PINE_TAIGA, + BiomeKeys.OLD_GROWTH_SPRUCE_TAIGA, + BiomeKeys.SNOWY_TAIGA, + BiomeKeys.DARK_FOREST, + BiomeKeys.WINDSWEPT_HILLS, + BiomeKeys.WINDSWEPT_FOREST, + BiomeKeys.WINDSWEPT_GRAVELLY_HILLS, + BiomeKeys.RIVER, + BiomeKeys.FROZEN_RIVER), + GenerationStep.Feature.VEGETAL_DECORATION, RosesPlacedFeatures.rosePlacedKey); + + // rarer + BiomeModifications.addFeature( + BiomeSelectors.includeByKey( + BiomeKeys.BEACH, + BiomeKeys.SNOWY_BEACH, + BiomeKeys.STONY_SHORE, + BiomeKeys.OCEAN, + BiomeKeys.DEEP_COLD_OCEAN, + BiomeKeys.COLD_OCEAN, + BiomeKeys.DEEP_FROZEN_OCEAN, + BiomeKeys.DEEP_LUKEWARM_OCEAN, + BiomeKeys.DEEP_OCEAN, + BiomeKeys.FROZEN_OCEAN, + BiomeKeys.LUKEWARM_OCEAN, + BiomeKeys.WARM_OCEAN, + BiomeKeys.DESERT, + BiomeKeys.ICE_SPIKES, + BiomeKeys.DRIPSTONE_CAVES, + BiomeKeys.DEEP_DARK + ), + GenerationStep.Feature.VEGETAL_DECORATION, RosesPlacedFeatures.cyanRoseRarerPlacedKey); + + BiomeModifications.addFeature(BiomeSelectors.includeByKey( + BiomeKeys.BEACH, + BiomeKeys.SNOWY_BEACH, + BiomeKeys.STONY_SHORE, + BiomeKeys.OCEAN, + BiomeKeys.DEEP_COLD_OCEAN, + BiomeKeys.COLD_OCEAN, + BiomeKeys.DEEP_FROZEN_OCEAN, + BiomeKeys.DEEP_LUKEWARM_OCEAN, + BiomeKeys.DEEP_OCEAN, + BiomeKeys.FROZEN_OCEAN, + BiomeKeys.LUKEWARM_OCEAN, + BiomeKeys.WARM_OCEAN, + BiomeKeys.DESERT, + BiomeKeys.ICE_SPIKES, + BiomeKeys.DRIPSTONE_CAVES, + BiomeKeys.DEEP_DARK + ), + GenerationStep.Feature.VEGETAL_DECORATION, RosesPlacedFeatures.roseRarerPlacedKey); + + // more common + BiomeModifications.addFeature( + BiomeSelectors.includeByKey( + BiomeKeys.JUNGLE, + BiomeKeys.BAMBOO_JUNGLE, + BiomeKeys.SPARSE_JUNGLE, + BiomeKeys.SAVANNA, + BiomeKeys.SAVANNA_PLATEAU, + BiomeKeys.WINDSWEPT_SAVANNA + ), + GenerationStep.Feature.VEGETAL_DECORATION, RosesPlacedFeatures.cyanRoseCommonPlacedKey); + + BiomeModifications.addFeature(BiomeSelectors.includeByKey( + BiomeKeys.JUNGLE, + BiomeKeys.BAMBOO_JUNGLE, + BiomeKeys.SPARSE_JUNGLE, + BiomeKeys.SAVANNA, + BiomeKeys.SAVANNA_PLATEAU, + BiomeKeys.WINDSWEPT_SAVANNA + ), + GenerationStep.Feature.VEGETAL_DECORATION, RosesPlacedFeatures.roseCommonPlacedKey); + } +} diff --git a/MC1.20.6/src/main/java/observer/nelle/roses/world/gen/RosesWorldGeneration.java b/MC1.20.6/src/main/java/observer/nelle/roses/world/gen/RosesWorldGeneration.java index 8ba8ae3..6e8814b 100644 --- a/MC1.20.6/src/main/java/observer/nelle/roses/world/gen/RosesWorldGeneration.java +++ b/MC1.20.6/src/main/java/observer/nelle/roses/world/gen/RosesWorldGeneration.java @@ -2,6 +2,6 @@ package observer.nelle.roses.world.gen; public class RosesWorldGeneration { public static void generateRosesWorldGen() { - + RosesVegetationGeneration.generateVegetation(); } } diff --git a/MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/cyan_rose_bush.json b/MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/cyan_rose_bush.json deleted file mode 100644 index bd23660..0000000 --- a/MC1.20.6/src/main/resources/ignore/worldgen/configured_feature/cyan_rose_bush.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "type": "minecraft:random_patch", - "config": { - "tries": 1, - "xz_spread": 7, - "y_spread": 3, - "feature": { - "feature": { - "type": "minecraft:simple_block", - "config": { - "to_place": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "roses_mod:cyan_rose_bush", - "Properties": { - "half": "lower" - } - } - } - } - }, - "placement": [ - { - "type": "minecraft:block_predicate_filter", - "predicate": { - "type": "minecraft:matching_blocks", - "blocks": "minecraft:air" - } - } - ] - } - } -}