uhhh
This commit is contained in:
parent
6c7be0f151
commit
e49a692261
4 changed files with 78 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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<ConfiguredFeature<?, ?>> cyanRoseBushKey = registerKey("cyan_rose_bush");
|
||||
|
||||
public static void bootstrap(Registerable<ConfiguredFeature<?, ?>> 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<ConfiguredFeature<?, ?>> registerKey(String name) {
|
||||
return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, Identifier.of(RosesModKt.MOD_ID, name));
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue