diff --git a/src/main/java/biomesoplenty/common/biome/overworld/LushGrasslandBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/LushGrasslandBiome.java index ad2796d71..2a6f4b4b7 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/LushGrasslandBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/LushGrasslandBiome.java @@ -79,13 +79,13 @@ public class LushGrasslandBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.LAPIS_ORE.getDefaultState(), 7), DEPTH_AVERAGE, new DepthAverageConfig(1, 16, 16))); // Vegetation - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.SMALL_JUNGLE_TREE, BOPBiomeFeatures.OAK_TREE, BOPBiomeFeatures.PALM_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.1F, 0.2F, 0.075F}, BOPBiomeFeatures.BUSH, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.9F, 0.6F, 1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.SMALL_JUNGLE_TREE, BOPBiomeFeatures.OAK_TREE, BOPBiomeFeatures.PALM_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.1F, 0.2F, 0.05F}, BOPBiomeFeatures.BUSH, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.9F, 0.6F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.LUSH_GRASSLAND_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(6))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.watergrass), TWICE_SURFACE, new FrequencyConfig(6))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(15))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.FERN), TWICE_SURFACE, new FrequencyConfig(2))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.FERN), TWICE_SURFACE, new FrequencyConfig(4))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.TALL_GRASS.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(8))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.LARGE_FERN.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.LARGE_FERN.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(2))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.BROWN_MUSHROOM), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(4))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.RED_MUSHROOM), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(8))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.WATERLILY, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(10))); diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/CherryBlossomGroveFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/CherryBlossomGroveFlowersFeature.java index e86e6fcf5..ef845b28a 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/CherryBlossomGroveFlowersFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/CherryBlossomGroveFlowersFeature.java @@ -10,22 +10,23 @@ package biomesoplenty.common.world.gen.feature; import java.util.Random; import biomesoplenty.api.block.BOPBlocks; -import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.feature.AbstractFlowersFeature; public class CherryBlossomGroveFlowersFeature extends AbstractFlowersFeature { - private static final Block[] FLOWERS = new Block[]{BOPBlocks.pink_daffodil, Blocks.OXEYE_DAISY}; - - public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) - { - double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); - Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)]; - return block.getDefaultState(); - } - } \ No newline at end of file + public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) + { + int j = p_202355_1_.nextInt(2); + switch(j) + { + case 0: + return BOPBlocks.pink_daffodil.getDefaultState(); + case 1: + default: + return Blocks.OXEYE_DAISY.getDefaultState(); + } + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/ExtendedFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/ExtendedFlowersFeature.java index 233e6b077..da1f4cd7e 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/ExtendedFlowersFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/ExtendedFlowersFeature.java @@ -9,22 +9,25 @@ package biomesoplenty.common.world.gen.feature; import java.util.Random; -import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.feature.AbstractFlowersFeature; public class ExtendedFlowersFeature extends AbstractFlowersFeature { - private static final Block[] FLOWERS = new Block[]{Blocks.OXEYE_DAISY, Blocks.DANDELION, Blocks.POPPY}; - - public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) - { - double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); - Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)]; - return block.getDefaultState(); - } - } \ No newline at end of file + public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) + { + int j = p_202355_1_.nextInt(3); + switch(j) + { + case 0: + return Blocks.OXEYE_DAISY.getDefaultState(); + case 1: + return Blocks.POPPY.getDefaultState(); + case 2: + default: + return Blocks.DANDELION.getDefaultState(); + } + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/FlowerMeadowFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/FlowerMeadowFlowersFeature.java index 318504e4c..508bbc9c6 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/FlowerMeadowFlowersFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/FlowerMeadowFlowersFeature.java @@ -9,27 +9,22 @@ package biomesoplenty.common.world.gen.feature; import java.util.Random; +import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.feature.AbstractFlowersFeature; public class FlowerMeadowFlowersFeature extends AbstractFlowersFeature { - public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) - { - int j = p_202355_1_.nextInt(4); - switch(j) - { - case 0: - return Blocks.ORANGE_TULIP.getDefaultState(); - case 1: - return Blocks.RED_TULIP.getDefaultState(); - case 2: - return Blocks.PINK_TULIP.getDefaultState(); - case 3: - default: - return Blocks.WHITE_TULIP.getDefaultState(); - } - } + private static final Block[] FLOWERS = new Block[]{Blocks.ORANGE_TULIP, Blocks.WHITE_TULIP, Blocks.PINK_TULIP, Blocks.RED_TULIP}; + + public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) + { + double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); + Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)]; + return block.getDefaultState(); + } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/JungleFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/JungleFlowersFeature.java index def61d8ad..8df6355c3 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/JungleFlowersFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/JungleFlowersFeature.java @@ -10,22 +10,25 @@ package biomesoplenty.common.world.gen.feature; import java.util.Random; import biomesoplenty.api.block.BOPBlocks; -import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.feature.AbstractFlowersFeature; public class JungleFlowersFeature extends AbstractFlowersFeature { - private static final Block[] FLOWERS = new Block[]{BOPBlocks.orange_cosmos, Blocks.DANDELION, Blocks.POPPY}; - - public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) - { - double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); - Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)]; - return block.getDefaultState(); - } - } \ No newline at end of file + public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) + { + int j = p_202355_1_.nextInt(3); + switch(j) + { + case 0: + return BOPBlocks.orange_cosmos.getDefaultState(); + case 1: + return Blocks.POPPY.getDefaultState(); + case 2: + default: + return Blocks.DANDELION.getDefaultState(); + } + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/LushGrasslandFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/LushGrasslandFlowersFeature.java index b6ac55dd3..3e1675444 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/LushGrasslandFlowersFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/LushGrasslandFlowersFeature.java @@ -20,12 +20,16 @@ import net.minecraft.world.gen.feature.AbstractFlowersFeature; public class LushGrasslandFlowersFeature extends AbstractFlowersFeature { - private static final Block[] FLOWERS = new Block[]{BOPBlocks.orange_cosmos, Blocks.OXEYE_DAISY}; - - public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) - { - double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); - Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)]; - return block.getDefaultState(); - } - } \ No newline at end of file + public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) + { + int j = p_202355_1_.nextInt(2); + switch(j) + { + case 0: + return BOPBlocks.orange_cosmos.getDefaultState(); + case 1: + default: + return Blocks.OXEYE_DAISY.getDefaultState(); + } + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/MoorFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/MoorFlowersFeature.java index 5af765a86..61ae9a05d 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/MoorFlowersFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/MoorFlowersFeature.java @@ -10,22 +10,23 @@ package biomesoplenty.common.world.gen.feature; import java.util.Random; import biomesoplenty.api.block.BOPBlocks; -import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.feature.AbstractFlowersFeature; public class MoorFlowersFeature extends AbstractFlowersFeature { - private static final Block[] FLOWERS = new Block[]{BOPBlocks.violet, Blocks.ALLIUM}; - - public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) - { - double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); - Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)]; - return block.getDefaultState(); - } - } \ No newline at end of file + public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) + { + int j = p_202355_1_.nextInt(2); + switch(j) + { + case 0: + return BOPBlocks.violet.getDefaultState(); + case 1: + default: + return Blocks.ALLIUM.getDefaultState(); + } + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/SnowyFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/SnowyFlowersFeature.java index 645145362..232763b43 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/SnowyFlowersFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/SnowyFlowersFeature.java @@ -20,12 +20,18 @@ import net.minecraft.world.gen.feature.AbstractFlowersFeature; public class SnowyFlowersFeature extends AbstractFlowersFeature { - private static final Block[] FLOWERS = new Block[]{BOPBlocks.violet, Blocks.DANDELION, Blocks.POPPY}; - - public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) - { - double d0 = MathHelper.clamp((1.0D + Biome.INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D)) / 2.0D, 0.0D, 0.9999D); - Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)]; - return block.getDefaultState(); - } - } \ No newline at end of file + public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) + { + int j = p_202355_1_.nextInt(3); + switch(j) + { + case 0: + return BOPBlocks.violet.getDefaultState(); + case 1: + return Blocks.POPPY.getDefaultState(); + case 2: + default: + return Blocks.DANDELION.getDefaultState(); + } + } +} \ No newline at end of file