Re-added the Jade Cliffs. Improved the Overgrown Cliffs
This commit is contained in:
parent
e3467be773
commit
987a45a5c9
14 changed files with 216 additions and 7 deletions
|
@ -37,6 +37,7 @@ public class BOPBiomes
|
|||
public static RegistryKey<Biome> grove = register("grove");
|
||||
public static RegistryKey<Biome> highland = register("highland");
|
||||
public static RegistryKey<Biome> highland_moor = register("highland_moor");
|
||||
public static RegistryKey<Biome> jade_cliffs = register("jade_cliffs");
|
||||
public static RegistryKey<Biome> lavender_field = register("lavender_field");
|
||||
public static RegistryKey<Biome> lush_grassland = register("lush_grassland");
|
||||
public static RegistryKey<Biome> lush_swamp = register("lush_swamp");
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.Features;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
||||
public class JadeCliffsBiome extends BiomeTemplate
|
||||
{
|
||||
public JadeCliffsBiome()
|
||||
{
|
||||
this.addWeight(BOPClimates.WET_TEMPERATE, 1);
|
||||
this.setBeachBiome(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.FOREST).depth(2.0F).scale(1.15F).temperature(0.75F).downfall(0.85F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(0xBBD1D5).skyColor(0xB7CCAD).grassColorOverride(0x7CA568).foliageColorOverride(0x8BB76E).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.DEEP_TOP_LAYER, SurfaceBuilder.CONFIG_GRASS));
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_MOUNTAIN);
|
||||
|
||||
// Underground
|
||||
DefaultBiomeFeatures.addDefaultCarvers(builder);
|
||||
DefaultBiomeFeatures.addDefaultMonsterRoom(builder);
|
||||
DefaultBiomeFeatures.addDefaultUndergroundVariety(builder);
|
||||
DefaultBiomeFeatures.addDefaultOres(builder);
|
||||
DefaultBiomeFeatures.addDefaultSoftDisks(builder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Vegetation
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.JADE_CLIFFS_TREES);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.STANDARD_GRASS_6);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.PATCH_SUGAR_CANE);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Other Features
|
||||
DefaultBiomeFeatures.addDefaultSprings(builder);
|
||||
DefaultBiomeFeatures.addExtraEmeralds(builder);
|
||||
DefaultBiomeFeatures.addInfestedStone(builder);
|
||||
DefaultBiomeFeatures.addSurfaceFreezing(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
// Entities
|
||||
builder.addSpawn(EntityClassification.AMBIENT, new MobSpawnInfo.Spawners(EntityType.BAT, 10, 8, 8));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SPIDER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE, 95, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SKELETON, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.CREEPER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITCH, 5, 1, 1));
|
||||
}
|
||||
}
|
|
@ -31,9 +31,9 @@ public class OvergrownCliffsBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.JUNGLE).depth(2.2F).scale(0.85F).temperature(0.95F).downfall(0.8F);
|
||||
builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.JUNGLE).depth(2.9F).scale(0.6F).temperature(0.95F).downfall(0.8F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(12638463).skyColor(calculateSkyColor(0.95F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4566514).waterFogColor(267827).fogColor(12638463).skyColor(calculateSkyColor(0.95F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,17 +60,20 @@ public class OvergrownCliffsBiome extends BiomeTemplate
|
|||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.OVERGROWN_CLIFFS_TREES);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.JUNGLE_FLOWERS);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.OVERGROWN_CLIFFS_VINES);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.SPROUTS_25);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.STANDARD_GRASS_12);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.TALL_GRASS_24);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.WATERGRASS_50);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.PATCH_SUGAR_CANE);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.VINES);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Other Features
|
||||
DefaultBiomeFeatures.addDefaultSprings(builder);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.OVERGROWN_CLIFFS_SPRING);
|
||||
|
||||
DefaultBiomeFeatures.addExtraEmeralds(builder);
|
||||
DefaultBiomeFeatures.addInfestedStone(builder);
|
||||
DefaultBiomeFeatures.addSurfaceFreezing(builder);
|
||||
|
|
|
@ -29,7 +29,7 @@ public class SteppeBiome extends BiomeTemplate
|
|||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.PLAINS).depth(1.75F).scale(0.3F).temperature(0.775F).downfall(0.05F);
|
||||
builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.PLAINS).depth(1.6F).scale(0.3F).temperature(0.775F).downfall(0.05F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(12638463).skyColor(calculateSkyColor(0.775F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ public class BOPConfiguredFeatures
|
|||
public static final ConfiguredFeature<?, ?> SMALL_DEAD_TREE = register("small_dead_tree", BOPFeatures.SMALL_DEAD_TREE.configured(Features.OAK.config()));
|
||||
public static final ConfiguredFeature<?, ?> SMALL_JUNGLE_TREE = register("small_jungle_tree", BOPFeatures.SMALL_JUNGLE_TREE.configured(Features.OAK.config()));
|
||||
public static final ConfiguredFeature<?, ?> SPARSE_OAK_TREE = register("sparse_oak_tree", BOPFeatures.SPARSE_OAK_TREE.configured(Features.OAK.config()));
|
||||
public static final ConfiguredFeature<?, ?> SPRUCE_BUSH = register("spruce_bush", BOPFeatures.SPRUCE_BUSH.configured(Features.OAK.config()));
|
||||
public static final ConfiguredFeature<?, ?> SPRUCE_POPLAR = register("spruce_poplar", BOPFeatures.SPRUCE_POPLAR.configured(Features.OAK.config()));
|
||||
public static final ConfiguredFeature<?, ?> SPRUCE_TWIGLET_TREE = register("spruce_twiglet_tree", BOPFeatures.SPRUCE_TWIGLET_TREE.configured(Features.OAK.config()));
|
||||
public static final ConfiguredFeature<?, ?> TALL_SPRUCE_TREE = register("tall_spruce_tree", BOPFeatures.TALL_SPRUCE_TREE.configured(Features.OAK.config()));
|
||||
|
@ -122,6 +123,7 @@ public class BOPConfiguredFeatures
|
|||
public static final ConfiguredFeature<?, ?> FLOWER_MEADOW_TREES = register("flower_meadow_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(TALL_SPRUCE_TREE_BEES.weighted(0.1F)), BUSH)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(2, 0.3F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> FUNGAL_JUNGLE_TREES = register("fungal_jungle_trees", BUSH.decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(2, 0.1F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> GROVE_TREES = register("grove_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(SPARSE_OAK_TREE.weighted(0.05F), DARK_OAK_POPLAR.weighted(0.2F), SPRUCE_POPLAR.weighted(0.4F), FLOWERING_BUSH.weighted(0.1F)), BUSH)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(3, 0.5F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> JADE_CLIFFS_TREES = register("jade_cliffs_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(TALL_SPRUCE_TREE.weighted(0.075F), Features.PINE.weighted(0.025F)), SPRUCE_BUSH)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(35, 0.1F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> LAVENDER_FIELD_TREES = register("lavender_field_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(FLOWERING_OAK_TREE_BEES.weighted(0.2F), BIG_FLOWERING_OAK_TREE.weighted(0.1F), BIG_JACARANDA_TREE.weighted(0.1F)), JACARANDA_TREE_BEES)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(1, 0.2F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> LUSH_GRASSLAND_TREES = register("lush_grassland_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(SMALL_JUNGLE_TREE.weighted(0.1F), Features.OAK_BEES_0002.weighted(0.2F), PALM_TREE.weighted(0.05F)), BUSH)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig((int)0.95F, 0.6F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> LUSH_SWAMP_TREES = register("lush_swamp_trees", TALL_SWAMP_TREE.decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(3, 0.1F, 1))));
|
||||
|
@ -136,7 +138,7 @@ public class BOPConfiguredFeatures
|
|||
public static final ConfiguredFeature<?, ?> ORCHARD_TREES = register("orchard_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(BIG_FLOWERING_OAK_TREE.weighted(0.1F)), FLOWERING_OAK_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(2, 0.3F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> ORIGIN_HILLS_TREES = register("origin_hills_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(BIG_ORIGIN_TREE.weighted(0.1F)), ORIGIN_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(3, 0.4F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> OUTBACK_TREES = register("outback_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(ACACIA_BUSH.weighted(0.1F)), ACACIA_TWIGLET_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig((int)0.5F, 0.3F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> OVERGROWN_CLIFFS_TREES = register("overgrown_cliffs_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(JUNGLE_TWIGLET_TREE.weighted(0.3F), MAHOGANY_TREE.weighted(0.01F)), BUSH)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(18, 0.4F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> OVERGROWN_CLIFFS_TREES = register("overgrown_cliffs_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(JUNGLE_TWIGLET_TREE.weighted(0.3F), MAHOGANY_TREE.weighted(0.1F)), BUSH)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(16, 0.4F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> PRAIRIE_TREES = register("prairie_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(BIG_OAK_TREE.weighted(0.1F)), SPARSE_OAK_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig((int)0.85F, 0.3F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> PUMPKIN_PATCH_TREES = register("pumpkin_patch_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(BUSH.weighted(0.2F)), TWIGLET_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(5, 0.5F, 1))));
|
||||
public static final ConfiguredFeature<?, ?> RAINBOW_VALLEY_TREES = register("rainbow_valley_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(BUSH.weighted(0.2F), FIR_TREE_SMALL.weighted(0.1F), FIR_TREE.weighted(0.025F), BIG_RAINBOW_BIRCH_TREE.weighted(0.2F)), RAINBOW_BIRCH_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(15, 0.5F, 1))));
|
||||
|
@ -310,6 +312,8 @@ public class BOPConfiguredFeatures
|
|||
public static final ConfiguredFeature<?, ?> NETHER_BRAMBLE = register("nether_bramble", BOPFeatures.BRAMBLE.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(50)));
|
||||
public static final ConfiguredFeature<?, ?> NETHER_VINES = register("nether_vines", BOPFeatures.NETHER_VINES.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(150)));
|
||||
public static final ConfiguredFeature<?, ?> OBSIDIAN_SPLATTER = register("obsidian_splatter", BOPFeatures.OBSIDIAN_SPLATTER.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(12)));
|
||||
public static final ConfiguredFeature<?, ?> OVERGROWN_CLIFFS_SPRING = register("overgrown_cliffs_spring", Feature.SPRING.configured(BOPFeatures.OVERGROWN_CLIFFS_SPRING_CONFIG).decorated(Placement.RANGE_VERY_BIASED.configured(new TopSolidRangeConfig(8, 16, 256))).squared().decorated(FeatureUtil.denseCount(150)));
|
||||
public static final ConfiguredFeature<?, ?> OVERGROWN_CLIFFS_VINES = register("overgrown_cliffs_vines", BOPFeatures.OVERGROWN_CLIFFS_VINES.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(150)));
|
||||
public static final ConfiguredFeature<?, ?> PODZOL_SPLATTER = register("podzol_splatter", BOPFeatures.PODZOL_SPLATTER.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(14)));
|
||||
public static final ConfiguredFeature<?, ?> PUMPKIN_PATCH = register("pumpkin_patch", BOPFeatures.PUMPKIN_PATCH.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(35)));
|
||||
public static final ConfiguredFeature<?, ?> SCATTERED_ROCKS = register("scattered_rocks", BOPFeatures.SCATTERED_ROCKS.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(3)));
|
||||
|
|
|
@ -85,6 +85,7 @@ public class BOPFeatures
|
|||
|
||||
//Bushes/Twiglets
|
||||
public static final Feature<BaseTreeFeatureConfig> BUSH = register("bush", new BushTreeFeature.Builder().create());
|
||||
public static final Feature<BaseTreeFeatureConfig> SPRUCE_BUSH = register("spruce_bush", new BushTreeFeature.Builder().log(Blocks.SPRUCE_LOG.defaultBlockState()).leaves(Blocks.SPRUCE_LEAVES.defaultBlockState()).create());
|
||||
public static final Feature<BaseTreeFeatureConfig> ACACIA_BUSH = register("acacia_bush", new BushTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.RED_SAND).log(Blocks.ACACIA_LOG.defaultBlockState()).leaves(Blocks.ACACIA_LEAVES.defaultBlockState()).create());
|
||||
public static final Feature<BaseTreeFeatureConfig> FLOWERING_BUSH = register("flowering_bush", new BushTreeFeature.Builder().altLeaves(BOPBlocks.flowering_oak_leaves.defaultBlockState()).create());
|
||||
public static final Feature<BaseTreeFeatureConfig> COBWEB_BUSH = register("cobweb_bush", new BushTreeFeature.Builder().altLeaves(Blocks.COBWEB.defaultBlockState()).create());
|
||||
|
@ -131,6 +132,7 @@ public class BOPFeatures
|
|||
public static final Feature<NoFeatureConfig> MYCELIUM_SPLATTER = register("mycelium_splatter", new MyceliumSplatterFeature(NoFeatureConfig.CODEC));
|
||||
public static final Feature<NoFeatureConfig> NETHER_VINES = register("nether_vines", new NetherVinesFeature(NoFeatureConfig.CODEC));
|
||||
public static final Feature<NoFeatureConfig> OBSIDIAN_SPLATTER = register("obsidian_splatter", new ObsidianSplatterFeature(NoFeatureConfig.CODEC));
|
||||
public static final Feature<NoFeatureConfig> OVERGROWN_CLIFFS_VINES = register("overgrown_cliffs_vines", new OvergrownCliffsVinesFeature(NoFeatureConfig.CODEC));
|
||||
public static final Feature<NoFeatureConfig> PODZOL_SPLATTER = register("podzol_splatter", new PodzolSplatterFeature(NoFeatureConfig.CODEC));
|
||||
public static final Feature<NoFeatureConfig> PUMPKIN_PATCH = register("pumpkin_patch", new PumpkinPatchFeature(NoFeatureConfig.CODEC));
|
||||
public static final Feature<NoFeatureConfig> SCATTERED_ROCKS = register("scattered_rocks", new ScatteredRocksFeature(NoFeatureConfig.CODEC));
|
||||
|
@ -175,6 +177,7 @@ public class BOPFeatures
|
|||
|
||||
//Other
|
||||
public static final LiquidsConfig VOLCANO_SPRING_CONFIG = new LiquidsConfig(Fluids.LAVA.defaultFluidState(), true, 4, 1, ImmutableSet.of(Blocks.BASALT, Blocks.MAGMA_BLOCK, BOPBlocks.black_sand, BOPBlocks.black_sandstone, Blocks.STONE, Blocks.GRANITE, Blocks.DIORITE, Blocks.ANDESITE));
|
||||
public static final LiquidsConfig OVERGROWN_CLIFFS_SPRING_CONFIG = new LiquidsConfig(Fluids.WATER.defaultFluidState(), true, 4, 1, ImmutableSet.of(Blocks.DIRT, Blocks.TERRACOTTA, Blocks.STONE, Blocks.GRANITE, Blocks.DIORITE, Blocks.ANDESITE));
|
||||
|
||||
private static <C extends IFeatureConfig, F extends Feature<C>> F register(String key, F value)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
package biomesoplenty.common.world.gen.feature;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.util.block.IBlockPosQuery;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.serialization.Codec;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.VineBlock;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ISeedReader;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.gen.ChunkGenerator;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class OvergrownCliffsVinesFeature extends Feature<NoFeatureConfig>
|
||||
{
|
||||
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.DIRT || world.getBlockState(pos).getBlock() == Blocks.GRASS_BLOCK || world.getBlockState(pos).getBlock() == Blocks.STONE || world.getBlockState(pos).getBlock() == Blocks.TERRACOTTA || world.getBlockState(pos).getBlock() == Blocks.ANDESITE || world.getBlockState(pos).getBlock() == Blocks.GRANITE || world.getBlockState(pos).getBlock() == Blocks.DIORITE;
|
||||
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).isAir(world, pos);
|
||||
int minHeight = 7;
|
||||
int maxHeight = 14;
|
||||
|
||||
public OvergrownCliffsVinesFeature(Codec<NoFeatureConfig> deserializer)
|
||||
{
|
||||
super(deserializer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean place(ISeedReader world, ChunkGenerator chunkGenerator, Random rand, BlockPos startPos, NoFeatureConfig config)
|
||||
{
|
||||
while (startPos.getY() > 1 && this.replace.matches(world, startPos)) {startPos = startPos.below();}
|
||||
|
||||
if (!this.placeOn.matches(world, startPos.offset(2, 0, 2)))
|
||||
{
|
||||
// Abandon if we can't place the tree on this block
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 128; ++i)
|
||||
{
|
||||
BlockPos genPos = startPos.offset(rand.nextInt(4) - rand.nextInt(4), rand.nextInt(3) - rand.nextInt(3), rand.nextInt(4) - rand.nextInt(4));
|
||||
|
||||
if (!this.replace.matches(world, genPos)) continue;
|
||||
|
||||
BlockState vineState = Blocks.VINE.defaultBlockState();
|
||||
|
||||
// make sure there is an adjacent block for the vine to attach to
|
||||
List<Direction> validDirections = Lists.newArrayList();
|
||||
|
||||
for (Direction facing : Direction.values()) {
|
||||
if (facing == Direction.UP || facing == Direction.DOWN) continue;
|
||||
if (this.placeOn.matches(world, genPos.relative(facing))) validDirections.add(facing);
|
||||
}
|
||||
|
||||
if (validDirections.isEmpty()) continue;
|
||||
|
||||
Direction direction = validDirections.get(rand.nextInt(validDirections.size()));
|
||||
vineState = vineState.setValue(VineBlock.getPropertyForFace(direction), Boolean.valueOf(true));
|
||||
|
||||
// choose random target height
|
||||
int targetHeight = minHeight + rand.nextInt(maxHeight);
|
||||
|
||||
// keep placing blocks upwards (if there's room)
|
||||
for (int height = 0; height <= targetHeight; height++)
|
||||
{
|
||||
BlockPos offsetPos = genPos.below(height);
|
||||
|
||||
if (replace.matches(world, offsetPos) && vineState.getBlock().canSurvive(vineState, world, offsetPos))
|
||||
{
|
||||
world.setBlock(offsetPos, vineState, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean setBlock(IWorld world, BlockPos pos, BlockState state)
|
||||
{
|
||||
if (this.replace.matches(world, pos))
|
||||
{
|
||||
super.setBlock(world, pos, state);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -148,6 +148,7 @@ public class ModBiomes
|
|||
registerBiome(new GroveBiome(), "grove");
|
||||
registerBiome(new HighlandBiome(), "highland");
|
||||
registerBiome(new HighlandMoorBiome(), "highland_moor");
|
||||
registerBiome(new JadeCliffsBiome(), "jade_cliffs");
|
||||
registerBiome(new LavenderFieldBiome(), "lavender_field");
|
||||
registerBiome(new LushGrasslandBiome(), "lush_grassland");
|
||||
registerBiome(new LushSwampBiome(), "lush_swamp");
|
||||
|
@ -282,6 +283,7 @@ public class ModBiomes
|
|||
registerVillagerType(grove, VillagerType.PLAINS);
|
||||
registerVillagerType(highland, VillagerType.PLAINS);
|
||||
registerVillagerType(highland_moor, VillagerType.PLAINS);
|
||||
registerVillagerType(jade_cliffs, VillagerType.PLAINS);
|
||||
registerVillagerType(lavender_field, VillagerType.PLAINS);
|
||||
registerVillagerType(lush_grassland, VillagerType.JUNGLE);
|
||||
registerVillagerType(lush_swamp, VillagerType.JUNGLE);
|
||||
|
|
|
@ -14,7 +14,7 @@ public class ModPaintings
|
|||
public static final PaintingType FIRST_WORLD = new PaintingType(32, 32);
|
||||
public static final PaintingType NETHER_WASP = new PaintingType(32, 32);
|
||||
public static final PaintingType PROMISED_LAND = new PaintingType(64, 32);
|
||||
public static final PaintingType JADE_CLIFFS = new PaintingType(64, 64);
|
||||
public static final PaintingType COAST = new PaintingType(64, 64);
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerPaintingTypes(RegistryEvent.Register<PaintingType> event)
|
||||
|
@ -22,7 +22,7 @@ public class ModPaintings
|
|||
registerPaintingType(FIRST_WORLD, "first_world");
|
||||
registerPaintingType(NETHER_WASP, "nether_wasp");
|
||||
registerPaintingType(PROMISED_LAND, "promised_land");
|
||||
registerPaintingType(JADE_CLIFFS, "jade_cliffs");
|
||||
registerPaintingType(COAST, "coast");
|
||||
}
|
||||
|
||||
public static PaintingType registerPaintingType(PaintingType entry, String name)
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
"biome.biomesoplenty.grove": "Grove",
|
||||
"biome.biomesoplenty.highland": "Highland",
|
||||
"biome.biomesoplenty.highland_moor": "Highland Moor",
|
||||
"biome.biomesoplenty.jade_cliffs": "Jade Cliffs",
|
||||
"biome.biomesoplenty.lavender_field": "Lavender Field",
|
||||
"biome.biomesoplenty.lush_grassland": "Lush Grassland",
|
||||
"biome.biomesoplenty.lush_swamp": "Lush Swamp",
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
|
@ -140,6 +140,12 @@
|
|||
"conditions": {
|
||||
"biome": "biomesoplenty:highland_moor"
|
||||
}
|
||||
},
|
||||
"jade_cliffs": {
|
||||
"trigger": "minecraft:location",
|
||||
"conditions": {
|
||||
"biome": "biomesoplenty:jade_cliffs"
|
||||
}
|
||||
},
|
||||
"lavender_field": {
|
||||
"trigger": "minecraft:location",
|
||||
|
|
|
@ -139,6 +139,12 @@
|
|||
"conditions": {
|
||||
"biome": "biomesoplenty:highland_moor"
|
||||
}
|
||||
},
|
||||
"jade_cliffs": {
|
||||
"trigger": "minecraft:location",
|
||||
"conditions": {
|
||||
"biome": "biomesoplenty:jade_cliffs"
|
||||
}
|
||||
},
|
||||
"lavender_field": {
|
||||
"trigger": "minecraft:location",
|
||||
|
@ -452,6 +458,7 @@
|
|||
"grove",
|
||||
"highland",
|
||||
"highland_moor",
|
||||
"jade_cliffs",
|
||||
"lavender_field",
|
||||
"lush_grassland",
|
||||
"lush_swamp",
|
||||
|
|
Loading…
Reference in a new issue