Fixed BOP biomes not generating flowers when using bonemeal

This commit is contained in:
Forstride 2021-05-05 01:45:57 -04:00
parent 7e0b396cb6
commit d5396c0485
24 changed files with 40 additions and 755 deletions

View file

@ -20,6 +20,7 @@ import net.minecraft.util.registry.WorldGenRegistries;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.blockplacer.SimpleBlockPlacer;
import net.minecraft.world.gen.blockstateprovider.SimpleBlockStateProvider;
import net.minecraft.world.gen.blockstateprovider.WeightedBlockStateProvider;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placement.AtSurfaceWithExtraConfig;
import net.minecraft.world.gen.placement.ChanceConfig;
@ -166,31 +167,31 @@ public class BOPConfiguredFeatures
public static final ConfiguredFeature<?, ?> WOODED_SCRUBLAND_TREES = register("wooded_scrubland_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(SPRUCE_TWIGLET_TREE.weighted(0.3F), TALL_TWIGLET_TREE.weighted(0.1F)), ACACIA_TWIGLET)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(6, 0.5F, 1))));
// Biome Flower Listings
public static final ConfiguredFeature<?, ?> CHERRY_BLOSSOM_GROVE_FLOWERS = register("cherry_blossom_grove_flowers", BOPFeatures.CHERRY_BLOSSOM_GROVE_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(5)));
public static final ConfiguredFeature<?, ?> CONIFEROUS_FOREST_FLOWERS = register("coniferous_forest_flowers", BOPFeatures.CONIFEROUS_FOREST_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(4)));
public static final ConfiguredFeature<?, ?> LUSH_DESERT_FLOWERS = register("lush_desert_flowers", BOPFeatures.WILDFLOWER_FEATURE.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(6)));
public static final ConfiguredFeature<?, ?> FLOWER_MEADOW_FLOWERS = register("flower_meadow_flowers", BOPFeatures.FLOWER_MEADOW_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(150)));
public static final ConfiguredFeature<?, ?> GROVE_FLOWERS = register("grove_flowers", BOPFeatures.EXTENDED_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(6)));
public static final ConfiguredFeature<?, ?> LAVENDER_FLOWERS = register("lavender_flowers", BOPFeatures.LAVENDER_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(500)));
public static final ConfiguredFeature<?, ?> MEADOW_FLOWERS = register("meadow_flowers", BOPFeatures.MEADOW_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(6)));
public static final ConfiguredFeature<?, ?> MEADOW_FLOWERS_2 = register("meadow_flowers_2", BOPFeatures.FLOWER_MEADOW_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> MOOR_FLOWERS = register("moor_flowers", BOPFeatures.MOOR_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(5)));
public static final ConfiguredFeature<?, ?> MOOR_FLOWERS_2 = register("moor_flowers_2", BOPFeatures.VIOLET_FEATURE.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(50)));
public static final ConfiguredFeature<?, ?> MYSTIC_GROVE_FLOWERS = register("mystic_grove_flowers", BOPFeatures.MYSTIC_GROVE_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(18)));
public static final ConfiguredFeature<?, ?> MYSTIC_PLAINS_FLOWERS = register("mystic_plains_flowers", BOPFeatures.MYSTIC_GROVE_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(50)));
public static final ConfiguredFeature<?, ?> OMINOUS_WOODS_FLOWERS = register("ominous_woods_flowers", BOPFeatures.OMINOUS_WOODS_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> ORCHARD_FLOWERS = register("orchard_flowers", BOPFeatures.EXTENDED_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(15)));
public static final ConfiguredFeature<?, ?> ORIGIN_FLOWERS = register("origin_flowers", BOPFeatures.ORIGIN_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(4)));
public static final ConfiguredFeature<?, ?> POPPY_FLOWERS = register("poppy_flowers", BOPFeatures.POPPY_FEATURE.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(500)));
public static final ConfiguredFeature<?, ?> RAINBOW_HILLS_FLOWERS = register("rainbow_hills_flowers", BOPFeatures.RAINBOW_HILLS_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(25)));
public static final ConfiguredFeature<?, ?> RAINFOREST_FLOWERS = register("rainforest_flowers", BOPFeatures.RAINFOREST_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(5)));
public static final ConfiguredFeature<?, ?> SHRUBLAND_FLOWERS = register("shrubland_flowers", BOPFeatures.SHRUBLAND_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> SNOWY_FLOWERS = register("snowy_flowers", BOPFeatures.SNOWY_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> TROPIC_FLOWERS = register("tropic_flowers", BOPFeatures.TROPICS_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(15)));
public static final ConfiguredFeature<?, ?> CHERRY_BLOSSOM_GROVE_FLOWERS = register("cherry_blossom_grove_flowers", Feature.FLOWER.configured(BOPFeatures.CHERRY_BLOSSOM_GROVE_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(5)));
public static final ConfiguredFeature<?, ?> CONIFEROUS_FOREST_FLOWERS = register("coniferous_forest_flowers", Feature.FLOWER.configured(BOPFeatures.CONIFEROUS_FOREST_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(4)));
public static final ConfiguredFeature<?, ?> LUSH_DESERT_FLOWERS = register("lush_desert_flowers", Feature.FLOWER.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(BOPBlocks.wildflower.defaultBlockState()), SimpleBlockPlacer.INSTANCE)).tries(64).build()).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(6)));
public static final ConfiguredFeature<?, ?> FLOWER_MEADOW_FLOWERS = register("flower_meadow_flowers", Feature.FLOWER.configured(BOPFeatures.FLOWER_MEADOW_FLOWER_CONFIG).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(150)));
public static final ConfiguredFeature<?, ?> GROVE_FLOWERS = register("grove_flowers", Feature.FLOWER.configured(BOPFeatures.EXTENDED_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(6)));
public static final ConfiguredFeature<?, ?> LAVENDER_FLOWERS = register("lavender_flowers", Feature.FLOWER.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(BOPBlocks.lavender.defaultBlockState()), SimpleBlockPlacer.INSTANCE)).tries(64).build()).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(500)));
public static final ConfiguredFeature<?, ?> MEADOW_FLOWERS = register("meadow_flowers", Feature.FLOWER.configured(BOPFeatures.MEADOW_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(6)));
public static final ConfiguredFeature<?, ?> MEADOW_FLOWERS_2 = register("meadow_flowers_2", Feature.FLOWER.configured(BOPFeatures.FLOWER_MEADOW_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> MOOR_FLOWERS = register("moor_flowers", Feature.FLOWER.configured(BOPFeatures.MOOR_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(5)));
public static final ConfiguredFeature<?, ?> MOOR_FLOWERS_2 = register("moor_flowers_2", Feature.FLOWER.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(BOPBlocks.violet.defaultBlockState()), SimpleBlockPlacer.INSTANCE)).tries(64).build()).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(50)));
public static final ConfiguredFeature<?, ?> MYSTIC_GROVE_FLOWERS = register("mystic_grove_flowers", Feature.FLOWER.configured(BOPFeatures.MYSTIC_GROVE_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(18)));
public static final ConfiguredFeature<?, ?> MYSTIC_PLAINS_FLOWERS = register("mystic_plains_flowers", Feature.FLOWER.configured(BOPFeatures.MYSTIC_GROVE_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(50)));
public static final ConfiguredFeature<?, ?> OMINOUS_WOODS_FLOWERS = register("ominous_woods_flowers", Feature.FLOWER.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(Blocks.WITHER_ROSE.defaultBlockState()), SimpleBlockPlacer.INSTANCE)).tries(64).build()).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> ORCHARD_FLOWERS = register("orchard_flowers", Feature.FLOWER.configured(BOPFeatures.EXTENDED_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(15)));
public static final ConfiguredFeature<?, ?> ORIGIN_FLOWERS = register("origin_flowers", Feature.FLOWER.configured(BOPFeatures.ORIGIN_VALLEY_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(4)));
public static final ConfiguredFeature<?, ?> POPPY_FLOWERS = register("poppy_flowers", Feature.FLOWER.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(Blocks.POPPY.defaultBlockState()), SimpleBlockPlacer.INSTANCE)).tries(64).build()).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(500)));
public static final ConfiguredFeature<?, ?> RAINBOW_HILLS_FLOWERS = register("rainbow_hills_flowers", Feature.FLOWER.configured(BOPFeatures.RAINBOW_HILLS_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(25)));
public static final ConfiguredFeature<?, ?> RAINFOREST_FLOWERS = register("rainforest_flowers", Feature.FLOWER.configured(BOPFeatures.RAINFOREST_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(5)));
public static final ConfiguredFeature<?, ?> SHRUBLAND_FLOWERS = register("shrubland_flowers", Feature.FLOWER.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(Blocks.ALLIUM.defaultBlockState()), SimpleBlockPlacer.INSTANCE)).tries(64).build()).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> SNOWY_FLOWERS = register("snowy_flowers", Feature.FLOWER.configured(BOPFeatures.SNOWY_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> TROPIC_FLOWERS = register("tropic_flowers", Feature.FLOWER.configured(BOPFeatures.TROPICS_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(15)));
public static final ConfiguredFeature<?, ?> UNDERGROWTH_FLOWERS = register("undergrowth_flowers", Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.burning_blossom.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(8)));
public static final ConfiguredFeature<?, ?> WASTELAND_FLOWERS = register("wasteland_flowers", BOPFeatures.WASTELAND_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(1)));
public static final ConfiguredFeature<?, ?> WETLAND_FLOWERS = register("wetland_flowers", BOPFeatures.WETLAND_FLOWERS.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> SCRUBLAND_FLOWERS = register("scrubland_flowers", BOPFeatures.WILDFLOWER_FEATURE.configured(IFeatureConfig.NONE).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(2)));
public static final ConfiguredFeature<?, ?> WASTELAND_FLOWERS = register("wasteland_flowers", Feature.FLOWER.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(BOPBlocks.wilted_lily.defaultBlockState()), SimpleBlockPlacer.INSTANCE)).tries(64).build()).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(1)));
public static final ConfiguredFeature<?, ?> WETLAND_FLOWERS = register("wetland_flowers", Feature.FLOWER.configured(BOPFeatures.WETLAND_FLOWER_CONFIG).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(3)));
public static final ConfiguredFeature<?, ?> SCRUBLAND_FLOWERS = register("scrubland_flowers", Feature.FLOWER.configured((new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(BOPBlocks.wildflower.defaultBlockState()), SimpleBlockPlacer.INSTANCE)).tries(64).build()).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(2)));
/////////////////////////////////////////////////////////////////////

View file

@ -18,6 +18,8 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.gen.blockplacer.SimpleBlockPlacer;
import net.minecraft.world.gen.blockstateprovider.WeightedBlockStateProvider;
import net.minecraft.world.gen.feature.*;
import net.minecraftforge.registries.ForgeRegistries;
@ -149,28 +151,19 @@ public class BOPFeatures
public static final Feature<NoFeatureConfig> WASTELAND_GRASS = register("wasteland_grass", new WastelandGrassFeature(NoFeatureConfig.CODEC.stable()));
//Flowers
public static final FlowersFeature<NoFeatureConfig> CHERRY_BLOSSOM_GROVE_FLOWERS = register("cherry_blossom_grove_flowers", new CherryBlossomGroveFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> CONIFEROUS_FOREST_FLOWERS = register("coniferous_forest_flowers", new ConiferousForestFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> EXTENDED_FLOWERS = register("extended_flowers", new ExtendedFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> FLOWER_MEADOW_FLOWERS = register("flower_meadow_flowers", new FlowerMeadowFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> LAVENDER_FLOWERS = register("lavender_flowers", new LavenderFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> MEADOW_FLOWERS = register("meadow_flowers", new MeadowFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> MOOR_FLOWERS = register("moor_flowers", new MoorFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> MYSTIC_GROVE_FLOWERS = register("mystic_grove_flowers", new MysticGroveFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> OMINOUS_WOODS_FLOWERS = register("ominous_woods_flowers", new OminousWoodsFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> ORIGIN_FLOWERS = register("origin_flowers", new OriginFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> RAINBOW_HILLS_FLOWERS = register("rainbow_hills_flowers", new RainbowHillsFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> RAINFOREST_FLOWERS = register("rainforest_flowers", new RainforestFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> SHRUBLAND_FLOWERS = register("shrubland_flowers", new ShrublandFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> SNOWY_FLOWERS = register("snowy_flowers", new SnowyFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> TROPICS_FLOWERS = register("tropics_flowers", new TropicsFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> WASTELAND_FLOWERS = register("wasteland_flowers", new WastelandFlowersFeature());
public static final FlowersFeature<NoFeatureConfig> WETLAND_FLOWERS = register("wetland_flowers", new WetlandFlowersFeature());
//Vanilla Biomes Features
public static final FlowersFeature<NoFeatureConfig> VIOLET_FEATURE = register("violet_feature", new VioletFeature());
public static final FlowersFeature<NoFeatureConfig> WILDFLOWER_FEATURE = register("wildflower_feature", new WildflowerFeature());
public static final FlowersFeature<NoFeatureConfig> POPPY_FEATURE = register("poppy_feature", new PoppyFeature());
public static final BlockClusterFeatureConfig CHERRY_BLOSSOM_GROVE_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(BOPBlocks.pink_daffodil.defaultBlockState(), 1).add(Blocks.LILY_OF_THE_VALLEY.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig CONIFEROUS_FOREST_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(Blocks.CORNFLOWER.defaultBlockState(), 1).add(Blocks.OXEYE_DAISY.defaultBlockState(), 1).add(Blocks.POPPY.defaultBlockState(), 1).add(Blocks.DANDELION.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig EXTENDED_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(Blocks.OXEYE_DAISY.defaultBlockState(), 1).add(Blocks.POPPY.defaultBlockState(), 1).add(Blocks.DANDELION.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig FLOWER_MEADOW_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(Blocks.PINK_TULIP.defaultBlockState(), 1).add(Blocks.RED_TULIP.defaultBlockState(), 1).add(Blocks.WHITE_TULIP.defaultBlockState(), 1).add(Blocks.ORANGE_TULIP.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig MEADOW_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(Blocks.LILY_OF_THE_VALLEY.defaultBlockState(), 1).add(Blocks.AZURE_BLUET.defaultBlockState(), 1).add(Blocks.POPPY.defaultBlockState(), 1).add(Blocks.DANDELION.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig MOOR_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(Blocks.ALLIUM.defaultBlockState(), 1).add(BOPBlocks.violet.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig MYSTIC_GROVE_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(BOPBlocks.glowflower.defaultBlockState(), 1).add(BOPBlocks.pink_daffodil.defaultBlockState(), 1).add(Blocks.LILY_OF_THE_VALLEY.defaultBlockState(), 1).add(Blocks.AZURE_BLUET.defaultBlockState(), 1).add(Blocks.ALLIUM.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig ORIGIN_VALLEY_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(BOPBlocks.rose.defaultBlockState(), 6).add(Blocks.DANDELION.defaultBlockState(), 4), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig RAINBOW_HILLS_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(BOPBlocks.orange_cosmos.defaultBlockState(), 1).add(BOPBlocks.pink_daffodil.defaultBlockState(), 1).add(Blocks.LILY_OF_THE_VALLEY.defaultBlockState(), 1).add(Blocks.AZURE_BLUET.defaultBlockState(), 1).add(Blocks.ALLIUM.defaultBlockState(), 1).add(Blocks.CORNFLOWER.defaultBlockState(), 1).add(Blocks.POPPY.defaultBlockState(), 1).add(Blocks.DANDELION.defaultBlockState(), 1).add(Blocks.BLUE_ORCHID.defaultBlockState(), 1).add(Blocks.PINK_TULIP.defaultBlockState(), 1).add(Blocks.RED_TULIP.defaultBlockState(), 1).add(Blocks.WHITE_TULIP.defaultBlockState(), 1).add(Blocks.ORANGE_TULIP.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig RAINFOREST_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(BOPBlocks.orange_cosmos.defaultBlockState(), 1).add(Blocks.POPPY.defaultBlockState(), 1).add(Blocks.DANDELION.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig SNOWY_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(BOPBlocks.violet.defaultBlockState(), 1).add(Blocks.POPPY.defaultBlockState(), 1).add(Blocks.DANDELION.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig TROPICS_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(BOPBlocks.pink_hibiscus.defaultBlockState(), 1).add(Blocks.POPPY.defaultBlockState(), 1).add(Blocks.DANDELION.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
public static final BlockClusterFeatureConfig WETLAND_FLOWER_CONFIG = (new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).add(Blocks.BLUE_ORCHID.defaultBlockState(), 1).add(Blocks.POPPY.defaultBlockState(), 1).add(Blocks.DANDELION.defaultBlockState(), 1), SimpleBlockPlacer.INSTANCE)).tries(64).build();
//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));

View file

@ -1,33 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class CherryBlossomGroveFlowersFeature extends DefaultFlowersFeatureNoConfig
{
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(2);
switch(j)
{
case 0:
return BOPBlocks.pink_daffodil.defaultBlockState();
case 1:
default:
return Blocks.LILY_OF_THE_VALLEY.defaultBlockState();
}
}
}

View file

@ -1,36 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class ConiferousForestFlowersFeature extends DefaultFlowersFeatureNoConfig
{
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(4);
switch(j)
{
case 0:
return Blocks.CORNFLOWER.defaultBlockState();
case 1:
return Blocks.OXEYE_DAISY.defaultBlockState();
case 2:
return Blocks.POPPY.defaultBlockState();
case 3:
default:
return Blocks.DANDELION.defaultBlockState();
}
}
}

View file

@ -1,41 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.gen.feature.FlowersFeature;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public abstract class DefaultFlowersFeatureNoConfig extends FlowersFeature<NoFeatureConfig>
{
public DefaultFlowersFeatureNoConfig()
{
super(NoFeatureConfig.CODEC.stable());
}
@Override
public boolean isValid(IWorld world, BlockPos p_225559_2_, NoFeatureConfig config)
{
return true;
}
@Override
public int getCount(NoFeatureConfig config)
{
return 64;
}
@Override
public BlockPos getPos(Random random, BlockPos pos, NoFeatureConfig config)
{
return pos.offset(random.nextInt(7) - random.nextInt(7), random.nextInt(3) - random.nextInt(3), random.nextInt(7) - random.nextInt(7));
}
}

View file

@ -1,34 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class ExtendedFlowersFeature extends DefaultFlowersFeatureNoConfig
{
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(3);
switch(j)
{
case 0:
return Blocks.OXEYE_DAISY.defaultBlockState();
case 1:
return Blocks.POPPY.defaultBlockState();
case 2:
default:
return Blocks.DANDELION.defaultBlockState();
}
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class FlowerMeadowFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.ORANGE_TULIP, Blocks.WHITE_TULIP, Blocks.PINK_TULIP, Blocks.RED_TULIP};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class LavenderFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.lavender};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class MeadowFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.LILY_OF_THE_VALLEY, Blocks.AZURE_BLUET, Blocks.DANDELION, Blocks.POPPY};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,33 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class MoorFlowersFeature extends DefaultFlowersFeatureNoConfig
{
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(2);
switch(j)
{
case 0:
return BOPBlocks.violet.defaultBlockState();
case 1:
default:
return Blocks.ALLIUM.defaultBlockState();
}
}
}

View file

@ -1,32 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class MysticGroveFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.glowflower, BOPBlocks.pink_daffodil, Blocks.OXEYE_DAISY, Blocks.LILY_OF_THE_VALLEY, Blocks.ALLIUM};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class OminousWoodsFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.WITHER_ROSE};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class OrangeCosmosFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.orange_cosmos};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class OriginFlowersFeature extends DefaultFlowersFeatureNoConfig
{
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
return p_202355_1_.nextFloat() > 0.6666667F ? Blocks.DANDELION.defaultBlockState() : BOPBlocks.rose.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class PoppyFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.POPPY};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,32 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class RainbowHillsFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.pink_daffodil, BOPBlocks.orange_cosmos, Blocks.ALLIUM, Blocks.AZURE_BLUET, Blocks.ORANGE_TULIP, Blocks.PINK_TULIP, Blocks.RED_TULIP, Blocks.WHITE_TULIP, Blocks.CORNFLOWER, Blocks.LILY_OF_THE_VALLEY, Blocks.BLUE_ORCHID, Blocks.OXEYE_DAISY, Blocks.DANDELION, Blocks.POPPY};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,35 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class RainforestFlowersFeature extends DefaultFlowersFeatureNoConfig
{
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(3);
switch(j)
{
case 0:
return BOPBlocks.orange_cosmos.defaultBlockState();
case 1:
return Blocks.POPPY.defaultBlockState();
case 2:
default:
return Blocks.DANDELION.defaultBlockState();
}
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class ShrublandFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.ALLIUM};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,35 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class SnowyFlowersFeature extends DefaultFlowersFeatureNoConfig
{
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
int j = p_202355_1_.nextInt(3);
switch(j)
{
case 0:
return BOPBlocks.violet.defaultBlockState();
case 1:
return Blocks.POPPY.defaultBlockState();
case 2:
default:
return Blocks.DANDELION.defaultBlockState();
}
}
}

View file

@ -1,32 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class TropicsFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.pink_hibiscus, Blocks.DANDELION, Blocks.POPPY};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class VioletFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.violet};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class WastelandFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.wilted_lily};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.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.NoFeatureConfig;
import java.util.Random;
public class WetlandFlowersFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{Blocks.BLUE_ORCHID, Blocks.DANDELION, Blocks.POPPY};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* 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.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
public class WildflowerFeature extends DefaultFlowersFeatureNoConfig
{
private static final Block[] FLOWERS = new Block[]{BOPBlocks.wildflower};
@Override
public BlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_, NoFeatureConfig config)
{
double d0 = MathHelper.clamp((1.0D + Biome.BIOME_INFO_NOISE.getValue((double)p_202355_2_.getX() / 48.0D, (double)p_202355_2_.getZ() / 48.0D, false)) / 2.0D, 0.0D, 0.9999D);
Block block = FLOWERS[(int)(d0 * (double)FLOWERS.length)];
return block.defaultBlockState();
}
}