diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java index 1b8c100a8..0cadd8eec 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java @@ -75,10 +75,12 @@ public class BOPBiomes public static RegistryKey snowy_fir_clearing = register("snowy_fir_clearing"); public static RegistryKey snowy_maple_forest = register("snowy_maple_forest"); public static RegistryKey tropic_beach = register("tropic_beach"); + public static RegistryKey tropic_plains = register("tropic_plains"); public static RegistryKey tropics = register("tropics"); 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/TropicPlainsBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/TropicPlainsBiome.java new file mode 100644 index 000000000..cc32d55a5 --- /dev/null +++ b/src/main/java/biomesoplenty/common/biome/overworld/TropicPlainsBiome.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * 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.biome.BOPBiomes; +import biomesoplenty.common.biome.BiomeTemplate; +import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures; +import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilders; +import net.minecraft.entity.EntityClassification; +import net.minecraft.entity.EntityType; +import net.minecraft.world.biome.*; +import net.minecraft.world.gen.GenerationStage; +import net.minecraft.world.gen.feature.Features; +import net.minecraft.world.gen.feature.structure.StructureFeatures; + +public class TropicPlainsBiome extends BiomeTemplate +{ + public TropicPlainsBiome() + { + this.setBeachBiome(BOPBiomes.tropic_beach); + this.setRiverBiome(null); + } + + @Override + protected void configureBiome(Biome.Builder builder) + { + builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.NONE).depth(0.1F).scale(0.2F).temperature(0.95F).downfall(1.0F); + + builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4445678).waterFogColor(270131).fogColor(0xB2EDFF).skyColor(0x66BCFF).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()); + } + + @Override + protected void configureGeneration(BiomeGenerationSettings.Builder builder) + { + builder.surfaceBuilder(BOPConfiguredSurfaceBuilders.TROPICS); + + // Structures + DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder); + builder.addStructureStart(StructureFeatures.RUINED_PORTAL_JUNGLE); + + // Underground + DefaultBiomeFeatures.addDefaultCarvers(builder); + DefaultBiomeFeatures.addDefaultLakes(builder); + DefaultBiomeFeatures.addDefaultMonsterRoom(builder); + DefaultBiomeFeatures.addDefaultUndergroundVariety(builder); + DefaultBiomeFeatures.addDefaultOres(builder); + + builder.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, BOPConfiguredFeatures.WHITE_SAND_DISK_EXTRA); + + //////////////////////////////////////////////////////////// + + // Vegetation + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.TROPIC_FLOWERS); + + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.BLUE_HYDRANGEA_1); + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.ROSE_BUSH_1); + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.STANDARD_GRASS_24); + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.TALL_GRASS_64); + + //////////////////////////////////////////////////////////// + + // Other Features + DefaultBiomeFeatures.addDefaultSprings(builder); + DefaultBiomeFeatures.addSurfaceFreezing(builder); + } + + @Override + protected void configureMobSpawns(MobSpawnInfo.Builder builder) + { + // Entities + builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.CHICKEN, 10, 4, 4)); + builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.PIG, 10, 4, 4)); + builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.PARROT, 40, 1, 2)); + builder.addSpawn(EntityClassification.WATER_AMBIENT, new MobSpawnInfo.Spawners(EntityType.PUFFERFISH, 15, 1, 3)); + builder.addSpawn(EntityClassification.WATER_AMBIENT, new MobSpawnInfo.Spawners(EntityType.TROPICAL_FISH, 25, 8, 8)); + builder.addSpawn(EntityClassification.WATER_CREATURE, new MobSpawnInfo.Spawners(EntityType.SQUID, 10, 4, 4)); + builder.addSpawn(EntityClassification.WATER_CREATURE, new MobSpawnInfo.Spawners(EntityType.DOLPHIN, 2, 1, 2)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SPIDER, 100, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SKELETON, 100, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.CREEPER, 100, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 100, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITCH, 5, 1, 1)); + } +} diff --git a/src/main/java/biomesoplenty/common/biome/overworld/VolcanicForestBiome.java b/src/main/java/biomesoplenty/common/biome/overworld/VolcanicForestBiome.java new file mode 100644 index 000000000..e6ebfd94c --- /dev/null +++ b/src/main/java/biomesoplenty/common/biome/overworld/VolcanicForestBiome.java @@ -0,0 +1,87 @@ +/******************************************************************************* + * 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.biome.BOPBiomes; +import biomesoplenty.common.biome.BiomeTemplate; +import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures; +import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilders; +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.Features; +import net.minecraft.world.gen.feature.structure.StructureFeatures; + +public class VolcanicForestBiome extends BiomeTemplate +{ + public VolcanicForestBiome() + { + this.setRiverBiome(null); + this.setBeachBiome(BOPBiomes.volcanic_plains); + } + + @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.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()); + } + + @Override + protected void configureGeneration(BiomeGenerationSettings.Builder builder) + { + builder.surfaceBuilder(BOPConfiguredSurfaceBuilders.VOLCANIC_PLAINS); + + // Structures + DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder); + builder.addStructureStart(StructureFeatures.RUINED_PORTAL_STANDARD); + + // Underground + DefaultBiomeFeatures.addDefaultCarvers(builder); + + builder.addFeature(GenerationStage.Decoration.LAKES, Features.LAKE_LAVA); + + DefaultBiomeFeatures.addDefaultMonsterRoom(builder); + DefaultBiomeFeatures.addDefaultUndergroundVariety(builder); + DefaultBiomeFeatures.addDefaultOres(builder); + + //////////////////////////////////////////////////////////// + + // Vegetation + builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.VOLCANIC_FOREST_TREES); + + 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); + + //////////////////////////////////////////////////////////// + + // Other Features + DefaultBiomeFeatures.addDefaultSprings(builder); + DefaultBiomeFeatures.addSurfaceFreezing(builder); + } + + @Override + protected void configureMobSpawns(MobSpawnInfo.Builder builder) + { + // Entities + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SPIDER, 100, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE, 95, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE_VILLAGER, 5, 1, 1)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SKELETON, 100, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.CREEPER, 100, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 100, 4, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4)); + builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITCH, 5, 1, 1)); + } +} 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 9f77a3be5..9236aea16 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/BOPConfiguredFeatures.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPConfiguredFeatures.java @@ -47,6 +47,7 @@ public class BOPConfiguredFeatures public static final ConfiguredFeature BIG_WHITE_CHERRY_TREE = register("big_white_cherry_tree", BOPFeatures.BIG_WHITE_CHERRY_TREE.configured(Features.OAK.config())); public static final ConfiguredFeature BIG_YELLOW_AUTUMN_TREE = register("big_yellow_autumn_tree", BOPFeatures.BIG_YELLOW_AUTUMN_TREE.configured(Features.OAK.config())); public static final ConfiguredFeature BIRCH_POPLAR = register("birch_poplar", BOPFeatures.BIRCH_POPLAR.configured(Features.OAK.config())); + public static final ConfiguredFeature BURNT_TREE = register("burnt_tree", BOPFeatures.BURNT_TREE.configured(Features.OAK.config())); public static final ConfiguredFeature BUSH = register("bush", BOPFeatures.BUSH.configured(Features.OAK.config())); public static final ConfiguredFeature COBWEB_BUSH = register("cobweb_bush", BOPFeatures.COBWEB_BUSH.configured(Features.OAK.config())); public static final ConfiguredFeature CYPRESS_TREE = register("cypress_tree", BOPFeatures.CYPRESS_TREE.configured(Features.OAK.config())); @@ -157,6 +158,7 @@ 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)))); @@ -224,6 +226,7 @@ public class BOPConfiguredFeatures public static final ConfiguredFeature DEAD_GRASS_2 = register("dead_grass_2", Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.dead_grass.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(2))); public static final ConfiguredFeature DEAD_GRASS_5 = register("dead_grass_5", Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.dead_grass.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(5))); + public static final ConfiguredFeature DEAD_GRASS_25 = register("dead_grass_25", Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.dead_grass.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(25))); public static final ConfiguredFeature DEAD_GRASS_45 = register("dead_grass_45", Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.dead_grass.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(45))); public static final ConfiguredFeature TALL_GRASS_6 = register("tall_grass_6", Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfigurationDouble(Blocks.TALL_GRASS.defaultBlockState())).decorated(Features.Placements.ADD_32).decorated(Features.Placements.HEIGHTMAP_SQUARE.count(6))); @@ -327,6 +330,7 @@ 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 f2abe9e02..dd359bfd3 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/BOPFeatures.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/BOPFeatures.java @@ -110,6 +110,7 @@ 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()); ///////////////////////////////////////////////////////////////////////////////// @@ -126,6 +127,7 @@ public class BOPFeatures public static final Feature HUGE_GLOWSHROOM = register("huge_glowshroom", new HugeGlowshroomFeature(NoFeatureConfig.CODEC.stable())); public static final Feature HUGE_TOADSTOOL = register("huge_toadstool", new HugeToadstoolFeature(NoFeatureConfig.CODEC.stable())); public static final Feature LARGE_CRYSTAL = register("large_crystal", new LargeCrystalFeature(NoFeatureConfig.CODEC.stable())); + public static final Feature MAGMA_SPLATTER = register("magma_splatter", new MagmaSplatterFeature(NoFeatureConfig.CODEC.stable())); public static final Feature MANGROVE = register("mangrove", new MangroveFeature(NoFeatureConfig.CODEC.stable())); public static final Feature MYCELIUM_SPLATTER = register("mycelium_splatter", new MyceliumSplatterFeature(NoFeatureConfig.CODEC.stable())); public static final Feature NETHER_VINES = register("nether_vines", new NetherVinesFeature(NoFeatureConfig.CODEC.stable())); diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/MagmaSplatterFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/MagmaSplatterFeature.java new file mode 100644 index 000000000..ae8f7bdc3 --- /dev/null +++ b/src/main/java/biomesoplenty/common/world/gen/feature/MagmaSplatterFeature.java @@ -0,0 +1,61 @@ +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.block.BushBlock; +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 MagmaSplatterFeature extends Feature +{ + public MagmaSplatterFeature(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() == BOPBlocks.black_sand && (blockstate1.canBeReplacedByLeaves(worldIn, blockpos.above()) || blockstate1.getBlock() instanceof BushBlock)) + { + worldIn.setBlock(blockpos, Blocks.MAGMA_BLOCK.defaultBlockState(), 2); + if (rand.nextInt(3) != 0) + { + worldIn.setBlock(blockpos.above(), Blocks.FIRE.defaultBlockState(), 2); + } + + ++i; + break; + } + } + } + } + } + + return i > 0; + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/init/ModBiomes.java b/src/main/java/biomesoplenty/init/ModBiomes.java index ab3551779..99ef8d063 100644 --- a/src/main/java/biomesoplenty/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/init/ModBiomes.java @@ -180,10 +180,12 @@ public class ModBiomes registerBiome(new SnowyConiferousForestBiome(), "snowy_coniferous_forest"); registerBiome(new SnowyMapleForestBiome(), "snowy_maple_forest"); registerBiome(new SnowyFirClearingBiome(), "snowy_fir_clearing"); + registerBiome(new TropicPlainsBiome(), "tropic_plains"); registerBiome(new TropicsBiome(), "tropics"); 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"); @@ -254,9 +256,13 @@ public class ModBiomes registerSubBiome(snowy_coniferous_forest, snowy_fir_clearing, 0.75F, 100); registerSubBiome(snowy_coniferous_forest, snowy_maple_forest, 1.25F, 100); + registerSubBiome(tropics, tropic_plains, 0.75F, 100); + 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); @@ -375,10 +381,12 @@ public class ModBiomes registerVillagerType(snowy_fir_clearing, VillagerType.SNOW); registerVillagerType(snowy_maple_forest, VillagerType.SNOW); registerVillagerType(tropic_beach, VillagerType.JUNGLE); + registerVillagerType(tropic_plains, VillagerType.JUNGLE); registerVillagerType(tropics, VillagerType.JUNGLE); 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 2b6989530..f41ad5c25 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_us.json +++ b/src/main/resources/assets/biomesoplenty/lang/en_us.json @@ -69,12 +69,14 @@ "biome.biomesoplenty.snowy_fir_clearing": "Snowy Fir Clearing", "biome.biomesoplenty.snowy_maple_forest": "Snowy Maple Forest", "biome.biomesoplenty.tropic_beach": "Tropic Beach", + "biome.biomesoplenty.tropic_plains": "Tropic Plains", "biome.biomesoplenty.tropics": "Tropics", "biome.biomesoplenty.tundra": "Tundra", "biome.biomesoplenty.tundra_basin": "Tundra Basin", "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 ab3865f19..fad4e8dd4 100644 --- a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json +++ b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/all_biomes.json @@ -381,6 +381,12 @@ "biome": "biomesoplenty:tropic_beach" } }, + "tropic_plains": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:tropic_plains" + } + }, "tropics": { "trigger": "minecraft:location", "conditions": { @@ -417,6 +423,12 @@ "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 e2e41061c..7ef00ed86 100644 --- a/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json +++ b/src/main/resources/data/biomesoplenty/advancements/biomesoplenty/root.json @@ -380,6 +380,12 @@ "biome": "biomesoplenty:tropic_beach" } }, + "tropic_plains": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:tropic_plains" + } + }, "tropics": { "trigger": "minecraft:location", "conditions": { @@ -416,6 +422,12 @@ "biome": "biomesoplenty:visceral_heap" } }, + "volcanic_forest": { + "trigger": "minecraft:location", + "conditions": { + "biome": "biomesoplenty:volcanic_forest" + } + }, "volcanic_plains": { "trigger": "minecraft:location", "conditions": { @@ -528,12 +540,14 @@ "snowy_fir_clearing", "snowy_maple_forest", "tropic_beach", + "tropic_plains", "tropics", "tundra", "tundra_basin", "tundra_bog", "undergrowth", "visceral_heap", + "volcanic_forest", "volcanic_plains", "volcano", "wasteland",