diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java index 0a09edf60..3c093899a 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java @@ -32,6 +32,7 @@ public class BOPBiomes public static Optional grove = Optional.empty(); public static Optional highland = Optional.empty(); public static Optional lavender_field = Optional.empty(); + public static Optional lush_grassland = Optional.empty(); public static Optional lush_swamp = Optional.empty(); public static Optional mangrove = Optional.empty(); public static Optional maple_woods = Optional.empty(); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BayouBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/BayouBiome.java index c08a8b867..e87d9c74f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BayouBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BayouBiome.java @@ -52,7 +52,7 @@ public class BayouBiome extends BiomeBOP { public BayouBiome() { - super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.SWAMP).depth(-0.2F).scale(-0.05F).temperature(0.95F).downfall(0.9F).waterColor(0x62AF6E).waterFogColor(0x0C2116).parent((String)null)); + super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.SWAMP).depth(-0.215F).scale(-0.05F).temperature(0.95F).downfall(0.9F).waterColor(0x62AF6E).waterFogColor(0x0C2116).parent((String)null)); // Mineshafts and Strongholds this.addStructure(Feature.SWAMP_HUT, new SwampHutConfig()); @@ -91,8 +91,8 @@ public class BayouBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.TALL_GRASS.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(6))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.LARGE_FERN.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(12))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.reed), TWICE_SURFACE, new FrequencyConfig(5))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(7))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(14))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(8))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(15))); 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(50))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/ChaparralBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/ChaparralBiome.java index 5f21a14f6..15f135733 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/ChaparralBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/ChaparralBiome.java @@ -32,8 +32,6 @@ import net.minecraft.world.gen.feature.SphereReplaceConfig; import net.minecraft.world.gen.feature.structure.MineshaftConfig; import net.minecraft.world.gen.feature.structure.MineshaftStructure; import net.minecraft.world.gen.feature.structure.StrongholdConfig; -import net.minecraft.world.gen.feature.structure.VillageConfig; -import net.minecraft.world.gen.feature.structure.VillagePieces; import net.minecraft.world.gen.placement.AtSurfaceWithExtraConfig; import net.minecraft.world.gen.placement.CountRangeConfig; import net.minecraft.world.gen.placement.DepthAverageConfig; @@ -50,7 +48,6 @@ public class ChaparralBiome extends BiomeBOP super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(BOPBiomeFeatures.CHAPARRAL_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS).depth(1.1F).scale(0.3F).temperature(0.8F).downfall(0.45F).waterColor(4159204).waterFogColor(329011).parent((String)null)); // Mineshafts and Strongholds - this.addStructure(Feature.VILLAGE, new VillageConfig(0, VillagePieces.Type.OAK)); this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)); this.addStructure(Feature.STRONGHOLD, new StrongholdConfig()); @@ -81,8 +78,8 @@ public class ChaparralBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.GRAVEL, 6, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(1))); // Vegetation - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.TWIGLET_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.5F}, BOPBiomeFeatures.BUSH, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(12, 0.3F, 1))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.MEADOW_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(17))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.TWIGLET_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.1F}, BOPBiomeFeatures.BUSH, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(12, 0.3F, 1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.CHAPARRAL_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(17))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(8))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.bush), TWICE_SURFACE, new FrequencyConfig(6))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/ConiferousForestBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/ConiferousForestBiome.java index 07037ecf2..8dcc2191c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/ConiferousForestBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/ConiferousForestBiome.java @@ -82,7 +82,7 @@ public class ConiferousForestBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.GRAVEL, 7, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(3))); // Vegetation - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.CONIFEROUS_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.33333334F}, BOPBiomeFeatures.CONIFEROUS_TREE_LARGE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(10, 0.1F, 1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.FIR_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.33333334F}, BOPBiomeFeatures.FIR_TREE_LARGE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(10, 0.1F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(Feature.DEFAULT_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(2))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new FernGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(4))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.reed), TWICE_SURFACE, new FrequencyConfig(5))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/DeadForestBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/DeadForestBiome.java index dbe79a047..a683d1935 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/DeadForestBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/DeadForestBiome.java @@ -83,7 +83,7 @@ public class DeadForestBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.GRAVEL, 6, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(1))); // Vegetation - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.DYING_TREE, BOPBiomeFeatures.DEAD_TREE, BOPBiomeFeatures.TALL_SPRUCE_TREE, BOPBiomeFeatures.SMALL_DEAD_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.5F, 0.1F, 0.3F, 0.4F}, BOPBiomeFeatures.OAK_TREE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(2, 0.5F, 1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.DYING_TREE, BOPBiomeFeatures.DEAD_TREE, BOPBiomeFeatures.TALL_SPRUCE_TREE, BOPBiomeFeatures.SMALL_DEAD_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.35F, 0.1F, 0.3F, 0.3F}, BOPBiomeFeatures.OAK_TREE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(2, 0.5F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(3))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.PUMPKIN, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(32))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/FloodplainBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/FloodplainBiome.java index c17b29056..3103df6a2 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/FloodplainBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/FloodplainBiome.java @@ -59,7 +59,8 @@ public class FloodplainBiome extends BiomeBOP // Lakes this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(1))); - + this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(2))); + // Underground this.addFeature(GenerationStage.Decoration.UNDERGROUND_STRUCTURES, createCompositeFeature(Feature.DUNGEONS, IFeatureConfig.NO_FEATURE_CONFIG, DUNGEON_ROOM, new DungeonRoomConfig(8))); this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIRT.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 256))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/LushGrasslandBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/LushGrasslandBiome.java new file mode 100644 index 000000000..df774c142 --- /dev/null +++ b/src/main/java/biomesoplenty/common/biome/overworld/LushGrasslandBiome.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * 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.block.BOPBlocks; +import biomesoplenty.api.enums.BOPClimates; +import biomesoplenty.common.biome.BiomeBOP; +import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures; +import biomesoplenty.common.world.gen.feature.StandardGrassFeature; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; +import net.minecraft.init.Fluids; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.gen.GenerationStage; +import net.minecraft.world.gen.feature.BushConfig; +import net.minecraft.world.gen.feature.DoublePlantConfig; +import net.minecraft.world.gen.feature.Feature; +import net.minecraft.world.gen.feature.IFeatureConfig; +import net.minecraft.world.gen.feature.LakesConfig; +import net.minecraft.world.gen.feature.LiquidsConfig; +import net.minecraft.world.gen.feature.MinableConfig; +import net.minecraft.world.gen.feature.ProbabilityConfig; +import net.minecraft.world.gen.feature.RandomDefaultFeatureListConfig; +import net.minecraft.world.gen.feature.SeaGrassConfig; +import net.minecraft.world.gen.feature.structure.JunglePyramidConfig; +import net.minecraft.world.gen.feature.structure.MineshaftConfig; +import net.minecraft.world.gen.feature.structure.MineshaftStructure; +import net.minecraft.world.gen.feature.structure.StrongholdConfig; +import net.minecraft.world.gen.feature.structure.VillageConfig; +import net.minecraft.world.gen.feature.structure.VillagePieces; +import net.minecraft.world.gen.placement.AtSurfaceWithExtraConfig; +import net.minecraft.world.gen.placement.ChanceConfig; +import net.minecraft.world.gen.placement.CountRangeConfig; +import net.minecraft.world.gen.placement.DepthAverageConfig; +import net.minecraft.world.gen.placement.DungeonRoomConfig; +import net.minecraft.world.gen.placement.FrequencyConfig; +import net.minecraft.world.gen.placement.IPlacementConfig; +import net.minecraft.world.gen.placement.LakeChanceConfig; +import net.minecraft.world.gen.surfacebuilders.CompositeSurfaceBuilder; + +public class LushGrasslandBiome extends BiomeBOP +{ + public LushGrasslandBiome() + { + super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS).depth(0.2F).scale(0.2F).temperature(0.95F).downfall(0.9F).waterColor(4159204).waterFogColor(329011).parent((String)null)); + + // Mineshafts and Strongholds + this.addStructure(Feature.VILLAGE, new VillageConfig(0, VillagePieces.Type.OAK)); + this.addStructure(Feature.JUNGLE_PYRAMID, new JunglePyramidConfig()); + this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)); + this.addStructure(Feature.STRONGHOLD, new StrongholdConfig()); + + this.addCarver(GenerationStage.Carving.AIR, createWorldCarverWrapper(CAVE_WORLD_CARVER, new ProbabilityConfig(0.14285715F))); + this.addCarver(GenerationStage.Carving.AIR, createWorldCarverWrapper(CANYON_WORLD_CARVER, new ProbabilityConfig(0.02F))); + + this.addStructureFeatures(); + + // Lakes + this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(4))); + this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.LAVA), LAVA_LAKE, new LakeChanceConfig(80))); + + // Dungeons + this.addFeature(GenerationStage.Decoration.UNDERGROUND_STRUCTURES, createCompositeFeature(Feature.DUNGEONS, IFeatureConfig.NO_FEATURE_CONFIG, DUNGEON_ROOM, new DungeonRoomConfig(8))); + + // Ores + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIRT.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 256))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GRAVEL.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(8, 0, 0, 256))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GRANITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIORITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.ANDESITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.COAL_ORE.getDefaultState(), 17), COUNT_RANGE, new CountRangeConfig(20, 0, 0, 128))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.IRON_ORE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(20, 0, 0, 64))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GOLD_ORE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(2, 0, 0, 32))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.REDSTONE_ORE.getDefaultState(), 8), COUNT_RANGE, new CountRangeConfig(8, 0, 0, 16))); + this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIAMOND_ORE.getDefaultState(), 8), COUNT_RANGE, new CountRangeConfig(1, 0, 0, 16))); + 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.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(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(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))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.REED, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(20))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.SEA_GRASS, new SeaGrassConfig(64, 0.6D), TOP_SOLID_ONCE, IPlacementConfig.NO_PLACEMENT_CONFIG)); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.LAVA), HEIGHT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256))); + this.addFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, createCompositeFeature(Feature.ICE_AND_SNOW, IFeatureConfig.NO_FEATURE_CONFIG, PASSTHROUGH, IPlacementConfig.NO_PLACEMENT_CONFIG)); + + // Entity spawning + this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4)); + this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4)); + this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4)); + this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.COW, 8, 4, 4)); + this.addSpawn(EnumCreatureType.AMBIENT, new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8)); + this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4)); + this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4)); + this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1)); + this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4)); + this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4)); + this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4)); + this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4)); + this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1)); + + this.addWeight(BOPClimates.TROPICAL, 7); + } +} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/LushSwampBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/LushSwampBiome.java index 36ce588c5..ed0f96c2a 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/LushSwampBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/LushSwampBiome.java @@ -87,9 +87,9 @@ public class LushSwampBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BIG_RED_MUSHROOM, IFeatureConfig.NO_FEATURE_CONFIG, AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.5F, 0.1F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.LUSH_SWAMP_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(5))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(8))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(5))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(8))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.TALL_GRASS.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(5))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(10))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(15))); 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.BUSH, new BushConfig(BOPBlocks.toadstool), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(2))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/MarshBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/MarshBiome.java index fe04f0661..428b6387b 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/MarshBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/MarshBiome.java @@ -58,7 +58,8 @@ public class MarshBiome extends BiomeBOP // Lakes this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(1))); - + this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(1))); + // Underground this.addFeature(GenerationStage.Decoration.UNDERGROUND_STRUCTURES, createCompositeFeature(Feature.DUNGEONS, IFeatureConfig.NO_FEATURE_CONFIG, DUNGEON_ROOM, new DungeonRoomConfig(8))); this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIRT.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 256))); @@ -77,7 +78,7 @@ public class MarshBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(10))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.TALL_GRASS.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(50))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.SEA_GRASS, new SeaGrassConfig(64, 0.6D), TOP_SOLID_ONCE, IPlacementConfig.NO_PLACEMENT_CONFIG)); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.reed), TWICE_SURFACE, new FrequencyConfig(7))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.reed), TWICE_SURFACE, new FrequencyConfig(3))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.watergrass), TWICE_SURFACE, new FrequencyConfig(50))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.LAVA), HEIGHT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/MireBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/MireBiome.java index 18d087f4a..dec2b4e26 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/MireBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/MireBiome.java @@ -89,8 +89,8 @@ public class MireBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.DARK_OAK_TWIGLET_TREE, BOPBiomeFeatures.TALL_TWIGLET_TREE, BOPBiomeFeatures.DEAD_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.8F, 0.4F, 0.1F}, BOPBiomeFeatures.DYING_TREE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(3, 0.2F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BIG_BROWN_MUSHROOM, IFeatureConfig.NO_FEATURE_CONFIG, AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.9F, 0.1F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(5))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(6))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(12))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(5))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(10))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.reed), TWICE_SURFACE, new FrequencyConfig(5))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.BROWN_MUSHROOM), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(15))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.RED_MUSHROOM), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(8))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/MoorBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/MoorBiome.java index f01841471..6d145c55f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/MoorBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/MoorBiome.java @@ -86,9 +86,10 @@ public class MoorBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.INFESTED_STONE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(7, 0, 0, 64))); // Vegetation - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(BOPBiomeFeatures.JACARANDA_TWIGLET_TREE, IFeatureConfig.NO_FEATURE_CONFIG, AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(1, 0.1F, 1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(BOPBiomeFeatures.SCRUB, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(35))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(BOPBiomeFeatures.HEATH, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(25))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(15))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.MOOR_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(12))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.MOOR_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(5))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.TALL_GRASS.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(9))); 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))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java index 27f32e9bb..ca5af98cf 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java @@ -60,7 +60,7 @@ public class MysticGroveBiome extends BiomeBOP this.addStructureFeatures(); // Lakes - this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(4))); + this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(3))); // Underground this.addFeature(GenerationStage.Decoration.UNDERGROUND_STRUCTURES, createCompositeFeature(Feature.DUNGEONS, IFeatureConfig.NO_FEATURE_CONFIG, DUNGEON_ROOM, new DungeonRoomConfig(8))); @@ -94,11 +94,6 @@ public class MysticGroveBiome extends BiomeBOP // Entity spawning this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.RABBIT, 4, 2, 3)); this.addSpawn(EnumCreatureType.AMBIENT, new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8)); - this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4)); - this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4)); - this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1)); - this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4)); - this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4)); this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4)); this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 15, 1, 1)); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/OvergrownCliffsBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/OvergrownCliffsBiome.java index 1525915b6..1cb0e5134 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/OvergrownCliffsBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/OvergrownCliffsBiome.java @@ -112,7 +112,7 @@ public class OvergrownCliffsBiome extends BiomeBOP this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1)); this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.OCELOT, 2, 1, 1)); - this.addWeight(BOPClimates.TROPICAL, 3); + this.addWeight(BOPClimates.TROPICAL, 1); this.setBeachBiome((Biome)null); this.canSpawnInBiome = false; } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/ScrublandBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/ScrublandBiome.java index 422c58a55..0c461f2d8 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/ScrublandBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/ScrublandBiome.java @@ -79,10 +79,10 @@ public class ScrublandBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.GRAVEL, 6, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(1))); // Vegetation - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.SPRUCE_TWIGLET_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.1F}, BOPBiomeFeatures.ACACIA_TWIGLET, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(5, 0.3F, 1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.SPRUCE_TWIGLET_TREE, BOPBiomeFeatures.TALL_TWIGLET_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.3F, 0.1F}, BOPBiomeFeatures.ACACIA_TWIGLET, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(5, 0.5F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(10))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(BOPBiomeFeatures.SCRUB, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(25))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.TALL_GRASS.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(7))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.XERIC_SHRUBLAND_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(4))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.LAVA), HEIGHT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256))); this.addFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, createCompositeFeature(Feature.ICE_AND_SNOW, IFeatureConfig.NO_FEATURE_CONFIG, PASSTHROUGH, IPlacementConfig.NO_PLACEMENT_CONFIG)); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/ShieldBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/ShieldBiome.java index 17ccdfb21..0ee2e2ec1 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/ShieldBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/ShieldBiome.java @@ -23,6 +23,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.feature.BushConfig; +import net.minecraft.world.gen.feature.DoublePlantConfig; import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.IFeatureConfig; import net.minecraft.world.gen.feature.LakesConfig; @@ -88,6 +89,8 @@ public class ShieldBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(8))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.reed), TWICE_SURFACE, new FrequencyConfig(5))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.watergrass), TWICE_SURFACE, new FrequencyConfig(5))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(5))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(10))); 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.BUSH, new BushConfig(BOPBlocks.toadstool), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(3))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/SnowyConiferousForestBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/SnowyConiferousForestBiome.java index 577d146da..a2e67a555 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/SnowyConiferousForestBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/SnowyConiferousForestBiome.java @@ -80,7 +80,7 @@ public class SnowyConiferousForestBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.GRAVEL, 7, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(3))); // Vegetation - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.CONIFEROUS_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.33333334F}, BOPBiomeFeatures.CONIFEROUS_TREE_LARGE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(6, 0.1F, 1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.FIR_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.33333334F}, BOPBiomeFeatures.FIR_TREE_LARGE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(6, 0.1F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.SNOWY_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(2))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new FernGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(3))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.BROWN_MUSHROOM), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(4))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/TemperateRainforestBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/TemperateRainforestBiome.java index 39cdc3554..bae590d0a 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/TemperateRainforestBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/TemperateRainforestBiome.java @@ -89,8 +89,8 @@ public class TemperateRainforestBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new FernGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(10))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.LARGE_FERN.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(15))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.reed), TWICE_SURFACE, new FrequencyConfig(10))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(5))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(10))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(10))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(20))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(Feature.DEFAULT_FLOWERS, 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))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/WastelandBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/WastelandBiome.java index 817bfd55b..15b22d73c 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/WastelandBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/WastelandBiome.java @@ -75,7 +75,7 @@ public class WastelandBiome 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.DEAD_TREE_WASTELAND}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.2F}, BOPBiomeFeatures.DYING_TREE_WASTELAND, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.5F, 0.1F, 1))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.DEAD_TREE_WASTELAND}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.2F}, BOPBiomeFeatures.DYING_TREE_WASTELAND, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.75F, 0.1F, 1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.WASTELAND_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new WastelandGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(2))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256))); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/WetlandBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/WetlandBiome.java index 5b03392ce..aac750c8b 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/WetlandBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/WetlandBiome.java @@ -92,8 +92,8 @@ public class WetlandBiome extends BiomeBOP this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new FernGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(16))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.reed), TWICE_SURFACE, new FrequencyConfig(10))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.watergrass), TWICE_SURFACE, new FrequencyConfig(10))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(10))); - this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(20))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(BOPBlocks.tall_cattail.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(15))); + this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.cattail), TWICE_SURFACE, new FrequencyConfig(30))); 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.BUSH, new BushConfig(BOPBlocks.toadstool), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(6))); diff --git a/src/main/java/biomesoplenty/common/block/trees/FirTree.java b/src/main/java/biomesoplenty/common/block/trees/FirTree.java index eb3a768b5..89f5dd07c 100644 --- a/src/main/java/biomesoplenty/common/block/trees/FirTree.java +++ b/src/main/java/biomesoplenty/common/block/trees/FirTree.java @@ -14,12 +14,12 @@ public class FirTree extends AbstractTree @Nullable protected AbstractTreeFeature getTreeFeature(Random random) { - return BOPBiomeFeatures.CONIFEROUS_TREE; + return BOPBiomeFeatures.FIR_TREE; } @Nullable protected AbstractTreeFeature getBigTreeFeature(Random random) { - return BOPBiomeFeatures.CONIFEROUS_TREE_LARGE; + return BOPBiomeFeatures.FIR_TREE_LARGE; } } \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java index 428e1e0ec..f5bb5522c 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPBiomeFeatures.java @@ -16,6 +16,7 @@ import biomesoplenty.common.world.gen.feature.tree.PalmTreeFeature; import biomesoplenty.common.world.gen.feature.tree.PoplarTreeFeature; import biomesoplenty.common.world.gen.feature.tree.RedwoodTreeFeature; import biomesoplenty.common.world.gen.feature.tree.TaigaTreeFeature; +import biomesoplenty.common.world.gen.feature.tree.TrunkTreeFeature; import biomesoplenty.common.world.gen.feature.tree.TwigletTreeFeature; import net.minecraft.block.BlockLeaves; import net.minecraft.init.Blocks; @@ -28,83 +29,109 @@ import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig; public class BOPBiomeFeatures { - public static final AbstractTreeFeature CONIFEROUS_TREE = new TaigaTreeFeature.Builder().log(BOPBlocks.fir_log.getDefaultState()).leaves(BOPBlocks.fir_leaves.getDefaultState()).minHeight(5).maxHeight(28).create(); - public static final AbstractTreeFeature CONIFEROUS_TREE_LARGE = new TaigaTreeFeature.Builder().log(BOPBlocks.fir_log.getDefaultState()).leaves(BOPBlocks.fir_leaves.getDefaultState()).minHeight(20).maxHeight(40).trunkWidth(2).create(); - public static final AbstractTreeFeature UMBRAN_TREE = new TaigaTreeFeature.Builder().log(BOPBlocks.umbran_log.getDefaultState()).leaves(BOPBlocks.umbran_leaves.getDefaultState()).maxHeight(20).create(); - public static final AbstractTreeFeature TALL_UMBRAN_TREE = new TaigaTreeFeature.Builder().log(BOPBlocks.umbran_log.getDefaultState()).leaves(BOPBlocks.umbran_leaves.getDefaultState()).minHeight(20).maxHeight(30).trunkWidth(2).create(); - public static final AbstractTreeFeature SEQUOIA_TREE = new TaigaTreeFeature.Builder().log(BOPBlocks.redwood_log.getDefaultState()).leaves(BOPBlocks.redwood_leaves.getDefaultState()).minHeight(5).maxHeight(15).create(); - public static final AbstractTreeFeature SEQUOIA_TREE_LARGE = new TaigaTreeFeature.Builder().log(BOPBlocks.redwood_log.getDefaultState()).leaves(BOPBlocks.redwood_leaves.getDefaultState()).minHeight(20).maxHeight(35).create(); + //Standard Trees public static final AbstractTreeFeature OAK_TREE = new BasicTreeFeature.Builder().create(); - public static final AbstractTreeFeature BIG_OAK_TREE = new BigTreeFeature.Builder().create(); - public static final AbstractTreeFeature COBWEB_BUSH = new BushTreeFeature.Builder().maxHeight(2).altLeaves(Blocks.COBWEB.getDefaultState()).create(); - public static final AbstractTreeFeature FULL_COBWEB_BUSH = new BushTreeFeature.Builder().maxHeight(2).leaves(Blocks.COBWEB.getDefaultState()).create(); - public static final AbstractTreeFeature SMALL_DEAD_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).create(); - public static final AbstractTreeFeature SILK_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).altLeaves(Blocks.COBWEB.getDefaultState()).create(); - public static final AbstractTreeFeature FULL_SILK_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.dead_log.getDefaultState()).leaves(Blocks.COBWEB.getDefaultState()).create(); + public static final AbstractTreeFeature SMALL_JUNGLE_TREE = new BasicTreeFeature.Builder().maxHeight(9).log(Blocks.JUNGLE_LOG.getDefaultState()).leaves(Blocks.JUNGLE_LEAVES.getDefaultState()).trunkFruit(Blocks.COCOA.getDefaultState()).create(); public static final AbstractTreeFeature ORIGIN_TREE = new BasicTreeFeature.Builder().leaves(BOPBlocks.origin_leaves.getDefaultState()).minHeight(5).maxHeight(8).create(); - public static final AbstractTreeFeature BIG_ORIGIN_TREE = new BigTreeFeature.Builder().leaves(BOPBlocks.origin_leaves.getDefaultState()).create(); - public static final AbstractTreeFeature MAGIC_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.magic_log.getDefaultState()).leaves(BOPBlocks.magic_leaves.getDefaultState()).create(); - public static final AbstractTreeFeature BIG_MAGIC_TREE = new BigTreeFeature.Builder().log(BOPBlocks.magic_log.getDefaultState()).leaves(BOPBlocks.magic_leaves.getDefaultState()).create(); - public static final AbstractTreeFeature GIANT_TREE = new BigTreeFeature.Builder().log(Blocks.DARK_OAK_LOG.getDefaultState()).leaves(Blocks.DARK_OAK_LEAVES.getDefaultState().with(BlockLeaves.PERSISTENT, true)).minHeight(25).maxHeight(30).trunkWidth(4).create(); - public static final AbstractTreeFeature JACARANDA_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.jacaranda_log.getDefaultState()).leaves(BOPBlocks.jacaranda_leaves.getDefaultState()).create(); public static final AbstractTreeFeature FLOWERING_OAK_TREE = new BasicTreeFeature.Builder().altLeaves(BOPBlocks.flowering_oak_leaves.getDefaultState()).create(); - public static final AbstractTreeFeature BIG_FLOWERING_OAK_TREE = new BigTreeFeature.Builder().altLeaves(BOPBlocks.flowering_oak_leaves.getDefaultState()).create(); - public static final AbstractTreeFeature DEAD_TREE = new BigTreeFeature.Builder().maxHeight(12).log(BOPBlocks.dead_log.getDefaultState()).leaves(Blocks.AIR.getDefaultState()).foliageHeight(0).create(); - public static final AbstractTreeFeature DYING_TREE = new BigTreeFeature.Builder().maxHeight(12).log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).foliageHeight(1).create(); - public static final AbstractTreeFeature SPARSE_OAK_TREE = new BigTreeFeature.Builder().minHeight(7).maxHeight(12).foliageHeight(1).create(); - public static final AbstractTreeFeature DEAD_TREE_WASTELAND = new BigTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.dried_sand).maxHeight(12).log(BOPBlocks.dead_log.getDefaultState()).leaves(Blocks.AIR.getDefaultState()).foliageHeight(0).create(); - public static final AbstractTreeFeature DYING_TREE_WASTELAND = new BigTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.dried_sand).maxHeight(12).log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).foliageHeight(1).create(); public static final AbstractTreeFeature YELLOW_AUTUMN_TREE = new BasicTreeFeature.Builder().log(Blocks.BIRCH_LOG.getDefaultState()).leaves(BOPBlocks.yellow_autumn_leaves.getDefaultState()).minHeight(5).maxHeight(8).create(); - public static final AbstractTreeFeature YELLOW_POPLAR_TREE = new PoplarTreeFeature.Builder().log(Blocks.BIRCH_LOG.getDefaultState()).leaves(BOPBlocks.yellow_autumn_leaves.getDefaultState()).minHeight(10).maxHeight(18).create(); public static final AbstractTreeFeature ORANGE_AUTUMN_TREE = new BasicTreeFeature.Builder().log(Blocks.DARK_OAK_LOG.getDefaultState()).leaves(BOPBlocks.orange_autumn_leaves.getDefaultState()).minHeight(5).maxHeight(8).create(); public static final AbstractTreeFeature MAPLE_TREE = new BasicTreeFeature.Builder().leaves(BOPBlocks.maple_leaves.getDefaultState()).minHeight(5).maxHeight(10).create(); public static final AbstractTreeFeature PINK_CHERRY_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.cherry_log.getDefaultState()).leaves(BOPBlocks.pink_cherry_leaves.getDefaultState()).create(); public static final AbstractTreeFeature WHITE_CHERRY_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.cherry_log.getDefaultState()).leaves(BOPBlocks.white_cherry_leaves.getDefaultState()).create(); + public static final AbstractTreeFeature JACARANDA_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.jacaranda_log.getDefaultState()).leaves(BOPBlocks.jacaranda_leaves.getDefaultState()).create(); + public static final AbstractTreeFeature SMALL_DEAD_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).create(); + public static final AbstractTreeFeature SILK_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).altLeaves(Blocks.COBWEB.getDefaultState()).create(); + public static final AbstractTreeFeature FULL_SILK_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.dead_log.getDefaultState()).leaves(Blocks.COBWEB.getDefaultState()).create(); + public static final AbstractTreeFeature MAGIC_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.magic_log.getDefaultState()).leaves(BOPBlocks.magic_leaves.getDefaultState()).create(); + + + //Big Trees + public static final AbstractTreeFeature BIG_OAK_TREE = new BigTreeFeature.Builder().create(); + public static final AbstractTreeFeature BIG_ORIGIN_TREE = new BigTreeFeature.Builder().leaves(BOPBlocks.origin_leaves.getDefaultState()).create(); + public static final AbstractTreeFeature BIG_FLOWERING_OAK_TREE = new BigTreeFeature.Builder().altLeaves(BOPBlocks.flowering_oak_leaves.getDefaultState()).create(); public static final AbstractTreeFeature BIG_PINK_CHERRY_TREE = new BigTreeFeature.Builder().log(BOPBlocks.cherry_log.getDefaultState()).leaves(BOPBlocks.pink_cherry_leaves.getDefaultState()).create(); public static final AbstractTreeFeature BIG_WHITE_CHERRY_TREE = new BigTreeFeature.Builder().log(BOPBlocks.cherry_log.getDefaultState()).leaves(BOPBlocks.white_cherry_leaves.getDefaultState()).create(); - public static final AbstractTreeFeature TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(1).maxHeight(2).create(); - public static final AbstractTreeFeature DEAD_TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(1).maxHeight(1).leaves(BOPBlocks.dead_leaves.getDefaultState()).log(BOPBlocks.dead_log.getDefaultState()).create(); - public static final AbstractTreeFeature MAPLE_TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(1).maxHeight(2).leaves(BOPBlocks.maple_leaves.getDefaultState()).create(); - public static final AbstractTreeFeature JACARANDA_TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(1).maxHeight(2).leaves(BOPBlocks.jacaranda_leaves.getDefaultState()).log(BOPBlocks.jacaranda_log.getDefaultState()).create(); - public static final AbstractTreeFeature ACACIA_BUSH = new BushTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.RED_SAND).log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).maxHeight(2).create(); - public static final AbstractTreeFeature ACACIA_TWIGLET_TREE = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.RED_SAND).log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).create(); - public static final AbstractTreeFeature ACACIA_TWIGLET_SMALL = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.SAND).log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create(); - public static final AbstractTreeFeature ACACIA_TWIGLET = new TwigletTreeFeature.Builder().log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create(); - public static final AbstractTreeFeature SPRUCE_TWIGLET_TREE = new TwigletTreeFeature.Builder().log(Blocks.SPRUCE_LOG.getDefaultState()).leaves(Blocks.SPRUCE_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create(); - public static final AbstractTreeFeature DARK_OAK_TWIGLET_TREE = new TwigletTreeFeature.Builder().log(Blocks.DARK_OAK_LOG.getDefaultState()).leaves(Blocks.DARK_OAK_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create(); - public static final AbstractTreeFeature TALL_TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(2).maxHeight(4).create(); - public static final AbstractTreeFeature OAK_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.OAK_LOG.getDefaultState()).leaves(Blocks.OAK_LEAVES.getDefaultState()).create(); - public static final AbstractTreeFeature BIRCH_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.BIRCH_LOG.getDefaultState()).leaves(Blocks.BIRCH_LEAVES.getDefaultState()).create(); - public static final AbstractTreeFeature DARK_OAK_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.DARK_OAK_LOG.getDefaultState()).leaves(Blocks.DARK_OAK_LEAVES.getDefaultState()).create(); - public static final AbstractTreeFeature SPRUCE_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.SPRUCE_LOG.getDefaultState()).leaves(Blocks.SPRUCE_LEAVES.getDefaultState()).create(); - public static final AbstractTreeFeature MAHOGANY_TREE = new MahoganyTreeFeature.Builder().create(); + public static final AbstractTreeFeature BIG_MAGIC_TREE = new BigTreeFeature.Builder().log(BOPBlocks.magic_log.getDefaultState()).leaves(BOPBlocks.magic_leaves.getDefaultState()).create(); + + public static final AbstractTreeFeature GIANT_TREE = new BigTreeFeature.Builder().log(Blocks.DARK_OAK_LOG.getDefaultState()).leaves(Blocks.DARK_OAK_LEAVES.getDefaultState().with(BlockLeaves.PERSISTENT, true)).minHeight(25).maxHeight(30).trunkWidth(4).create(); + + //Conifer Trees public static final AbstractTreeFeature TALL_SPRUCE_TREE = new TaigaTreeFeature.Builder().log(Blocks.SPRUCE_LOG.getDefaultState()).leaves(Blocks.SPRUCE_LEAVES.getDefaultState()).maxHeight(13).create(); public static final AbstractTreeFeature ALPS_SPRUCE_TREE = new TaigaTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.STONE).log(Blocks.SPRUCE_LOG.getDefaultState()).leaves(Blocks.SPRUCE_LEAVES.getDefaultState()).maxHeight(13).create(); + public static final AbstractTreeFeature FIR_TREE = new TaigaTreeFeature.Builder().log(BOPBlocks.fir_log.getDefaultState()).leaves(BOPBlocks.fir_leaves.getDefaultState()).minHeight(5).maxHeight(28).create(); + public static final AbstractTreeFeature FIR_TREE_LARGE = new TaigaTreeFeature.Builder().log(BOPBlocks.fir_log.getDefaultState()).leaves(BOPBlocks.fir_leaves.getDefaultState()).minHeight(20).maxHeight(40).trunkWidth(2).create(); + public static final AbstractTreeFeature SEQUOIA_TREE = new TaigaTreeFeature.Builder().log(BOPBlocks.redwood_log.getDefaultState()).leaves(BOPBlocks.redwood_leaves.getDefaultState()).minHeight(5).maxHeight(15).create(); + public static final AbstractTreeFeature SEQUOIA_TREE_LARGE = new TaigaTreeFeature.Builder().log(BOPBlocks.redwood_log.getDefaultState()).leaves(BOPBlocks.redwood_leaves.getDefaultState()).minHeight(20).maxHeight(35).create(); + public static final AbstractTreeFeature UMBRAN_TREE = new TaigaTreeFeature.Builder().log(BOPBlocks.umbran_log.getDefaultState()).leaves(BOPBlocks.umbran_leaves.getDefaultState()).maxHeight(20).create(); + public static final AbstractTreeFeature TALL_UMBRAN_TREE = new TaigaTreeFeature.Builder().log(BOPBlocks.umbran_log.getDefaultState()).leaves(BOPBlocks.umbran_leaves.getDefaultState()).minHeight(20).maxHeight(30).trunkWidth(2).create(); + + //Poplar Trees + public static final AbstractTreeFeature OAK_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.OAK_LOG.getDefaultState()).leaves(Blocks.OAK_LEAVES.getDefaultState()).create(); + public static final AbstractTreeFeature SPRUCE_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.SPRUCE_LOG.getDefaultState()).leaves(Blocks.SPRUCE_LEAVES.getDefaultState()).create(); + public static final AbstractTreeFeature BIRCH_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.BIRCH_LOG.getDefaultState()).leaves(Blocks.BIRCH_LEAVES.getDefaultState()).create(); + public static final AbstractTreeFeature DARK_OAK_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.DARK_OAK_LOG.getDefaultState()).leaves(Blocks.DARK_OAK_LEAVES.getDefaultState()).create(); + public static final AbstractTreeFeature YELLOW_POPLAR_TREE = new PoplarTreeFeature.Builder().log(Blocks.BIRCH_LOG.getDefaultState()).leaves(BOPBlocks.yellow_autumn_leaves.getDefaultState()).minHeight(10).maxHeight(18).create(); + + //Swamp Trees public static final AbstractTreeFeature SWAMP_TREE = new BasicTreeFeature.Builder().vine(Blocks.VINE.getDefaultState()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leavesOffset(0).create(); public static final AbstractTreeFeature WILLOW_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.willow_log.getDefaultState()).leaves(BOPBlocks.willow_leaves.getDefaultState()).vine(BOPBlocks.willow_vine.getDefaultState()).minHeight(6).maxHeight(10).maxLeavesRadius(2).leavesOffset(0).create(); public static final AbstractTreeFeature TALL_WILLOW_TREE = new BasicTreeFeature.Builder().log(BOPBlocks.willow_log.getDefaultState()).leaves(BOPBlocks.willow_leaves.getDefaultState()).vine(BOPBlocks.willow_vine.getDefaultState()).minHeight(10).maxHeight(16).maxLeavesRadius(2).leavesOffset(0).create(); + + //Sparse Trees + public static final AbstractTreeFeature SPARSE_OAK_TREE = new BigTreeFeature.Builder().minHeight(7).maxHeight(12).foliageHeight(1).create(); + public static final AbstractTreeFeature DYING_TREE = new BigTreeFeature.Builder().maxHeight(12).log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).foliageHeight(1).create(); + public static final AbstractTreeFeature DYING_TREE_WASTELAND = new BigTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.dried_sand).maxHeight(12).log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).foliageHeight(1).create(); + + //Bushes/Twiglets public static final AbstractTreeFeature BUSH = new BushTreeFeature.Builder().maxHeight(2).create(); - public static final AbstractTreeFeature PALM_TREE = new PalmTreeFeature.Builder().create(); - public static final AbstractTreeFeature JUNGLE_TWIGLET_TREE = new TwigletTreeFeature.Builder().log(Blocks.JUNGLE_LOG.getDefaultState()).leaves(Blocks.JUNGLE_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).trunkFruit(Blocks.COCOA.getDefaultState()).create(); + public static final AbstractTreeFeature ACACIA_BUSH = new BushTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.RED_SAND).log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).maxHeight(2).create(); public static final AbstractTreeFeature FLOWERING_BUSH = new BushTreeFeature.Builder().altLeaves(BOPBlocks.flowering_oak_leaves.getDefaultState()).maxHeight(2).create(); + public static final AbstractTreeFeature COBWEB_BUSH = new BushTreeFeature.Builder().maxHeight(2).altLeaves(Blocks.COBWEB.getDefaultState()).create(); + public static final AbstractTreeFeature FULL_COBWEB_BUSH = new BushTreeFeature.Builder().maxHeight(2).leaves(Blocks.COBWEB.getDefaultState()).create(); + + public static final AbstractTreeFeature TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(1).maxHeight(2).create(); + public static final AbstractTreeFeature TALL_TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(2).maxHeight(4).create(); + public static final AbstractTreeFeature SPRUCE_TWIGLET_TREE = new TwigletTreeFeature.Builder().log(Blocks.SPRUCE_LOG.getDefaultState()).leaves(Blocks.SPRUCE_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create(); + public static final AbstractTreeFeature JUNGLE_TWIGLET_TREE = new TwigletTreeFeature.Builder().log(Blocks.JUNGLE_LOG.getDefaultState()).leaves(Blocks.JUNGLE_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).trunkFruit(Blocks.COCOA.getDefaultState()).create(); public static final AbstractTreeFeature OASIS_JUNGLE_TWIGLET_TREE = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.SAND).log(Blocks.JUNGLE_LOG.getDefaultState()).leaves(Blocks.JUNGLE_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).trunkFruit(Blocks.COCOA.getDefaultState()).create(); + public static final AbstractTreeFeature DARK_OAK_TWIGLET_TREE = new TwigletTreeFeature.Builder().log(Blocks.DARK_OAK_LOG.getDefaultState()).leaves(Blocks.DARK_OAK_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create(); + public static final AbstractTreeFeature ACACIA_TWIGLET_TREE = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.RED_SAND).log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).create(); + public static final AbstractTreeFeature ACACIA_TWIGLET_SMALL = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.SAND).log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create(); + public static final AbstractTreeFeature ACACIA_TWIGLET = new TwigletTreeFeature.Builder().log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create(); + public static final AbstractTreeFeature MAPLE_TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(1).maxHeight(2).leaves(BOPBlocks.maple_leaves.getDefaultState()).create(); + public static final AbstractTreeFeature DEAD_TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(1).maxHeight(1).leaves(BOPBlocks.dead_leaves.getDefaultState()).log(BOPBlocks.dead_log.getDefaultState()).create(); + + //Special Trees public static final AbstractTreeFeature REDWOOD_TREE = new RedwoodTreeFeature.Builder().create(); public static final AbstractTreeFeature REDWOOD_TREE_MEDIUM = new RedwoodTreeFeature.Builder().minHeight(25).maxHeight(40).trunkWidth(2).create(); public static final AbstractTreeFeature REDWOOD_TREE_LARGE = new RedwoodTreeFeature.Builder().minHeight(45).maxHeight(60).trunkWidth(3).create(); - public static final AbstractTreeFeature DEAD_TREE_VOLCANO = new BigTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRAVEL).maxHeight(12).log(BOPBlocks.dead_log.getDefaultState()).leaves(Blocks.AIR.getDefaultState()).foliageHeight(0).create(); + public static final AbstractTreeFeature MAHOGANY_TREE = new MahoganyTreeFeature.Builder().create(); + public static final AbstractTreeFeature PALM_TREE = new PalmTreeFeature.Builder().create(); + public static final AbstractTreeFeature DEAD_TREE = new TrunkTreeFeature.Builder().log(BOPBlocks.dead_log.getDefaultState()).leaves(Blocks.AIR.getDefaultState()).create(); + public static final AbstractTreeFeature DEAD_TREE_WASTELAND = new TrunkTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.dried_sand).log(BOPBlocks.dead_log.getDefaultState()).leaves(Blocks.AIR.getDefaultState()).create(); + public static final AbstractTreeFeature DEAD_TREE_VOLCANO = new TrunkTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRAVEL).log(BOPBlocks.dead_log.getDefaultState()).leaves(Blocks.AIR.getDefaultState()).create(); public static final AbstractTreeFeature DYING_TREE_VOLCANO = new BigTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.GRAVEL).maxHeight(12).log(BOPBlocks.dead_log.getDefaultState()).leaves(BOPBlocks.dead_leaves.getDefaultState()).foliageHeight(1).create(); + + ///////////////////////////////////////////////////////////////////////////////// + //Features public static final Feature SPLOTCH = new SplotchFeature(); public static final Feature BRAMBLE = new BrambleFeature(); public static final Feature MANGROVE = new MangroveFeature(); public static final Feature PUMPKIN_PATCH = new PumpkinPatchFeature(); public static final Feature BIG_PUMPKIN = new BigPumpkinFeature(); + public static final Feature SCRUB = new ScrubFeature(); + public static final Feature HEATH = new HeathFeature(); + //Flowers + public static final AbstractFlowersFeature CHAPARRAL_FLOWERS = new ChaparralFlowersFeature(); public static final AbstractFlowersFeature CHERRY_BLOSSOM_GROVE_FLOWERS = new CherryBlossomGroveFlowersFeature(); public static final AbstractFlowersFeature EXTENDED_FLOWERS = new ExtendedFlowersFeature(); public static final AbstractFlowersFeature FLOWER_MEADOW_FLOWERS = new FlowerMeadowFlowersFeature(); public static final AbstractFlowersFeature JUNGLE_FLOWERS = new JungleFlowersFeature(); public static final AbstractFlowersFeature LAVENDER_FLOWERS = new LavenderFlowersFeature(); + public static final AbstractFlowersFeature LUSH_GRASSLAND_FLOWERS = new LushGrasslandFlowersFeature(); public static final AbstractFlowersFeature LUSH_SWAMP_FLOWERS = new LushSwampFlowersFeature(); public static final AbstractFlowersFeature MEADOW_FLOWERS = new MeadowFlowersFeature(); public static final AbstractFlowersFeature MOOR_FLOWERS = new MoorFlowersFeature(); @@ -119,6 +146,7 @@ public class BOPBiomeFeatures public static final AbstractFlowersFeature WETLAND_FLOWERS = new WetlandFlowersFeature(); public static final AbstractFlowersFeature XERIC_SHRUBLAND_FLOWERS = new XericShrublandFlowersFeature(); + //Surfaces public static final ISurfaceBuilder BOG_SURFACE_BUILDER = new BogSurfaceBuilder(); public static final ISurfaceBuilder BRUSHLAND_SURFACE_BUILDER = new BrushlandSurfaceBuilder(); public static final ISurfaceBuilder CHAPARRAL_SURFACE_BUILDER = new ChaparralSurfaceBuilder(); diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/ChaparralFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/ChaparralFlowersFeature.java new file mode 100644 index 000000000..0b1df6c1d --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/ChaparralFlowersFeature.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * 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 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 ChaparralFlowersFeature extends AbstractFlowersFeature +{ + private static final Block[] FLOWERS = new Block[]{BOPBlocks.wildflower, Blocks.AZURE_BLUET, 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 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/HeathFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/HeathFeature.java new file mode 100644 index 000000000..26cf39a1a --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/HeathFeature.java @@ -0,0 +1,34 @@ +package biomesoplenty.common.world.gen.feature; + +import java.util.Random; + +import biomesoplenty.api.block.BOPBlocks; +import net.minecraft.block.BlockLeaves; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorld; +import net.minecraft.world.gen.IChunkGenSettings; +import net.minecraft.world.gen.IChunkGenerator; +import net.minecraft.world.gen.feature.Feature; +import net.minecraft.world.gen.feature.NoFeatureConfig; + +public class HeathFeature extends Feature +{ + public boolean place(IWorld p_212245_1_, IChunkGenerator p_212245_2_, Random p_212245_3_, BlockPos p_212245_4_, NoFeatureConfig p_212245_5_) + { + int i = 0; + + for(int j = 0; j < 64; ++j) + { + BlockPos blockpos = p_212245_4_.add(p_212245_3_.nextInt(8) - p_212245_3_.nextInt(8), p_212245_3_.nextInt(4) - p_212245_3_.nextInt(4), p_212245_3_.nextInt(8) - p_212245_3_.nextInt(8)); + if (p_212245_1_.getBlockState(blockpos).canBeReplacedByLeaves(p_212245_1_, blockpos) && p_212245_1_.getBlockState(blockpos.down()).getBlock() == Blocks.GRASS_BLOCK) + { + p_212245_1_.setBlockState(blockpos, BOPBlocks.jacaranda_leaves.getDefaultState().with(BlockLeaves.PERSISTENT, true), 2); + + ++i; + } + } + + return i > 0; + } +} \ 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 new file mode 100644 index 000000000..3e1675444 --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/LushGrasslandFlowersFeature.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * 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 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 LushGrasslandFlowersFeature extends AbstractFlowersFeature +{ + 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/MysticGroveFlowersFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/MysticGroveFlowersFeature.java index 7eab3a1ad..d34b4fd1b 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/MysticGroveFlowersFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/MysticGroveFlowersFeature.java @@ -20,7 +20,7 @@ import net.minecraft.world.gen.feature.AbstractFlowersFeature; public class MysticGroveFlowersFeature extends AbstractFlowersFeature { - private static final Block[] FLOWERS = new Block[]{BOPBlocks.blue_hydrangea, BOPBlocks.glowflower, BOPBlocks.pink_daffodil, Blocks.OXEYE_DAISY}; + private static final Block[] FLOWERS = new Block[]{BOPBlocks.blue_hydrangea, BOPBlocks.glowflower, BOPBlocks.pink_daffodil, Blocks.OXEYE_DAISY, Blocks.ALLIUM}; public IBlockState getRandomFlower(Random p_202355_1_, BlockPos p_202355_2_) { diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/ScrubFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/ScrubFeature.java new file mode 100644 index 000000000..fcddebf87 --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/ScrubFeature.java @@ -0,0 +1,33 @@ +package biomesoplenty.common.world.gen.feature; + +import java.util.Random; + +import net.minecraft.block.BlockLeaves; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorld; +import net.minecraft.world.gen.IChunkGenSettings; +import net.minecraft.world.gen.IChunkGenerator; +import net.minecraft.world.gen.feature.Feature; +import net.minecraft.world.gen.feature.NoFeatureConfig; + +public class ScrubFeature extends Feature +{ + public boolean place(IWorld p_212245_1_, IChunkGenerator p_212245_2_, Random p_212245_3_, BlockPos p_212245_4_, NoFeatureConfig p_212245_5_) + { + int i = 0; + + for(int j = 0; j < 64; ++j) + { + BlockPos blockpos = p_212245_4_.add(p_212245_3_.nextInt(8) - p_212245_3_.nextInt(8), p_212245_3_.nextInt(4) - p_212245_3_.nextInt(4), p_212245_3_.nextInt(8) - p_212245_3_.nextInt(8)); + if (p_212245_1_.getBlockState(blockpos).canBeReplacedByLeaves(p_212245_1_, blockpos) && p_212245_1_.getBlockState(blockpos.down()).getBlock() == Blocks.GRASS_BLOCK) + { + p_212245_1_.setBlockState(blockpos, Blocks.OAK_LEAVES.getDefaultState().with(BlockLeaves.PERSISTENT, true), 2); + + ++i; + } + } + + return i > 0; + } +} \ 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 diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/tree/BigTreeFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/tree/BigTreeFeature.java index b01ec352d..7b6385711 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/tree/BigTreeFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/tree/BigTreeFeature.java @@ -490,9 +490,18 @@ public class BigTreeFeature extends TreeFeatureBase { BlockPos startPos = this.origin.down(); - for (int x = 0; x <= trunkWidth - 1; x++) + int start = 0; + int end = trunkWidth - 1; + + if (trunkWidth == 4) { - for (int z = 0; z <= trunkWidth - 1; z++) + start = -1; + end = trunkWidth - 2; + } + + for (int x = start; x <= end; x++) + { + for (int z = start; z <= end; z++) { if (!this.placeOn.matches(world, startPos.add(x,0,z))) { diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/tree/TrunkTreeFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/tree/TrunkTreeFeature.java new file mode 100644 index 000000000..530938bff --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/tree/TrunkTreeFeature.java @@ -0,0 +1,112 @@ +/******************************************************************************* + * 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.tree; + +import java.util.Random; +import java.util.Set; + +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.common.util.biome.GeneratorUtil; +import biomesoplenty.common.util.block.IBlockPosQuery; +import net.minecraft.block.Block; +import net.minecraft.block.BlockLeaves; +import net.minecraft.block.BlockSapling; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorld; + +public class TrunkTreeFeature extends TreeFeatureBase +{ + public static class Builder extends BuilderBase + { + public Builder() + { + this.minHeight = 6; + this.maxHeight = 9; + } + + @Override + public TrunkTreeFeature create() + { + return new TrunkTreeFeature(this.updateNeighbours, this.placeOn, this.replace, this.log, this.leaves, this.altLeaves, this.vine, this.hanging, this.trunkFruit, this.minHeight, this.maxHeight); + } + + } + + protected TrunkTreeFeature(boolean notify, IBlockPosQuery placeOn, IBlockPosQuery replace, IBlockState log, IBlockState leaves, IBlockState altLeaves, IBlockState vine, IBlockState hanging, IBlockState trunkFruit, int minHeight, int maxHeight) + { + super(notify, placeOn, replace, log, leaves, altLeaves, vine, hanging, trunkFruit, minHeight, maxHeight); + } + + @Override + protected boolean place(Set changedBlocks, IWorld world, Random random, BlockPos startPos) + { + // Move down until we reach the ground + while (startPos.getY() > 1 && world.isAirBlock(startPos) || world.getBlockState(startPos).getMaterial() == Material.LEAVES) {startPos = startPos.down();} + + if (!this.placeOn.matches(world, startPos)) + { + // Abandon if we can't place the tree on this block + return false; + } + + // Generation settings + int height = GeneratorUtil.nextIntBetween(random, this.minHeight, this.maxHeight); + int leavesRadius = 2; + int heightMinusTop = height - leavesRadius - 1; + + // Move up to space above ground + BlockPos pos = startPos.up(); + + if (!this.checkSpace(world, pos, height, 1)) + { + // Abandon if there isn't enough room + return false; + } + + // Generate trunk of tree (trunk only) + for(int step = 0; step <= heightMinusTop; step++) + { + BlockPos offsetPos = pos.up(step); + + if (step == heightMinusTop) + { + // Generate top of tree + this.setLog(changedBlocks, world, offsetPos); + break; + } + + this.setLog(changedBlocks, world, offsetPos); + } + + return true; + } + + public boolean checkSpace(IWorld world, BlockPos pos, int height, int radius) + { + for (int y = 0; y <= height; y++) + { + for (int x = -radius; x <= radius; x++) + { + for (int z = -radius; z <= radius; z++) + { + BlockPos pos1 = pos.add(x, y, z); + // note, there may be a sapling on the first layer - make sure this.replace matches it! + if (pos1.getY() >= 255 || !this.replace.matches(world, pos1)) + { + return false; + } + } + } + } + return true; + } +} diff --git a/src/main/java/biomesoplenty/init/ModBiomes.java b/src/main/java/biomesoplenty/init/ModBiomes.java index 5913f7de8..59322e886 100644 --- a/src/main/java/biomesoplenty/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/init/ModBiomes.java @@ -43,6 +43,7 @@ import biomesoplenty.common.biome.overworld.OrchardBiome; import biomesoplenty.common.biome.overworld.HighlandBiome; import biomesoplenty.common.biome.overworld.MoorBiome; import biomesoplenty.common.biome.overworld.LavenderFieldBiome; +import biomesoplenty.common.biome.overworld.LushGrasslandBiome; import biomesoplenty.common.biome.overworld.LushSwampBiome; import biomesoplenty.common.biome.overworld.MangroveBiome; import biomesoplenty.common.biome.overworld.MapleWoodsBiome; @@ -131,6 +132,7 @@ public class ModBiomes orchard = registerBiome(new OrchardBiome(), "orchard"); highland = registerBiome(new HighlandBiome(), "highland"); lavender_field = registerBiome(new LavenderFieldBiome(), "lavender_field"); + lush_grassland = registerBiome(new LushGrasslandBiome(), "lush_grassland"); lush_swamp = registerBiome(new LushSwampBiome(), "lush_swamp"); mangrove = registerBiome(new MangroveBiome(), "mangrove"); maple_woods = registerBiome(new MapleWoodsBiome(), "maple_woods"); @@ -212,6 +214,7 @@ public class ModBiomes registerBiomeToDictionary(BOPBiomes.grove, Type.FOREST, Type.PLAINS, Type.LUSH, Type.SPARSE); registerBiomeToDictionary(BOPBiomes.highland, Type.MOUNTAIN, Type.HILLS, Type.WET); registerBiomeToDictionary(BOPBiomes.lavender_field, Type.PLAINS, Type.MAGICAL, Type.LUSH); + registerBiomeToDictionary(BOPBiomes.lush_grassland, Type.JUNGLE, Type.PLAINS, Type.HILLS, Type.WET, Type.HOT, Type.LUSH); registerBiomeToDictionary(BOPBiomes.lush_swamp, Type.SWAMP, Type.LUSH, Type.WET, Type.DENSE); registerBiomeToDictionary(BOPBiomes.mangrove, Type.WATER, Type.WET, Type.DENSE, Type.LUSH); registerBiomeToDictionary(BOPBiomes.maple_woods, Type.FOREST, Type.CONIFEROUS, Type.COLD, Type.DENSE); diff --git a/src/main/resources/assets/biomesoplenty/lang/en_us.json b/src/main/resources/assets/biomesoplenty/lang/en_us.json index a69a626ec..ec45f7cfe 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_us.json +++ b/src/main/resources/assets/biomesoplenty/lang/en_us.json @@ -45,6 +45,7 @@ "biome.biomesoplenty.grove": "Grove", "biome.biomesoplenty.highland": "Highland", "biome.biomesoplenty.lavender_field": "Lavender Field", + "biome.biomesoplenty.lush_grassland": "Lush Grassland", "biome.biomesoplenty.lush_swamp": "Lush Swamp", "biome.biomesoplenty.mangrove": "Mangrove", "biome.biomesoplenty.maple_woods": "Maple Woods",