diff --git a/MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/cyan_rose_bush.json b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/cyan_rose_bush.json new file mode 100644 index 0000000..8e7a1fb --- /dev/null +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/configured_feature/cyan_rose_bush.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:random_patch", + "config": { + "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" + } + } + ] + }, + "tries": 96, + "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 new file mode 100644 index 0000000..06a17f0 --- /dev/null +++ b/MC1.20.6/src/main/generated/data/roses_mod/worldgen/placed_feature/cyan_rose_bush_placed.json @@ -0,0 +1,32 @@ +{ + "feature": "roses_mod:cyan_rose_bush", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 7 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:count", + "count": { + "type": "minecraft:clamped", + "max_inclusive": 3, + "min_inclusive": 0, + "source": { + "type": "minecraft:uniform", + "max_inclusive": 3, + "min_inclusive": -1 + } + } + }, + { + "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 dae9419..17cf6f8 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 @@ -6,17 +6,23 @@ import net.minecraft.registry.Registerable; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; 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.*; +import net.minecraft.world.gen.stateprovider.BlockStateProvider; +import observer.nelle.roses.RosesBlocks; import observer.nelle.roses.RosesModKt; +import java.util.Objects; + public class RosesConfiguredFeatures { + public static final RegistryKey> cyanRoseBushKey = registerKey("cyan_rose_bush"); + 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()))))); } - public static RegistryKey> registerKey(String name) { return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, Identifier.of(RosesModKt.MOD_ID, name)); } diff --git a/MC1.20.6/src/main/kotlin/observer/nelle/roses/RosesMod.kt b/MC1.20.6/src/main/kotlin/observer/nelle/roses/RosesMod.kt index c420c75..944bc86 100644 --- a/MC1.20.6/src/main/kotlin/observer/nelle/roses/RosesMod.kt +++ b/MC1.20.6/src/main/kotlin/observer/nelle/roses/RosesMod.kt @@ -12,16 +12,13 @@ class Roses : ModInitializer { override fun onInitialize() { LOGGER.info("just like old times?") - /* TODO: - * - register worldgen - * - biome modification - * */ - // blocks RosesBlocks + // creative tab entries RosesCreativeTab + // generation RosesWorldGeneration.generateRosesWorldGen() } }