diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java index 0cadd8eec..ed4194873 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java @@ -20,6 +20,7 @@ public class BOPBiomes public static RegistryKey bamboo_blossom_grove = register("bamboo_blossom_grove"); public static RegistryKey bayou = register("bayou"); public static RegistryKey bayou_mangrove = register("bayou_mangrove"); + public static RegistryKey burnt_forest = register("burnt_forest"); public static RegistryKey cherry_blossom_grove = register("cherry_blossom_grove"); public static RegistryKey coniferous_forest = register("coniferous_forest"); public static RegistryKey coniferous_lakes = register("coniferous_lakes"); @@ -80,7 +81,6 @@ public class BOPBiomes public static RegistryKey tundra = register("tundra"); public static RegistryKey tundra_basin = register("tundra_basin"); public static RegistryKey tundra_bog = register("tundra_bog"); - public static RegistryKey volcanic_forest = register("volcanic_forest"); public static RegistryKey volcanic_plains = register("volcanic_plains"); public static RegistryKey volcano = register("volcano"); public static RegistryKey wasteland = register("wasteland"); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/VolcanicForestBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/BurntForestBiome.java similarity index 77% rename from src/main/java/biomesoplenty/common/biome/overworld/VolcanicForestBiome.java rename to src/main/java/biomesoplenty/common/biome/overworld/BurntForestBiome.java index e6ebfd94c..947b73d28 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/VolcanicForestBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BurntForestBiome.java @@ -8,6 +8,7 @@ package biomesoplenty.common.biome.overworld; import biomesoplenty.api.biome.BOPBiomes; +import biomesoplenty.api.enums.BOPClimates; import biomesoplenty.common.biome.BiomeTemplate; import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures; import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilders; @@ -18,27 +19,28 @@ import net.minecraft.world.biome.*; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.feature.Features; import net.minecraft.world.gen.feature.structure.StructureFeatures; +import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders; -public class VolcanicForestBiome extends BiomeTemplate +public class BurntForestBiome extends BiomeTemplate { - public VolcanicForestBiome() + public BurntForestBiome() { - this.setRiverBiome(null); - this.setBeachBiome(BOPBiomes.volcanic_plains); + this.setBeachBiome(BOPBiomes.gravel_beach); + this.setGrassColorFunction(this::getGrassColor); } @Override protected void configureBiome(Biome.Builder builder) { - builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.NONE).depth(1.5F).scale(0.2F).temperature(0.95F).downfall(0.3F); + builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.TAIGA).depth(0.1F).scale(0.1F).temperature(0.3F).downfall(0.3F); - builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4566514).waterFogColor(267827).fogColor(0xA0A0A0).skyColor(calculateSkyColor(0.95F)).grassColorOverride(0x4A703B).foliageColorOverride(0x547D42).ambientParticle(new ParticleEffectAmbience(ParticleTypes.WHITE_ASH, 0.0295233335F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); + builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(12638463).skyColor(calculateSkyColor(0.3F)).grassColorOverride(0xBAAD64).foliageColorOverride(0xB7B763).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); } @Override protected void configureGeneration(BiomeGenerationSettings.Builder builder) { - builder.surfaceBuilder(BOPConfiguredSurfaceBuilders.VOLCANIC_PLAINS); + builder.surfaceBuilder(ConfiguredSurfaceBuilders.GRASS); // Structures DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder); @@ -56,13 +58,12 @@ public class VolcanicForestBiome extends BiomeTemplate //////////////////////////////////////////////////////////// // Vegetation - builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.VOLCANIC_FOREST_TREES); + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.BURNT_FOREST_TREES); + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.BLACK_SAND_SPLATTER); builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.DEAD_GRASS_25); - builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.SPROUTS_10); - builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.VOLCANO_MAGMA_SPLATTER); - builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.VOLCANO_SPRING); - builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.PATCH_DEAD_BUSH_2); + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.STANDARD_GRASS_3); + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.MAGMA_SPLATTER); //////////////////////////////////////////////////////////// @@ -84,4 +85,10 @@ public class VolcanicForestBiome extends BiomeTemplate builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4)); builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITCH, 5, 1, 1)); } + + public int getGrassColor(double x, double z) + { + double d0 = Biome.BIOME_INFO_NOISE.getValue(x * 0.0225D, z * 0.0225D, false); + return d0 < -0.2D ? 0xBAAD64 : 0x3F3D36; + } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java index 4606dc483..74c5a31b7 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/MysticGroveBiome.java @@ -35,7 +35,7 @@ public class MysticGroveBiome extends BiomeTemplate { builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.FOREST).depth(0.1F).scale(0.1F).temperature(0.7F).downfall(0.8F); - builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x9C3FE4).waterFogColor(0x2E0533).fogColor(0xFFC9DA).skyColor(0xAAEFFF).grassColorOverride(0x69CFDB).foliageColorOverride(0x70E0B5).ambientParticle(new ParticleEffectAmbience(ParticleTypes.SOUL_FIRE_FLAME, 0.00011532552F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); + builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x9C3FE4).waterFogColor(0x2E0533).fogColor(0xFFC9DA).skyColor(0xAAEFFF).grassColorOverride(0x69CFDB).foliageColorOverride(0x70E0B5).ambientParticle(new ParticleEffectAmbience(ParticleTypes.END_ROD, 0.00011532552F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/MysticPlainsBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/MysticPlainsBiome.java index bfdd56e9d..50268dd62 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/MysticPlainsBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/MysticPlainsBiome.java @@ -34,7 +34,7 @@ public class MysticPlainsBiome extends BiomeTemplate { builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.FOREST).depth(0.0F).scale(-0.05F).temperature(0.7F).downfall(0.8F); - builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x9C3FE4).waterFogColor(0x2E0533).fogColor(0xFFC9DA).skyColor(0xAAEFFF).grassColorOverride(0x69CFDB).foliageColorOverride(0x70E0B5).ambientParticle(new ParticleEffectAmbience(ParticleTypes.SOUL_FIRE_FLAME, 0.00011532552F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); + builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x9C3FE4).waterFogColor(0x2E0533).fogColor(0xFFC9DA).skyColor(0xAAEFFF).grassColorOverride(0x69CFDB).foliageColorOverride(0x70E0B5).ambientParticle(new ParticleEffectAmbience(ParticleTypes.END_ROD, 0.00011532552F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/WastelandBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/WastelandBiome.java index 478afa142..c74d9eaff 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/WastelandBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/WastelandBiome.java @@ -14,6 +14,7 @@ import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilde import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityType; +import net.minecraft.particles.ParticleTypes; import net.minecraft.world.biome.*; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.feature.structure.StructureFeatures; @@ -34,7 +35,7 @@ public class WastelandBiome extends BiomeTemplate { builder.precipitation(Biome.RainType.NONE).biomeCategory(Biome.Category.DESERT).depth(0.0F).scale(-0.11F).temperature(2.0F).downfall(0.0F); - builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x433721).waterFogColor(0x0C0C03).fogColor(0xDBDDC1).skyColor(0x70ADEF).grassColorOverride(0xAD9364).foliageColorOverride(0xB5A76C).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); + builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x433721).waterFogColor(0x0C0C03).fogColor(0xDBDDC1).skyColor(0x70ADEF).grassColorOverride(0xAD9364).foliageColorOverride(0xB5A76C).ambientParticle(new ParticleEffectAmbience(ParticleTypes.MYCELIUM, 0.00357F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); } @Override diff --git a/src/main/java/biomesoplenty/common/biome/overworld/WoodedWastelandBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/WoodedWastelandBiome.java index 833dda5d1..9a7b46c2b 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/WoodedWastelandBiome.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/WoodedWastelandBiome.java @@ -14,6 +14,7 @@ import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilde import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityType; +import net.minecraft.particles.ParticleTypes; import net.minecraft.world.biome.*; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.feature.structure.StructureFeatures; @@ -34,7 +35,7 @@ public class WoodedWastelandBiome extends BiomeTemplate { builder.precipitation(Biome.RainType.NONE).biomeCategory(Biome.Category.DESERT).depth(0.0F).scale(-0.11F).temperature(2.0F).downfall(0.0F); - builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x433721).waterFogColor(0x0C0C03).fogColor(0xDBDDC1).skyColor(0x70ADEF).grassColorOverride(0xAD9364).foliageColorOverride(0xB5A76C).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); + builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x433721).waterFogColor(0x0C0C03).fogColor(0xDBDDC1).skyColor(0x70ADEF).grassColorOverride(0xAD9364).foliageColorOverride(0xB5A76C).ambientParticle(new ParticleEffectAmbience(ParticleTypes.MYCELIUM, 0.00357F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); } @Override diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BOPConfiguredFeatures.java b/src/main/java/biomesoplenty/common/world/gen/feature/BOPConfiguredFeatures.java index 9236aea16..0ddd6fd85 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/BOPConfiguredFeatures.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPConfiguredFeatures.java @@ -111,6 +111,7 @@ public class BOPConfiguredFeatures public static final ConfiguredFeature ALPS_FOOTHILLS_TREES = register("alps_foothills_trees", ALPS_SPRUCE_TREE.decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(2, 0.1F, 1)))); public static final ConfiguredFeature BAMBOO_BLOSSOM_GROVE_TREES = register("bamboo_blossom_grove_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(WHITE_CHERRY_TREE_BEES.weighted(0.05F), PINK_CHERRY_TREE_BEES.weighted(0.05F), BIG_WHITE_CHERRY_TREE.weighted(0.05F), BIG_PINK_CHERRY_TREE.weighted(0.05F), BIG_FLOWERING_OAK_TREE.weighted(0.1F), FLOWERING_BUSH.weighted(0.3F)), FLOWERING_OAK_TREE_BEES)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(7, 0.3F, 1)))); public static final ConfiguredFeature BAYOU_TREES = register("bayou_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(CYPRESS_TREE_MEDIUM.weighted(0.3F)), CYPRESS_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(2, 0.6F, 1)))); + public static final ConfiguredFeature BURNT_FOREST_TREES = register("burnt_forest_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(DEAD_TREE.weighted(0.2F)), BURNT_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(4, 0.4F, 1)))); public static final ConfiguredFeature CHERRY_BLOSSOM_GROVE_TREES = register("cherry_blossom_grove_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(WHITE_CHERRY_TREE_BEES.weighted(0.1F), PINK_CHERRY_TREE_BEES.weighted(0.2F), BIG_WHITE_CHERRY_TREE.weighted(0.3F), FLOWERING_OAK_TREE_BEES.weighted(0.15F), FLOWERING_BUSH.weighted(0.3F)), BIG_PINK_CHERRY_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(5, 0.3F, 1)))); public static final ConfiguredFeature CONIFEROUS_FOREST_TREES = register("coniferous_forest_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(FIR_TREE.weighted(0.33333334F)), FIR_TREE_LARGE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(10, 0.1F, 1)))); public static final ConfiguredFeature CONIFEROUS_LAKES_TREES = register("coniferous_lakes_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(FIR_TREE.weighted(0.1F)), FIR_TREE_SMALL)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(5, 0.1F, 1)))); @@ -158,7 +159,6 @@ public class BOPConfiguredFeatures public static final ConfiguredFeature TUNDRA_TREES = register("tundra_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(DEAD_TWIGLET_TREE_SMALL.weighted(0.1F)), MAPLE_TWIGLET_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(1, 0.3F, 1)))); public static final ConfiguredFeature TUNDRA_BOG_TREES = register("tundra_bog_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(SPRUCE_TWIGLET_TREE.weighted(0.4F), MAPLE_TWIGLET_TREE.weighted(0.6F)), TWIGLET_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(16, 0.4F, 1)))); public static final ConfiguredFeature UNDERGROWTH_TREES = register("undergrowth_trees", HELLBARK_TREE.decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(35))); - public static final ConfiguredFeature VOLCANIC_FOREST_TREES = register("volcanic_forest_trees", BURNT_TREE.decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(4, 0.2F, 1)))); public static final ConfiguredFeature VOLCANIC_PLAINS_TREES = register("volcanic_plains_trees", TWIGLET_TREE_VOLCANO.decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(1, 0.1F, 1)))); public static final ConfiguredFeature WASTELAND_TREES = register("wasteland_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(DEAD_TREE_WASTELAND.weighted(0.2F)), DYING_TREE_WASTELAND)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig((int)0.8F, 0.2F, 1)))); public static final ConfiguredFeature WETLAND_TREES = register("wetland_trees", Feature.RANDOM_SELECTOR.configured(new MultipleRandomFeatureConfig(ImmutableList.of(TALL_SPRUCE_TREE.weighted(0.5F)), WILLOW_TREE)).decorated(Features.Placements.HEIGHTMAP_SQUARE).decorated(Placement.COUNT_EXTRA.configured(new AtSurfaceWithExtraConfig(5, 0.1F, 1)))); @@ -293,6 +293,7 @@ public class BOPConfiguredFeatures // Features public static final ConfiguredFeature BIG_PUMPKIN = register("big_pumpkin", BOPFeatures.BIG_PUMPKIN.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(3))); public static final ConfiguredFeature BLACK_SAND_DISK = register("black_sand_disk", Feature.DISK.configured(new SphereReplaceConfig(BOPBlocks.black_sand.defaultBlockState(), FeatureSpread.of(2, 4), 2, ImmutableList.of(Blocks.DIRT.defaultBlockState(), Blocks.GRASS_BLOCK.defaultBlockState()))).decorated(Features.Placements.TOP_SOLID_HEIGHTMAP_SQUARE).count(2)); + public static final ConfiguredFeature BLACK_SAND_SPLATTER = register("black_sand_splatter", BOPFeatures.BLACK_SAND_SPLATTER.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(25))); public static final ConfiguredFeature BONE_SPINE = register("bone_spine", BOPFeatures.BONE_SPINE.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(3))); public static final ConfiguredFeature BRAMBLE = register("bramble", BOPFeatures.BRAMBLE.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(3))); public static final ConfiguredFeature BRAMBLE_EXTRA = register("bramble_extra", BOPFeatures.BRAMBLE.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(10))); @@ -308,6 +309,7 @@ public class BOPConfiguredFeatures public static final ConfiguredFeature HUGE_TOADSTOOL = register("huge_toadstool", BOPFeatures.HUGE_TOADSTOOL.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(1))); public static final ConfiguredFeature LARGE_CRYSTAL = register("large_crystal", BOPFeatures.LARGE_CRYSTAL.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE).decorated(FeatureUtil.denseCount(200))); public static final ConfiguredFeature LAVA_LAKE_COMMON = register("lava_lake_common", Feature.LAKE.configured(new BlockStateFeatureConfig(Blocks.LAVA.defaultBlockState())).decorated(Placement.LAVA_LAKE.configured(new ChanceConfig(10)))); + public static final ConfiguredFeature MAGMA_SPLATTER = register("magma_splatter", BOPFeatures.MAGMA_SPLATTER.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(75))); public static final ConfiguredFeature MUD_DISK = register("mud_disk", Feature.DISK.configured(new SphereReplaceConfig(BOPBlocks.mud.defaultBlockState(), FeatureSpread.of(4, 2), 1, ImmutableList.of(Blocks.DIRT.defaultBlockState(), Blocks.GRASS_BLOCK.defaultBlockState()))).decorated(Features.Placements.TOP_SOLID_HEIGHTMAP_SQUARE).count(5)); public static final ConfiguredFeature MYCELIUM_SPLATTER = register("mycelium_splatter", BOPFeatures.MYCELIUM_SPLATTER.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(14))); public static final ConfiguredFeature NETHER_BRAMBLE = register("nether_bramble", BOPFeatures.BRAMBLE.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(50))); @@ -330,7 +332,6 @@ public class BOPConfiguredFeatures public static final ConfiguredFeature SMALL_RED_MUSHROOM = register("small_red_mushroom", BOPFeatures.SMALL_RED_MUSHROOM.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(1))); public static final ConfiguredFeature SMALL_TOADSTOOL = register("small_toadstool", BOPFeatures.SMALL_TOADSTOOL.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(1))); public static final ConfiguredFeature VOLCANO_GRASS_SPLATTER = register("volcano_grass_splatter", BOPFeatures.GRASS_SPLATTER.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(25))); - public static final ConfiguredFeature VOLCANO_MAGMA_SPLATTER = register("volcano_magma_splatter", BOPFeatures.MAGMA_SPLATTER.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(50))); public static final ConfiguredFeature VOLCANO_SPRING = register("volcano_spring", Feature.SPRING.configured(BOPFeatures.VOLCANO_SPRING_CONFIG).decorated(Placement.RANGE_VERY_BIASED.configured(new TopSolidRangeConfig(8, 16, 256))).squared().count(75)); public static final ConfiguredFeature WATER_LAKE_COMMON = register("water_lake_common", Feature.LAKE.configured(new BlockStateFeatureConfig(Blocks.WATER.defaultBlockState())).decorated(Placement.WATER_LAKE.configured(new ChanceConfig(1)))); public static final ConfiguredFeature WATER_LAKE_UNCOMMON = register("water_lake_uncommon", Feature.LAKE.configured(new BlockStateFeatureConfig(Blocks.WATER.defaultBlockState())).decorated(Placement.WATER_LAKE.configured(new ChanceConfig(3)))); diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BOPFeatures.java b/src/main/java/biomesoplenty/common/world/gen/feature/BOPFeatures.java index dd359bfd3..211b73b18 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/BOPFeatures.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPFeatures.java @@ -110,12 +110,13 @@ public class BOPFeatures public static final Feature PALM_TREE = register("palm_tree", new PalmTreeFeature.Builder().create()); public static final Feature DEAD_TREE = register("dead_tree", new TwigletTreeFeature.Builder().trunkFruit(BOPBlocks.dead_branch.defaultBlockState()).leafChance(0.0F, 0.0F).leaves(Blocks.AIR.defaultBlockState()).log(BOPBlocks.dead_log.defaultBlockState()).minHeight(6).maxHeight(10).create()); public static final Feature DEAD_TREE_WASTELAND = register("dead_tree_wasteland", new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.dried_salt).trunkFruit(BOPBlocks.dead_branch.defaultBlockState()).leafChance(0.0F, 0.0F).leaves(Blocks.AIR.defaultBlockState()).log(BOPBlocks.dead_log.defaultBlockState()).minHeight(6).maxHeight(10).create()); - public static final Feature BURNT_TREE = register("burnt_tree", new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.black_sand).leafChance(0.0F, 0.0F).leaves(Blocks.AIR.defaultBlockState()).log(BOPBlocks.stripped_hellbark_log.defaultBlockState()).minHeight(4).maxHeight(8).create()); + public static final Feature BURNT_TREE = register("burnt_tree", new TwigletTreeFeature.Builder().leafChance(0.0F, 0.0F).leaves(Blocks.AIR.defaultBlockState()).log(BOPBlocks.stripped_hellbark_log.defaultBlockState()).minHeight(4).maxHeight(8).create()); ///////////////////////////////////////////////////////////////////////////////// //Features public static final Feature BIG_PUMPKIN = register("big_pumpkin", new BigPumpkinFeature(NoFeatureConfig.CODEC.stable())); + public static final Feature BLACK_SAND_SPLATTER = register("black_sand_splatter", new BlackSandSplatterFeature(NoFeatureConfig.CODEC.stable())); public static final Feature BONE_SPINE = register("bone_spine", new BoneSpineFeature(NoFeatureConfig.CODEC.stable())); public static final Feature BRAMBLE = register("bramble", new BrambleFeature(NoFeatureConfig.CODEC.stable())); public static final Feature CRAG_SPLATTER = register("crag_splatter", new CragSplatterFeature(NoFeatureConfig.CODEC.stable())); diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/BlackSandSplatterFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/BlackSandSplatterFeature.java new file mode 100644 index 000000000..6e09ae72d --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BlackSandSplatterFeature.java @@ -0,0 +1,60 @@ +package biomesoplenty.common.world.gen.feature; + +import biomesoplenty.api.block.BOPBlocks; +import com.mojang.serialization.Codec; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.ISeedReader; +import net.minecraft.world.gen.ChunkGenerator; +import net.minecraft.world.gen.feature.Feature; +import net.minecraft.world.gen.feature.NoFeatureConfig; + +import java.util.Random; + +public class BlackSandSplatterFeature extends Feature +{ + public BlackSandSplatterFeature(Codec deserializer) + { + super(deserializer); + } + + @Override + public boolean place(ISeedReader worldIn, ChunkGenerator chunkGenerator, Random rand, BlockPos pos, NoFeatureConfig config) + { + int i = 0; + int j = rand.nextInt(2) + 1; + + for (int k = pos.getX() - j; k <= pos.getX() + j; ++k) + { + for (int l = pos.getZ() - j; l <= pos.getZ() + j; ++l) + { + int i1 = k - pos.getX(); + int j1 = l - pos.getZ(); + if (i1 * i1 + j1 * j1 <= j * j) + { + for (int k1 = pos.getY() - 2; k1 <= pos.getY() + 2; ++k1) + { + BlockPos blockpos = new BlockPos(k, k1, l); + BlockState blockstate = worldIn.getBlockState(blockpos); + BlockState blockstate1 = worldIn.getBlockState(blockpos.above()); + + if (blockstate.getBlock() == Blocks.GRASS_BLOCK && blockstate1.isAir(worldIn, blockpos.above())) + { + worldIn.setBlock(blockpos, BOPBlocks.black_sand.defaultBlockState(), 2); + if (rand.nextInt(4) == 0) + { + worldIn.setBlock(blockpos.above(), Blocks.DEAD_BUSH.defaultBlockState(), 2); + } + + ++i; + break; + } + } + } + } + } + + return i > 0; + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/MagmaSplatterFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/MagmaSplatterFeature.java index ae8f7bdc3..3d5ffe4d2 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/MagmaSplatterFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/MagmaSplatterFeature.java @@ -40,11 +40,11 @@ public class MagmaSplatterFeature extends Feature BlockState blockstate = worldIn.getBlockState(blockpos); BlockState blockstate1 = worldIn.getBlockState(blockpos.above()); - if (blockstate.getBlock() == BOPBlocks.black_sand && (blockstate1.canBeReplacedByLeaves(worldIn, blockpos.above()) || blockstate1.getBlock() instanceof BushBlock)) + if (rand.nextInt(6) != 0) { - worldIn.setBlock(blockpos, Blocks.MAGMA_BLOCK.defaultBlockState(), 2); - if (rand.nextInt(3) != 0) + if (blockstate.getBlock() == Blocks.GRASS_BLOCK && (blockstate1.canBeReplacedByLeaves(worldIn, blockpos.above()) || blockstate1.getBlock() instanceof BushBlock)) { + worldIn.setBlock(blockpos, Blocks.MAGMA_BLOCK.defaultBlockState(), 2); worldIn.setBlock(blockpos.above(), Blocks.FIRE.defaultBlockState(), 2); } diff --git a/src/main/java/biomesoplenty/init/ModBiomes.java b/src/main/java/biomesoplenty/init/ModBiomes.java index 99ef8d063..4452c9098 100644 --- a/src/main/java/biomesoplenty/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/init/ModBiomes.java @@ -129,6 +129,7 @@ public class ModBiomes registerBiome(new AlpsBiome(), "alps"); registerBiome(new BambooBlossomGroveBiome(), "bamboo_blossom_grove"); registerBiome(new BayouBiome(), "bayou"); + registerBiome(new BurntForestBiome(), "burnt_forest"); registerBiome(new CherryBlossomGroveBiome(), "cherry_blossom_grove"); registerBiome(new ConiferousForestBiome(), "coniferous_forest"); registerBiome(new ConiferousLakesBiome(), "coniferous_lakes"); @@ -185,7 +186,6 @@ public class ModBiomes registerBiome(new TundraBiome(), "tundra"); registerBiome(new TundraBasinBiome(), "tundra_basin"); registerBiome(new TundraBogBiome(), "tundra_bog"); - registerBiome(new VolcanicForestBiome(), "volcanic_forest"); registerBiome(new VolcanoBiome(), "volcano"); registerBiome(new WastelandBiome(), "wasteland"); registerBiome(new WetlandBiome(), "wetland"); @@ -212,6 +212,7 @@ public class ModBiomes registerSubBiome(coniferous_forest, coniferous_lakes, 1.0F, 100); registerSubBiome(dead_forest, dead_swamp, 0.75F, 100); + registerSubBiome(dead_forest, burnt_forest, 0.75F, 100); registerSubBiome(dryland, dry_boneyard, 0.75F, 100); @@ -261,8 +262,6 @@ public class ModBiomes registerSubBiome(tundra, tundra_basin, 1.5F, 100); registerSubBiome(tundra, tundra_bog, 2.0F, 100); - registerSubBiome(volcano, volcanic_forest, 0.75F, 100); - registerSubBiome(wasteland, wooded_wasteland, 0.85F, 100); registerSubBiome(wetland, wetland_marsh, 1.0F, 100); @@ -327,6 +326,7 @@ public class ModBiomes registerVillagerType(bamboo_blossom_grove, VillagerType.PLAINS); registerVillagerType(bayou, VillagerType.SWAMP); registerVillagerType(bayou_mangrove, VillagerType.SWAMP); + registerVillagerType(burnt_forest, VillagerType.TAIGA); registerVillagerType(cherry_blossom_grove, VillagerType.PLAINS); registerVillagerType(coniferous_forest, VillagerType.TAIGA); registerVillagerType(coniferous_lakes, VillagerType.TAIGA); @@ -386,7 +386,6 @@ public class ModBiomes registerVillagerType(tundra, VillagerType.TAIGA); registerVillagerType(tundra_basin, VillagerType.TAIGA); registerVillagerType(tundra_bog, VillagerType.TAIGA); - registerVillagerType(volcanic_forest, VillagerType.PLAINS); registerVillagerType(volcanic_plains, VillagerType.PLAINS); registerVillagerType(volcano, VillagerType.PLAINS); registerVillagerType(wasteland, VillagerType.DESERT); diff --git a/src/main/resources/assets/biomesoplenty/lang/en_us.json b/src/main/resources/assets/biomesoplenty/lang/en_us.json index f41ad5c25..076cdadcf 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_us.json +++ b/src/main/resources/assets/biomesoplenty/lang/en_us.json @@ -12,6 +12,7 @@ "biome.biomesoplenty.bamboo_blossom_grove": "Bamboo Blossom Grove", "biome.biomesoplenty.bayou": "Bayou", "biome.biomesoplenty.bayou_mangrove": "Bayou Mangrove", + "biome.biomesoplenty.burnt_forest": "Burnt Forest", "biome.biomesoplenty.cherry_blossom_grove": "Cherry Blossom Grove", "biome.biomesoplenty.cold_desert": "Cold Desert", "biome.biomesoplenty.coniferous_forest": "Coniferous Forest", @@ -76,7 +77,6 @@ "biome.biomesoplenty.tundra_bog": "Tundra Bog", "biome.biomesoplenty.undergrowth": "Undergrowth", "biome.biomesoplenty.visceral_heap": "Visceral Heap", - "biome.biomesoplenty.volcanic_forest": "Volcanic Forest", "biome.biomesoplenty.volcanic_plains": "Volcanic Plains", "biome.biomesoplenty.volcano": "Volcano", "biome.biomesoplenty.wasteland": "Wasteland", diff --git a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json index fad4e8dd4..ae42515ea 100644 --- a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json +++ b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json @@ -44,6 +44,12 @@ "conditions": { "biome": "biomesoplenty:bayou_mangrove" } + }, + "burnt_forest": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:burnt_forest" + } }, "cherry_blossom_grove": { "trigger": "minecraft:location", @@ -423,12 +429,6 @@ "biome": "biomesoplenty:visceral_heap" } }, - "volcanic_forest": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:volcanic_forest" - } - }, "volcanic_plains": { "trigger": "minecraft:location", "conditions": { diff --git a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json index 7ef00ed86..5f859928b 100644 --- a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json +++ b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json @@ -43,6 +43,12 @@ "conditions": { "biome": "biomesoplenty:bayou_mangrove" } + }, + "burnt_forest": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:burnt_forest" + } }, "cherry_blossom_grove": { "trigger": "minecraft:location", @@ -422,12 +428,6 @@ "biome": "biomesoplenty:visceral_heap" } }, - "volcanic_forest": { - "trigger": "minecraft:location", - "conditions": { - "biome": "biomesoplenty:volcanic_forest" - } - }, "volcanic_plains": { "trigger": "minecraft:location", "conditions": { @@ -484,6 +484,7 @@ "bamboo_blossom_grove", "bayou", "bayou_mangrove", + "burnt_forest", "cherry_blossom_grove", "coniferous_forest", "coniferous_lakes", @@ -547,7 +548,6 @@ "tundra_bog", "undergrowth", "visceral_heap", - "volcanic_forest", "volcanic_plains", "volcano", "wasteland",