More work on Nether biomes

This commit is contained in:
Forstride 2019-08-04 04:38:59 -04:00
parent ec0977da4d
commit 689c3d5f00
15 changed files with 461 additions and 33 deletions

View File

@ -74,11 +74,13 @@ public class BOPBiomes
public static Optional<Biome> woodland = Optional.empty();
public static Optional<Biome> xeric_shrubland = Optional.empty();
public static Optional<Biome> infernal_ashlands = Optional.empty();
public static Optional<Biome> ashen_inferno = Optional.empty();
public static Optional<Biome> fungi_forest = Optional.empty();
public static Optional<Biome> glowstone_cavern = Optional.empty();
public static Optional<Biome> undergarden = Optional.empty();
public static Optional<Biome> visceral_heap = Optional.empty();
public static Optional<Biome> coral_deadlands = Optional.empty();
public static Optional<Biome> ethereal_garden = Optional.empty();
public static Optional<Biome> coral_deadland = Optional.empty();
public static Optional<Biome> ethereal_forest = Optional.empty();
public static Optional<Biome> end_plains = Optional.empty();
}

View File

@ -18,9 +18,9 @@ import net.minecraft.world.gen.placement.Placement;
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class EtherealGardenBiome extends EndBiomeBOP
public class EtherealForestBiome extends EndBiomeBOP
{
public EtherealGardenBiome()
public EtherealForestBiome()
{
super((new Builder()).surfaceBuilder(new ConfiguredSurfaceBuilder<>(SurfaceBuilder.DEFAULT, SurfaceBuilder.END_STONE_CONFIG)).precipitation(RainType.NONE).category(Category.THEEND).depth(0.1F).scale(0.2F).temperature(0.5F).downfall(0.5F).waterColor(4159204).waterFogColor(329011).parent((String)null));

View File

@ -17,9 +17,9 @@ import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placement.*;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class InfernalAshlandsBiome extends NetherBiomeBOP
public class AshenInfernoBiome extends NetherBiomeBOP
{
public InfernalAshlandsBiome()
public AshenInfernoBiome()
{
super((new Builder()).surfaceBuilder(SurfaceBuilder.NETHER, SurfaceBuilder.NETHERRACK_CONFIG).precipitation(RainType.NONE).category(Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F).waterColor(4159204).waterFogColor(329011).parent((String)null));
@ -42,9 +42,9 @@ public class InfernalAshlandsBiome extends NetherBiomeBOP
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_SPRING, new HellLavaConfig(true), Placement.COUNT_RANGE, new CountRangeConfig(16, 10, 20, 128)));
//Entities
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.GHAST, 50, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_PIGMAN, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.MAGMA_CUBE, 2, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.GHAST, 40, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_PIGMAN, 80, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.MAGMA_CUBE, 20, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 1, 4, 4));
}
}

View File

@ -0,0 +1,57 @@
package biomesoplenty.common.biome.nether;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.common.biome.NetherBiomeBOP;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.Blocks;
import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.EntityType;
import net.minecraft.fluid.Fluids;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.carver.WorldCarver;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placement.*;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class FungiForestBiome extends NetherBiomeBOP
{
public FungiForestBiome()
{
super((new Builder()).surfaceBuilder(SurfaceBuilder.NETHER, SurfaceBuilder.NETHERRACK_CONFIG).precipitation(RainType.NONE).category(Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F).waterColor(4159204).waterFogColor(329011).parent((String)null));
//Terrain
this.addStructure(Feature.NETHER_BRIDGE, IFeatureConfig.NO_FEATURE_CONFIG);
this.addCarver(GenerationStage.Carving.AIR, createCarver(WorldCarver.HELL_CAVE, new ProbabilityConfig(0.2F)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createDecoratedFeature(Feature.SPRING_FEATURE, new LiquidsConfig(Fluids.LAVA.getDefaultState()), Placement.COUNT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256)));
DefaultBiomeFeatures.addMushrooms(this);
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_BRIDGE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.NOPE, IPlacementConfig.NO_PLACEMENT_CONFIG));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_SPRING, new HellLavaConfig(false), Placement.COUNT_RANGE, new CountRangeConfig(8, 4, 8, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.HELL_FIRE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.HELL_FIRE, new FrequencyConfig(10)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.GLOWSTONE_BLOB, IFeatureConfig.NO_FEATURE_CONFIG, Placement.LIGHT_GEM_CHANCE, new FrequencyConfig(10)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.GLOWSTONE_BLOB, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_RANGE, new CountRangeConfig(10, 0, 0, 128)));
//Vegetation
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.HUGE_RED_MUSHROOM_NETHER, new BigMushroomFeatureConfig(false), Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(250)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.HUGE_BROWN_MUSHROOM_NETHER, new BigMushroomFeatureConfig(false), Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(75)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.BUSH, new BushConfig(BOPBlocks.toadstool.getDefaultState()),Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(7)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.NETHERWART_BUBBLE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(3)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.SCATTERED_NETHER_WART, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(2)));
//Base Decorations
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.BUSH, new BushConfig(Blocks.BROWN_MUSHROOM.getDefaultState()), Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(15)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.BUSH, new BushConfig(Blocks.RED_MUSHROOM.getDefaultState()), Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(30)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.NETHER_QUARTZ_ORE.getDefaultState(), 14), Placement.COUNT_RANGE, new CountRangeConfig(16, 10, 20, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.MAGMA_BLOCK.getDefaultState(), 33), Placement.MAGMA, new FrequencyConfig(4)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_SPRING, new HellLavaConfig(true), Placement.COUNT_RANGE, new CountRangeConfig(16, 10, 20, 128)));
//Entities
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.GHAST, 50, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_PIGMAN, 100, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.MAGMA_CUBE, 2, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 1, 4, 4));
}
}

View File

@ -0,0 +1,52 @@
package biomesoplenty.common.biome.nether;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.common.biome.NetherBiomeBOP;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import net.minecraft.block.Blocks;
import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.EntityType;
import net.minecraft.fluid.Fluids;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.DefaultBiomeFeatures;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.carver.WorldCarver;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placement.*;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
public class GlowstoneCavernBiome extends NetherBiomeBOP
{
public GlowstoneCavernBiome()
{
super((new Builder()).surfaceBuilder(SurfaceBuilder.NETHER, SurfaceBuilder.NETHERRACK_CONFIG).precipitation(RainType.NONE).category(Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F).waterColor(4159204).waterFogColor(329011).parent((String)null));
//Terrain
this.addStructure(Feature.NETHER_BRIDGE, IFeatureConfig.NO_FEATURE_CONFIG);
this.addCarver(GenerationStage.Carving.AIR, createCarver(WorldCarver.HELL_CAVE, new ProbabilityConfig(0.2F)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createDecoratedFeature(Feature.SPRING_FEATURE, new LiquidsConfig(Fluids.LAVA.getDefaultState()), Placement.COUNT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256)));
DefaultBiomeFeatures.addMushrooms(this);
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_BRIDGE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.NOPE, IPlacementConfig.NO_PLACEMENT_CONFIG));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_SPRING, new HellLavaConfig(false), Placement.COUNT_RANGE, new CountRangeConfig(8, 4, 8, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.HELL_FIRE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.HELL_FIRE, new FrequencyConfig(10)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.GLOWSTONE_BLOB, IFeatureConfig.NO_FEATURE_CONFIG, Placement.LIGHT_GEM_CHANCE, new FrequencyConfig(50)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.GLOWSTONE_BLOB, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_RANGE, new CountRangeConfig(50, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.GLOWSTONE_SPIKES, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(7)));
//Base Decorations
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.BUSH, new BushConfig(Blocks.BROWN_MUSHROOM.getDefaultState()), Placement.CHANCE_RANGE, new ChanceRangeConfig(0.25F, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.BUSH, new BushConfig(Blocks.RED_MUSHROOM.getDefaultState()), Placement.CHANCE_RANGE, new ChanceRangeConfig(0.25F, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.NETHER_QUARTZ_ORE.getDefaultState(), 14), Placement.COUNT_RANGE, new CountRangeConfig(24, 10, 20, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK, Blocks.MAGMA_BLOCK.getDefaultState(), 33), Placement.MAGMA, new FrequencyConfig(4)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.NETHER_SPRING, new HellLavaConfig(true), Placement.COUNT_RANGE, new CountRangeConfig(16, 10, 20, 128)));
//Entities
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.GHAST, 20, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ZOMBIE_PIGMAN, 50, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.MAGMA_CUBE, 2, 4, 4));
this.addSpawn(EntityClassification.MONSTER, new SpawnListEntry(EntityType.ENDERMAN, 1, 4, 4));
}
}

View File

@ -35,8 +35,7 @@ public class VisceralHeapBiome extends NetherBiomeBOP
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.GLOWSTONE_BLOB, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_RANGE, new CountRangeConfig(7, 0, 0, 128)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.FLESH_SPLATTER, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(500)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.BONE_SPINE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(20)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.NETHERWART_BUBBLE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(5)));
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(BOPBiomeFeatures.BONE_SPINE, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_HEIGHTMAP_DOUBLE, new FrequencyConfig(15)));
//Base Decorations
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createDecoratedFeature(Feature.BUSH, new BushConfig(Blocks.BROWN_MUSHROOM.getDefaultState()), Placement.CHANCE_RANGE, new ChanceRangeConfig(0.1F, 0, 0, 128)));

View File

@ -24,7 +24,7 @@ import java.util.Set;
public class BOPEndBiomeProvider extends BiomeProvider {
private final SimplexNoiseGenerator generator;
private final SharedSeedRandom random;
private final Biome[] field_205009_d = new Biome[]{Biomes.THE_END, Biomes.END_HIGHLANDS, Biomes.END_MIDLANDS, Biomes.SMALL_END_ISLANDS, Biomes.END_BARRENS, BOPBiomes.coral_deadlands.get(), BOPBiomes.ethereal_garden.get(), BOPBiomes.end_plains.get()};
private final Biome[] field_205009_d = new Biome[]{Biomes.THE_END, Biomes.END_HIGHLANDS, Biomes.END_MIDLANDS, Biomes.SMALL_END_ISLANDS, Biomes.END_BARRENS, BOPBiomes.coral_deadland.get(), BOPBiomes.ethereal_forest.get(), BOPBiomes.end_plains.get()};
public BOPEndBiomeProvider(EndBiomeProviderSettings p_i48970_1_) {
this.random = new SharedSeedRandom(p_i48970_1_.getSeed());
@ -47,7 +47,7 @@ public class BOPEndBiomeProvider extends BiomeProvider {
if (lvt_5_1_ > 40.0F)
{
//return Biomes.END_HIGHLANDS;
return BOPBiomes.ethereal_garden.get();
return BOPBiomes.ethereal_forest.get();
}
else if (lvt_5_1_ >= 0.0F)
{

View File

@ -43,7 +43,7 @@ public class WorldTypeBOP extends WorldType
NetherGenSettings nethergensettings = ChunkGeneratorType.CAVES.createSettings();
nethergensettings.setDefaultBlock(Blocks.NETHERRACK.getDefaultState());
nethergensettings.setDefaultFluid(Blocks.LAVA.getDefaultState());
return ChunkGeneratorType.CAVES.create(world, BiomeProviderType.FIXED.create(BiomeProviderType.FIXED.createSettings().setBiome(BOPBiomes.visceral_heap.get())), nethergensettings);
return ChunkGeneratorType.CAVES.create(world, BiomeProviderType.FIXED.create(BiomeProviderType.FIXED.createSettings().setBiome(BOPBiomes.undergarden.get())), nethergensettings);
}
else if (world.getDimension().getType() == DimensionType.THE_END)
{

View File

@ -9,12 +9,10 @@ package biomesoplenty.common.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.common.world.gen.feature.tree.*;
import biomesoplenty.common.world.gen.feature.tree.BigTreeFeature;
import net.minecraft.block.Blocks;
import net.minecraft.block.LeavesBlock;
import net.minecraft.world.gen.feature.AbstractTreeFeature;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.FlowersFeature;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
@ -122,8 +120,12 @@ public class BOPBiomeFeatures
public static final Feature<NoFeatureConfig> NETHER_VINES = new NetherVinesFeature(NoFeatureConfig::deserialize);
public static final Feature<NoFeatureConfig> FLESH_SPLATTER = new FleshSplatterFeature(NoFeatureConfig::deserialize);
public static final Feature<NoFeatureConfig> BONE_SPINE = new BoneSpineFeature(NoFeatureConfig::deserialize);
public static final AbstractTreeFeature<NoFeatureConfig> NETHERWART_BUBBLE = new BushTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == BOPBlocks.flesh).log(Blocks.NETHER_WART_BLOCK.getDefaultState()).leaves(Blocks.NETHER_WART_BLOCK.getDefaultState()).maxHeight(2).create();
public static final AbstractTreeFeature<NoFeatureConfig> NETHERWART_BUBBLE = new BushTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.NETHERRACK).log(Blocks.NETHER_WART_BLOCK.getDefaultState()).leaves(Blocks.NETHER_WART_BLOCK.getDefaultState()).maxHeight(2).create();
public static final Feature<NoFeatureConfig> ASH_SPLATTER = new AshSplatterFeature(NoFeatureConfig::deserialize);
public static final Feature<BigMushroomFeatureConfig> HUGE_RED_MUSHROOM_NETHER = new BigRedMushroomNetherFeature(BigMushroomFeatureConfig::deserialize);
public static final Feature<BigMushroomFeatureConfig> HUGE_BROWN_MUSHROOM_NETHER = new BigBrownMushroomNetherFeature(BigMushroomFeatureConfig::deserialize);
public static final Feature<NoFeatureConfig> SCATTERED_NETHER_WART = new NetherWartFeature(NoFeatureConfig::deserialize);
public static final Feature<NoFeatureConfig> GLOWSTONE_SPIKES = new GlowstoneSpikesFeature(NoFeatureConfig::deserialize);
//Flowers
public static final FlowersFeature CHAPARRAL_FLOWERS = new ChaparralFlowersFeature(NoFeatureConfig::deserialize);

View File

@ -0,0 +1,95 @@
package biomesoplenty.common.world.gen.feature;
import com.mojang.datafixers.Dynamic;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.HugeMushroomBlock;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.gen.ChunkGenerator;
import net.minecraft.world.gen.GenerationSettings;
import net.minecraft.world.gen.feature.BigMushroomFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import java.util.Random;
import java.util.function.Function;
public class BigBrownMushroomNetherFeature extends Feature<BigMushroomFeatureConfig> {
public BigBrownMushroomNetherFeature(Function<Dynamic<?>, ? extends BigMushroomFeatureConfig> p_i49864_1_) {
super(p_i49864_1_);
}
public boolean place(IWorld worldIn, ChunkGenerator<? extends GenerationSettings> generator, Random rand, BlockPos pos, BigMushroomFeatureConfig config) {
int i = rand.nextInt(3) + 4;
if (rand.nextInt(12) == 0) {
i *= 2;
}
int j = pos.getY();
if (j >= 1 && j + i + 1 < worldIn.getWorld().getDimension().getHeight()) {
Block block = worldIn.getBlockState(pos.down()).getBlock();
if (!Block.isDirt(block) && block != Blocks.NETHERRACK && block != Blocks.SOUL_SAND) {
return false;
} else {
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
for(int k = 0; k <= 1 + i; ++k) {
int l = k <= 3 ? 0 : 3;
for(int i1 = -l; i1 <= l; ++i1) {
for(int j1 = -l; j1 <= l; ++j1) {
BlockState blockstate = worldIn.getBlockState(blockpos$mutableblockpos.setPos(pos).move(i1, k, j1));
if (!blockstate.isAir(worldIn, blockpos$mutableblockpos) && !blockstate.isIn(BlockTags.LEAVES)) {
return false;
}
}
}
}
BlockState blockstate1 = Blocks.BROWN_MUSHROOM_BLOCK.getDefaultState().with(HugeMushroomBlock.UP, Boolean.valueOf(true)).with(HugeMushroomBlock.DOWN, Boolean.valueOf(false));
int k1 = 3;
for(int l1 = -3; l1 <= 3; ++l1) {
for(int i2 = -3; i2 <= 3; ++i2) {
boolean flag9 = l1 == -3;
boolean flag = l1 == 3;
boolean flag1 = i2 == -3;
boolean flag2 = i2 == 3;
boolean flag3 = flag9 || flag;
boolean flag4 = flag1 || flag2;
if (!flag3 || !flag4) {
blockpos$mutableblockpos.setPos(pos).move(l1, i, i2);
if (worldIn.getBlockState(blockpos$mutableblockpos).canBeReplacedByLeaves(worldIn, blockpos$mutableblockpos)) {
boolean flag5 = flag9 || flag4 && l1 == -2;
boolean flag6 = flag || flag4 && l1 == 2;
boolean flag7 = flag1 || flag3 && i2 == -2;
boolean flag8 = flag2 || flag3 && i2 == 2;
this.setBlockState(worldIn, blockpos$mutableblockpos, blockstate1.with(HugeMushroomBlock.WEST, Boolean.valueOf(flag5)).with(HugeMushroomBlock.EAST, Boolean.valueOf(flag6)).with(HugeMushroomBlock.NORTH, Boolean.valueOf(flag7)).with(HugeMushroomBlock.SOUTH, Boolean.valueOf(flag8)));
}
}
}
}
BlockState blockstate2 = Blocks.MUSHROOM_STEM.getDefaultState().with(HugeMushroomBlock.UP, Boolean.valueOf(false)).with(HugeMushroomBlock.DOWN, Boolean.valueOf(false));
for(int j2 = 0; j2 < i; ++j2) {
blockpos$mutableblockpos.setPos(pos).move(Direction.UP, j2);
if (worldIn.getBlockState(blockpos$mutableblockpos).canBeReplacedByLeaves(worldIn, blockpos$mutableblockpos)) {
if (config.planted) {
worldIn.setBlockState(blockpos$mutableblockpos, blockstate2, 3);
} else {
this.setBlockState(worldIn, blockpos$mutableblockpos, blockstate2);
}
}
}
return true;
}
} else {
return false;
}
}
}

View File

@ -0,0 +1,102 @@
package biomesoplenty.common.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import com.mojang.datafixers.Dynamic;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.HugeMushroomBlock;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.gen.ChunkGenerator;
import net.minecraft.world.gen.GenerationSettings;
import net.minecraft.world.gen.feature.BigMushroomFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class BigRedMushroomNetherFeature extends Feature<BigMushroomFeatureConfig> {
public BigRedMushroomNetherFeature(Function<Dynamic<?>, ? extends BigMushroomFeatureConfig> p_i49863_1_) {
super(p_i49863_1_);
}
public boolean place(IWorld worldIn, ChunkGenerator<? extends GenerationSettings> generator, Random rand, BlockPos pos, BigMushroomFeatureConfig config) {
int i = rand.nextInt(3) + 4;
if (rand.nextInt(12) == 0) {
i *= 2;
}
int j = pos.getY();
if (j >= 1 && j + i + 1 < 256) {
Block block = worldIn.getBlockState(pos.down()).getBlock();
if (!Block.isDirt(block) && block != Blocks.NETHERRACK && block != Blocks.SOUL_SAND) {
return false;
} else {
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
for(int k = 0; k <= i; ++k) {
int l = 0;
if (k < i && k >= i - 3) {
l = 2;
} else if (k == i) {
l = 1;
}
for(int i1 = -l; i1 <= l; ++i1) {
for(int j1 = -l; j1 <= l; ++j1) {
BlockState blockstate = worldIn.getBlockState(blockpos$mutableblockpos.setPos(pos).move(i1, k, j1));
if (!blockstate.isAir(worldIn, blockpos$mutableblockpos) && !blockstate.isIn(BlockTags.LEAVES)) {
return false;
}
}
}
}
BlockState blockstate1 = Blocks.RED_MUSHROOM_BLOCK.getDefaultState().with(HugeMushroomBlock.DOWN, Boolean.valueOf(false));
for(int l1 = i - 3; l1 <= i; ++l1) {
int i2 = l1 < i ? 2 : 1;
int k2 = 0;
for(int l2 = -i2; l2 <= i2; ++l2) {
for(int k1 = -i2; k1 <= i2; ++k1) {
boolean flag = l2 == -i2;
boolean flag1 = l2 == i2;
boolean flag2 = k1 == -i2;
boolean flag3 = k1 == i2;
boolean flag4 = flag || flag1;
boolean flag5 = flag2 || flag3;
if (l1 >= i || flag4 != flag5) {
blockpos$mutableblockpos.setPos(pos).move(l2, l1, k1);
if (worldIn.getBlockState(blockpos$mutableblockpos).canBeReplacedByLeaves(worldIn, blockpos$mutableblockpos)) {
this.setBlockState(worldIn, blockpos$mutableblockpos, blockstate1.with(HugeMushroomBlock.UP, Boolean.valueOf(l1 >= i - 1)).with(HugeMushroomBlock.WEST, Boolean.valueOf(l2 < 0)).with(HugeMushroomBlock.EAST, Boolean.valueOf(l2 > 0)).with(HugeMushroomBlock.NORTH, Boolean.valueOf(k1 < 0)).with(HugeMushroomBlock.SOUTH, Boolean.valueOf(k1 > 0)));
}
}
}
}
}
BlockState blockstate2 = Blocks.MUSHROOM_STEM.getDefaultState().with(HugeMushroomBlock.UP, Boolean.valueOf(false)).with(HugeMushroomBlock.DOWN, Boolean.valueOf(false));
for(int j2 = 0; j2 < i; ++j2) {
blockpos$mutableblockpos.setPos(pos).move(Direction.UP, j2);
if (worldIn.getBlockState(blockpos$mutableblockpos).canBeReplacedByLeaves(worldIn, blockpos$mutableblockpos)) {
if (config.planted) {
worldIn.setBlockState(blockpos$mutableblockpos, blockstate2, 3);
} else {
this.setBlockState(worldIn, blockpos$mutableblockpos, blockstate2);
}
}
}
return true;
}
} else {
return false;
}
}
}

View File

@ -0,0 +1,71 @@
package biomesoplenty.common.world.gen.feature;
import biomesoplenty.common.util.block.IBlockPosQuery;
import com.mojang.datafixers.Dynamic;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.IWorld;
import net.minecraft.world.gen.ChunkGenerator;
import net.minecraft.world.gen.GenerationSettings;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class GlowstoneSpikesFeature extends Feature<NoFeatureConfig>
{
protected IBlockPosQuery placeOn = (world, pos) -> world.getBlockState(pos).getBlock() == Blocks.NETHERRACK;
protected IBlockPosQuery replace = (world, pos) -> world.getBlockState(pos).isAir(world, pos);
int minRadius = 2;
int maxRadius = 4;
int minHeight = 5;
int maxHeight = 13;
public GlowstoneSpikesFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public boolean place(IWorld world, ChunkGenerator<? extends GenerationSettings> p_212245_2_, Random rand, BlockPos startPos, NoFeatureConfig p_212245_5_)
{
int randRadius = this.minRadius + rand.nextInt(this.maxRadius - this.minRadius);
int height = this.minHeight + rand.nextInt(this.maxHeight - this.minHeight);
while (startPos.getY() > 1 && this.replace.matches(world, startPos)) {startPos = startPos.down();}
for (int x = 0; x <= randRadius - 1; x++)
{
for (int z = 0; z <= randRadius - 1; z++)
{
if (!this.placeOn.matches(world, startPos.add(x, 0, z)))
{
return false;
}
}
}
BlockPos pos = startPos.up();
// Generate
for (int y = 0; y < height - 1; y++)
{
int radius = (randRadius * (height - y) / height) + 1;
int radiusStart = MathHelper.ceil(0.25D - radius / 2.0D);
int radiusEnd = MathHelper.floor(0.25D + radius / 2.0D);
for (int x = radiusStart; x <= radiusEnd; x++)
{
for (int z = radiusStart; z <= radiusEnd; z++)
{
world.setBlockState(pos.add(x, y, z), Blocks.GLOWSTONE.getDefaultState(), 2);
}
}
}
return true;
}
}

View File

@ -0,0 +1,44 @@
package biomesoplenty.common.world.gen.feature;
import biomesoplenty.api.block.BOPBlocks;
import com.mojang.datafixers.Dynamic;
import net.minecraft.block.Blocks;
import net.minecraft.block.LeavesBlock;
import net.minecraft.block.NetherWartBlock;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.gen.ChunkGenerator;
import net.minecraft.world.gen.GenerationSettings;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.NoFeatureConfig;
import java.util.Random;
import java.util.function.Function;
public class NetherWartFeature extends Feature<NoFeatureConfig>
{
public NetherWartFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> deserializer)
{
super(deserializer);
}
@Override
public boolean place(IWorld p_212245_1_, ChunkGenerator<? extends GenerationSettings> p_212245_2_, Random p_212245_3_, BlockPos p_212245_4_, NoFeatureConfig p_212245_5_)
{
int i = 0;
for(int j = 0; j < 16; ++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).isAir(p_212245_1_, blockpos) && p_212245_1_.getBlockState(blockpos.down()).getBlock() == Blocks.NETHERRACK)
{
p_212245_1_.setBlockState(blockpos.down(), Blocks.SOUL_SAND.getDefaultState(), 2);
p_212245_1_.setBlockState(blockpos, Blocks.NETHER_WART.getDefaultState().with(NetherWartBlock.AGE, p_212245_3_.nextInt(4)), 2);
++i;
}
}
return i > 0;
}
}

View File

@ -14,10 +14,8 @@ import java.util.Map;
import java.util.Optional;
import biomesoplenty.common.biome.end.CoralDeadlandsBiome;
import biomesoplenty.common.biome.end.EtherealGardenBiome;
import biomesoplenty.common.biome.nether.InfernalAshlandsBiome;
import biomesoplenty.common.biome.nether.UndergardenBiome;
import biomesoplenty.common.biome.nether.VisceralHeapBiome;
import biomesoplenty.common.biome.end.EtherealForestBiome;
import biomesoplenty.common.biome.nether.*;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
@ -176,13 +174,15 @@ public class ModBiomes
xeric_shrubland = registerBiome(new XericShrublandBiome(), "xeric_shrubland");
//Nether Biomes
infernal_ashlands = registerBiome(new InfernalAshlandsBiome(), "infernal_ashlands");
ashen_inferno = registerBiome(new AshenInfernoBiome(), "ashen_inferno");
fungi_forest = registerBiome(new FungiForestBiome(), "fungi_forest");
glowstone_cavern = registerBiome(new GlowstoneCavernBiome(), "glowstone_cavern");
undergarden = registerBiome(new UndergardenBiome(), "undergarden");
visceral_heap = registerBiome(new VisceralHeapBiome(), "visceral_heap");
//End Biomes
coral_deadlands = registerBiome(new CoralDeadlandsBiome(), "coral_deadlands");
ethereal_garden = registerBiome(new EtherealGardenBiome(), "ethereal_garden");
coral_deadland = registerBiome(new CoralDeadlandsBiome(), "coral_deadlands");
ethereal_forest = registerBiome(new EtherealForestBiome(), "ethereal_forest");
end_plains = registerBiome(new EndPlainsBiome(), "end_plains");
//Sub/Island Biomes (Note: Rarity supports two decimal places)
@ -272,13 +272,15 @@ public class ModBiomes
registerBiomeToDictionary(xeric_shrubland, Type.SANDY, Type.SAVANNA, Type.LUSH, Type.HOT, Type.DRY, Type.SPARSE);
//Nether Biomes
registerBiomeToDictionary(infernal_ashlands, Type.NETHER, Type.HOT);
registerBiomeToDictionary(ashen_inferno, Type.NETHER, Type.HOT);
registerBiomeToDictionary(fungi_forest, Type.NETHER, Type.HOT);
registerBiomeToDictionary(glowstone_cavern, Type.NETHER, Type.HOT);
registerBiomeToDictionary(undergarden, Type.NETHER, Type.HOT);
registerBiomeToDictionary(visceral_heap, Type.NETHER, Type.HOT);
//End Biomes
registerBiomeToDictionary(coral_deadlands, Type.END);
registerBiomeToDictionary(ethereal_garden, Type.END);
registerBiomeToDictionary(coral_deadland, Type.END);
registerBiomeToDictionary(ethereal_forest, Type.END);
registerBiomeToDictionary(end_plains, Type.END);
}

View File

@ -9,6 +9,7 @@
"biome.biomesoplenty.alps": "Alps",
"biome.biomesoplenty.alps_foothills": "Alps Foothills",
"biome.biomesoplenty.ashen_inferno": "Ashen Inferno",
"biome.biomesoplenty.bayou": "Bayou",
"biome.biomesoplenty.bog": "Bog",
"biome.biomesoplenty.boreal_forest": "Boreal Forest",
@ -17,17 +18,18 @@
"biome.biomesoplenty.cherry_blossom_grove": "Cherry Blossom Grove",
"biome.biomesoplenty.cold_desert": "Cold Desert",
"biome.biomesoplenty.coniferous_forest": "Coniferous Forest",
"biome.biomesoplenty.coral_deadlands": "Coral Deadlands",
"biome.biomesoplenty.coral_deadland": "Coral Deadland",
"biome.biomesoplenty.dead_forest": "Dead Forest",
"biome.biomesoplenty.dry_plains": "Dry Plains",
"biome.biomesoplenty.ethereal_garden": "Ethereal Garden",
"biome.biomesoplenty.ethereal_forest": "Ethereal Forest",
"biome.biomesoplenty.floodplain": "Floodplain",
"biome.biomesoplenty.flower_meadow": "Flower Meadow",
"biome.biomesoplenty.fungi_forest": "Fungi Forest",
"biome.biomesoplenty.glowstone_cavern": "Glowstone Cavern",
"biome.biomesoplenty.grassland": "Grassland",
"biome.biomesoplenty.gravel_beach": "Gravel Beach",
"biome.biomesoplenty.grove": "Grove",
"biome.biomesoplenty.highland": "Highland",
"biome.biomesoplenty.infernal_ashlands": "Infernal Ashlands",
"biome.biomesoplenty.lavender_field": "Lavender Field",
"biome.biomesoplenty.lush_grassland": "Lush Grassland",
"biome.biomesoplenty.lush_swamp": "Lush Swamp",