World Gen Attempt 1
This commit is contained in:
parent
32058b40f6
commit
31a8e612cd
5 changed files with 102 additions and 2 deletions
|
@ -19,6 +19,7 @@ import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings;
|
||||||
import org.quiltmc.qsl.item.setting.api.QuiltItemSettings;
|
import org.quiltmc.qsl.item.setting.api.QuiltItemSettings;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import xyz.limepot.roses_mod.world.gen.ModWorldGen;
|
||||||
//import xyz.limepot.roses_mod.world.feature.ModConfiguredFeatures;
|
//import xyz.limepot.roses_mod.world.feature.ModConfiguredFeatures;
|
||||||
|
|
||||||
public class RosesMod implements ModInitializer {
|
public class RosesMod implements ModInitializer {
|
||||||
|
@ -37,8 +38,8 @@ public class RosesMod implements ModInitializer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize(ModContainer mod) {
|
public void onInitialize(ModContainer mod) {
|
||||||
//REGISTER CONFIGURED FEATURES
|
//REGISTER WORLDGEN
|
||||||
//ModConfiguredFeatures.registerConfiguredFeatures();
|
ModWorldGen.generateWorldGen();
|
||||||
|
|
||||||
//REGISTER BLOCKS AND BLOCK ITEMS
|
//REGISTER BLOCKS AND BLOCK ITEMS
|
||||||
//TODO: ADD ITEMS TO CREATIVE TABS
|
//TODO: ADD ITEMS TO CREATIVE TABS
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package xyz.limepot.roses_mod.world.gen;
|
||||||
|
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.world.biome.BiomeKeys;
|
||||||
|
import net.minecraft.world.gen.GenerationStep;
|
||||||
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
|
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||||
|
import org.quiltmc.qsl.worldgen.biome.api.BiomeModifications;
|
||||||
|
import org.quiltmc.qsl.worldgen.biome.api.BiomeSelectors;
|
||||||
|
|
||||||
|
import static xyz.limepot.roses_mod.RosesMod.MOD_ID;
|
||||||
|
|
||||||
|
public class ModFlowerGeneration {
|
||||||
|
|
||||||
|
/*
|
||||||
|
public static void generateFlowers() {
|
||||||
|
//ROSE FLOWER
|
||||||
|
RegistryKey<TagKey> roseFlowerTag = RegistryKey.of(RegistryKeys.TAGS, new Identifier(MOD_ID, "rose_flowers"));
|
||||||
|
BiomeModifications.addFeature(BiomeSelectors.includeByKey(BiomeKeys.PLAINS), GenerationStep.Feature.VEGETAL_DECORATION, roseFlowerTag);
|
||||||
|
//CYAN ROSE
|
||||||
|
RegistryKey<TagKey> cyanRoseTag = RegistryKey.of(RegistryKeys.TAGS, new Identifier(MOD_ID, "cyan_roses"));
|
||||||
|
BiomeModifications.addFeature(BiomeSelectors.includeByKey(BiomeKeys.PLAINS), GenerationStep.Feature.VEGETAL_DECORATION, cyanRoseTag);
|
||||||
|
//CYAN ROSE BUSH
|
||||||
|
RegistryKey<TagKey> cyanRoseBushTag = RegistryKey.of(RegistryKeys.TAGS, new Identifier(MOD_ID, "cyan_rose_bushes"));
|
||||||
|
BiomeModifications.addFeature(BiomeSelectors.includeByKey(BiomeKeys.PLAINS), GenerationStep.Feature.VEGETAL_DECORATION, cyanRoseBushTag);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
public static void generateFlowers() {
|
||||||
|
RegistryKey<ConfiguredFeature<?, ?>> cyanRoseBushTag = RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, new Identifier(MOD_ID, "cyan_rose_bush"));
|
||||||
|
RegistryKey<PlacedFeature> cyanRoseBushTagKey = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(MOD_ID, "cyan_rose_bushes"));
|
||||||
|
BiomeModifications.addFeature(BiomeSelectors.includeByKey(BiomeKeys.FOREST),
|
||||||
|
GenerationStep.Feature.VEGETAL_DECORATION,
|
||||||
|
RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier(MOD_ID, "cyan_rose_bush")));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package xyz.limepot.roses_mod.world.gen;
|
||||||
|
|
||||||
|
public class ModWorldGen {
|
||||||
|
public static void generateWorldGen() {
|
||||||
|
ModFlowerGeneration.generateFlowers();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:vegetation_patch",
|
||||||
|
"config": {
|
||||||
|
"surface": "floor",
|
||||||
|
"depth": 1,
|
||||||
|
"vertical_range": 1,
|
||||||
|
"extra_bottom_block_chance": 0,
|
||||||
|
"extra_edge_column_chance": 0,
|
||||||
|
"vegetation_chance": 0.2,
|
||||||
|
"xz_radius": 0,
|
||||||
|
"replaceable": "#minecraft:tall_flowers",
|
||||||
|
"ground_state": {
|
||||||
|
"type": "minecraft:simple_state_provider",
|
||||||
|
"state": {
|
||||||
|
"Name": "minecraft:grass_block"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vegetation_feature": "roses_mod:cyan_rose_bush"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"feature": {
|
||||||
|
"type": "minecraft:vegetation_patch",
|
||||||
|
"config": {
|
||||||
|
"surface": "floor",
|
||||||
|
"depth": 1,
|
||||||
|
"vertical_range": 1,
|
||||||
|
"extra_bottom_block_chance": 0,
|
||||||
|
"extra_edge_column_chance": 0,
|
||||||
|
"vegetation_chance": 0.2,
|
||||||
|
"xz_radius": 0,
|
||||||
|
"replaceable": "#minecraft:tall_flowers",
|
||||||
|
"ground_state": {
|
||||||
|
"type": "minecraft:simple_state_provider",
|
||||||
|
"state": {
|
||||||
|
"Name": "minecraft:grass_block"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vegetation_feature": "roses_mod:cyan_rose_bush"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"placement": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:count",
|
||||||
|
"count": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:in_square"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:heightmap",
|
||||||
|
"heightmap": "MOTION_BLOCKING"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue