Re-added Dead Forest and Grove
This commit is contained in:
parent
f04d75739a
commit
ada0bd0aa3
9 changed files with 535 additions and 15 deletions
|
@ -22,15 +22,18 @@ public class BOPBiomes
|
|||
public static Optional<Biome> cherry_blossom_grove = Optional.empty();
|
||||
public static Optional<Biome> cold_desert = Optional.empty();
|
||||
public static Optional<Biome> coniferous_forest = Optional.empty();
|
||||
public static Optional<Biome> dead_forest = Optional.empty();
|
||||
public static Optional<Biome> dead_plains = Optional.empty();
|
||||
public static Optional<Biome> flower_meadow = Optional.empty();
|
||||
public static Optional<Biome> grassland = Optional.empty();
|
||||
public static Optional<Biome> grove = Optional.empty();
|
||||
public static Optional<Biome> grove_orchard = Optional.empty();
|
||||
public static Optional<Biome> lavender_fields = Optional.empty();
|
||||
public static Optional<Biome> lush_swamp = Optional.empty();
|
||||
public static Optional<Biome> maple_woods = Optional.empty();
|
||||
public static Optional<Biome> meadow = Optional.empty();
|
||||
public static Optional<Biome> mystic_grove = Optional.empty();
|
||||
public static Optional<Biome> ominous_woods = Optional.empty();
|
||||
public static Optional<Biome> orchard = Optional.empty();
|
||||
public static Optional<Biome> origin_hills = Optional.empty();
|
||||
public static Optional<Biome> outback = Optional.empty();
|
||||
public static Optional<Biome> pasture = Optional.empty();
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
/*******************************************************************************
|
||||
* 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 com.google.common.collect.Lists;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeBOP;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Fluids;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.BushConfig;
|
||||
import net.minecraft.world.gen.feature.DoublePlantConfig;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.IFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.LakesConfig;
|
||||
import net.minecraft.world.gen.feature.LiquidsConfig;
|
||||
import net.minecraft.world.gen.feature.MinableConfig;
|
||||
import net.minecraft.world.gen.feature.ProbabilityConfig;
|
||||
import net.minecraft.world.gen.feature.RandomDefaultFeatureListConfig;
|
||||
import net.minecraft.world.gen.feature.SphereReplaceConfig;
|
||||
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
|
||||
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
|
||||
import net.minecraft.world.gen.feature.structure.StrongholdConfig;
|
||||
import net.minecraft.world.gen.placement.AtSurfaceWithExtraConfig;
|
||||
import net.minecraft.world.gen.placement.ChanceConfig;
|
||||
import net.minecraft.world.gen.placement.CountRangeConfig;
|
||||
import net.minecraft.world.gen.placement.DepthAverageConfig;
|
||||
import net.minecraft.world.gen.placement.DungeonRoomConfig;
|
||||
import net.minecraft.world.gen.placement.FrequencyConfig;
|
||||
import net.minecraft.world.gen.placement.IPlacementConfig;
|
||||
import net.minecraft.world.gen.placement.LakeChanceConfig;
|
||||
import net.minecraft.world.gen.surfacebuilders.CompositeSurfaceBuilder;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class DeadForestBiome extends BiomeBOP
|
||||
{
|
||||
public DeadForestBiome()
|
||||
{
|
||||
super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.FOREST).depth(0.2F).scale(0.2F).temperature(0.3F).downfall(0.3F).waterColor(4159204).waterFogColor(329011).parent((String)null));
|
||||
|
||||
// Mineshafts and Strongholds
|
||||
this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL));
|
||||
this.addStructure(Feature.STRONGHOLD, new StrongholdConfig());
|
||||
|
||||
this.addCarver(GenerationStage.Carving.AIR, createWorldCarverWrapper(CAVE_WORLD_CARVER, new ProbabilityConfig(0.14285715F)));
|
||||
this.addCarver(GenerationStage.Carving.AIR, createWorldCarverWrapper(CANYON_WORLD_CARVER, new ProbabilityConfig(0.02F)));
|
||||
|
||||
this.addStructureFeatures();
|
||||
|
||||
// Lakes
|
||||
this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(4)));
|
||||
this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.LAVA), LAVA_LAKE, new LakeChanceConfig(80)));
|
||||
|
||||
// Underground
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_STRUCTURES, createCompositeFeature(Feature.DUNGEONS, IFeatureConfig.NO_FEATURE_CONFIG, DUNGEON_ROOM, new DungeonRoomConfig(8)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIRT.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GRAVEL.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(8, 0, 0, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GRANITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIORITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.ANDESITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.COAL_ORE.getDefaultState(), 17), COUNT_RANGE, new CountRangeConfig(20, 0, 0, 128)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.IRON_ORE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(20, 0, 0, 64)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GOLD_ORE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(2, 0, 0, 32)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.REDSTONE_ORE.getDefaultState(), 8), COUNT_RANGE, new CountRangeConfig(8, 0, 0, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIAMOND_ORE.getDefaultState(), 8), COUNT_RANGE, new CountRangeConfig(1, 0, 0, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.LAPIS_ORE.getDefaultState(), 7), DEPTH_AVERAGE, new DepthAverageConfig(1, 16, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.SAND, 7, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(3)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.CLAY, 4, 1, Lists.newArrayList(Blocks.DIRT, Blocks.CLAY)), TOP_SOLID, new FrequencyConfig(1)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.GRAVEL, 6, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(1)));
|
||||
|
||||
// Vegetation
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.DYING_TREE, BOPBiomeFeatures.DEAD_TREE, BOPBiomeFeatures.TALL_SPRUCE_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.4F, 0.1F, 0.2F}, BOPBiomeFeatures.OAK_TREE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(2, 0.4F, 1)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(3)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.PUMPKIN, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(32)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.LAVA), HEIGHT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, createCompositeFeature(Feature.ICE_AND_SNOW, IFeatureConfig.NO_FEATURE_CONFIG, PASSTHROUGH, IPlacementConfig.NO_PLACEMENT_CONFIG));
|
||||
|
||||
// Entity spawning
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.COW, 8, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.SQUID, 10, 1, 2));
|
||||
this.addSpawn(EnumCreatureType.AMBIENT, new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
|
||||
|
||||
this.addWeight(BOPClimates.BOREAL, 3);
|
||||
this.addWeight(BOPClimates.DRY_TEMPERATE, 3);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int getGrassColor(BlockPos pos)
|
||||
{
|
||||
return 0xBCA165;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int getFoliageColor(BlockPos pos)
|
||||
{
|
||||
return 0xBCA165;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/*******************************************************************************
|
||||
* 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 com.google.common.collect.Lists;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeBOP;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Fluids;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.BushConfig;
|
||||
import net.minecraft.world.gen.feature.DoublePlantConfig;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.IFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.LakesConfig;
|
||||
import net.minecraft.world.gen.feature.LiquidsConfig;
|
||||
import net.minecraft.world.gen.feature.MinableConfig;
|
||||
import net.minecraft.world.gen.feature.ProbabilityConfig;
|
||||
import net.minecraft.world.gen.feature.RandomDefaultFeatureListConfig;
|
||||
import net.minecraft.world.gen.feature.SphereReplaceConfig;
|
||||
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
|
||||
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
|
||||
import net.minecraft.world.gen.feature.structure.StrongholdConfig;
|
||||
import net.minecraft.world.gen.placement.AtSurfaceWithExtraConfig;
|
||||
import net.minecraft.world.gen.placement.ChanceConfig;
|
||||
import net.minecraft.world.gen.placement.CountRangeConfig;
|
||||
import net.minecraft.world.gen.placement.DepthAverageConfig;
|
||||
import net.minecraft.world.gen.placement.DungeonRoomConfig;
|
||||
import net.minecraft.world.gen.placement.FrequencyConfig;
|
||||
import net.minecraft.world.gen.placement.IPlacementConfig;
|
||||
import net.minecraft.world.gen.placement.LakeChanceConfig;
|
||||
import net.minecraft.world.gen.surfacebuilders.CompositeSurfaceBuilder;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class DeadPlainsBiome extends BiomeBOP
|
||||
{
|
||||
public DeadPlainsBiome()
|
||||
{
|
||||
super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS).depth(0.0F).scale(0.0F).temperature(0.3F).downfall(0.3F).waterColor(4159204).waterFogColor(329011).parent((String)null));
|
||||
|
||||
// Mineshafts and Strongholds
|
||||
this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL));
|
||||
this.addStructure(Feature.STRONGHOLD, new StrongholdConfig());
|
||||
|
||||
this.addCarver(GenerationStage.Carving.AIR, createWorldCarverWrapper(CAVE_WORLD_CARVER, new ProbabilityConfig(0.14285715F)));
|
||||
this.addCarver(GenerationStage.Carving.AIR, createWorldCarverWrapper(CANYON_WORLD_CARVER, new ProbabilityConfig(0.02F)));
|
||||
|
||||
this.addStructureFeatures();
|
||||
|
||||
// Lakes
|
||||
this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(4)));
|
||||
this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.LAVA), LAVA_LAKE, new LakeChanceConfig(80)));
|
||||
|
||||
// Underground
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_STRUCTURES, createCompositeFeature(Feature.DUNGEONS, IFeatureConfig.NO_FEATURE_CONFIG, DUNGEON_ROOM, new DungeonRoomConfig(8)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIRT.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GRAVEL.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(8, 0, 0, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GRANITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIORITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.ANDESITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.COAL_ORE.getDefaultState(), 17), COUNT_RANGE, new CountRangeConfig(20, 0, 0, 128)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.IRON_ORE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(20, 0, 0, 64)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GOLD_ORE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(2, 0, 0, 32)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.REDSTONE_ORE.getDefaultState(), 8), COUNT_RANGE, new CountRangeConfig(8, 0, 0, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIAMOND_ORE.getDefaultState(), 8), COUNT_RANGE, new CountRangeConfig(1, 0, 0, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.LAPIS_ORE.getDefaultState(), 7), DEPTH_AVERAGE, new DepthAverageConfig(1, 16, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.SAND, 7, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(3)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.CLAY, 4, 1, Lists.newArrayList(Blocks.DIRT, Blocks.CLAY)), TOP_SOLID, new FrequencyConfig(1)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.GRAVEL, 6, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(1)));
|
||||
|
||||
// Vegetation
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.DYING_TREE}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.2F}, BOPBiomeFeatures.OAK_TREE, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig((int)0.95, 0.2F, 1)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(5)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.PUMPKIN, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(32)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.LAVA), HEIGHT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, createCompositeFeature(Feature.ICE_AND_SNOW, IFeatureConfig.NO_FEATURE_CONFIG, PASSTHROUGH, IPlacementConfig.NO_PLACEMENT_CONFIG));
|
||||
|
||||
// Entity spawning
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.COW, 8, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.SQUID, 10, 1, 2));
|
||||
this.addSpawn(EnumCreatureType.AMBIENT, new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int getGrassColor(BlockPos pos)
|
||||
{
|
||||
return 0xBCA165;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int getFoliageColor(BlockPos pos)
|
||||
{
|
||||
return 0xBCA165;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
/*******************************************************************************
|
||||
* 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 com.google.common.collect.Lists;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeBOP;
|
||||
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
|
||||
import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Fluids;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.BushConfig;
|
||||
import net.minecraft.world.gen.feature.DoublePlantConfig;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.IFeatureConfig;
|
||||
import net.minecraft.world.gen.feature.LakesConfig;
|
||||
import net.minecraft.world.gen.feature.LiquidsConfig;
|
||||
import net.minecraft.world.gen.feature.MinableConfig;
|
||||
import net.minecraft.world.gen.feature.ProbabilityConfig;
|
||||
import net.minecraft.world.gen.feature.RandomDefaultFeatureListConfig;
|
||||
import net.minecraft.world.gen.feature.SphereReplaceConfig;
|
||||
import net.minecraft.world.gen.feature.structure.MineshaftConfig;
|
||||
import net.minecraft.world.gen.feature.structure.MineshaftStructure;
|
||||
import net.minecraft.world.gen.feature.structure.StrongholdConfig;
|
||||
import net.minecraft.world.gen.placement.AtSurfaceWithExtraConfig;
|
||||
import net.minecraft.world.gen.placement.ChanceConfig;
|
||||
import net.minecraft.world.gen.placement.CountRangeConfig;
|
||||
import net.minecraft.world.gen.placement.DepthAverageConfig;
|
||||
import net.minecraft.world.gen.placement.DungeonRoomConfig;
|
||||
import net.minecraft.world.gen.placement.FrequencyConfig;
|
||||
import net.minecraft.world.gen.placement.IPlacementConfig;
|
||||
import net.minecraft.world.gen.placement.LakeChanceConfig;
|
||||
import net.minecraft.world.gen.surfacebuilders.CompositeSurfaceBuilder;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class GroveBiome extends BiomeBOP
|
||||
{
|
||||
public GroveBiome()
|
||||
{
|
||||
super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.FOREST).depth(0.2F).scale(0.5F).temperature(0.8F).downfall(0.5F).waterColor(4159204).waterFogColor(329011).parent((String)null));
|
||||
|
||||
// Mineshafts and Strongholds
|
||||
this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL));
|
||||
this.addStructure(Feature.STRONGHOLD, new StrongholdConfig());
|
||||
|
||||
this.addCarver(GenerationStage.Carving.AIR, createWorldCarverWrapper(CAVE_WORLD_CARVER, new ProbabilityConfig(0.14285715F)));
|
||||
this.addCarver(GenerationStage.Carving.AIR, createWorldCarverWrapper(CANYON_WORLD_CARVER, new ProbabilityConfig(0.02F)));
|
||||
|
||||
this.addStructureFeatures();
|
||||
|
||||
// Lakes
|
||||
this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.WATER), LAKE_WATER, new LakeChanceConfig(4)));
|
||||
this.addFeature(GenerationStage.Decoration.LOCAL_MODIFICATIONS, createCompositeFeature(Feature.LAKES, new LakesConfig(Blocks.LAVA), LAVA_LAKE, new LakeChanceConfig(80)));
|
||||
|
||||
// Underground
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_STRUCTURES, createCompositeFeature(Feature.DUNGEONS, IFeatureConfig.NO_FEATURE_CONFIG, DUNGEON_ROOM, new DungeonRoomConfig(8)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIRT.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GRAVEL.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(8, 0, 0, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GRANITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIORITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.ANDESITE.getDefaultState(), 33), COUNT_RANGE, new CountRangeConfig(10, 0, 0, 80)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.COAL_ORE.getDefaultState(), 17), COUNT_RANGE, new CountRangeConfig(20, 0, 0, 128)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.IRON_ORE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(20, 0, 0, 64)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.GOLD_ORE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(2, 0, 0, 32)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.REDSTONE_ORE.getDefaultState(), 8), COUNT_RANGE, new CountRangeConfig(8, 0, 0, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.DIAMOND_ORE.getDefaultState(), 8), COUNT_RANGE, new CountRangeConfig(1, 0, 0, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.LAPIS_ORE.getDefaultState(), 7), DEPTH_AVERAGE, new DepthAverageConfig(1, 16, 16)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.SAND, 7, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(3)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.CLAY, 4, 1, Lists.newArrayList(Blocks.DIRT, Blocks.CLAY)), TOP_SOLID, new FrequencyConfig(1)));
|
||||
this.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, createCompositeFeature(Feature.SPHERE_REPLACE, new SphereReplaceConfig(Blocks.GRAVEL, 6, 2, Lists.newArrayList(Blocks.DIRT, Blocks.GRASS_BLOCK)), TOP_SOLID, new FrequencyConfig(1)));
|
||||
|
||||
// Vegetation
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.RANDOM_FEATURE_LIST, new RandomDefaultFeatureListConfig(new Feature[]{BOPBiomeFeatures.BIG_FLOWERING_OAK_TREE, BOPBiomeFeatures.BIRCH_POPLAR, BOPBiomeFeatures.SPRUCE_POPLAR}, new IFeatureConfig[]{IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG, IFeatureConfig.NO_FEATURE_CONFIG}, new float[]{0.1F, 0.3F, 0.3F}, BOPBiomeFeatures.BUSH, IFeatureConfig.NO_FEATURE_CONFIG), AT_SURFACE_WITH_EXTRA, new AtSurfaceWithExtraConfig(3, 0.4F, 1)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(3)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFlowerFeature(BOPBiomeFeatures.EXTENDED_FLOWERS, SURFACE_PLUS_32, new FrequencyConfig(4)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.LILAC.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(1)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.DOUBLE_PLANT, new DoublePlantConfig(Blocks.PEONY.getDefaultState()), SURFACE_PLUS_32, new FrequencyConfig(1)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.bush), TWICE_SURFACE, new FrequencyConfig(13)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.PUMPKIN, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(32)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.LAVA), HEIGHT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256)));
|
||||
this.addFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, createCompositeFeature(Feature.ICE_AND_SNOW, IFeatureConfig.NO_FEATURE_CONFIG, PASSTHROUGH, IPlacementConfig.NO_PLACEMENT_CONFIG));
|
||||
|
||||
// Entity spawning
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.SHEEP, 12, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.COW, 8, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.SQUID, 10, 1, 2));
|
||||
this.addSpawn(EnumCreatureType.AMBIENT, new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE, 95, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SKELETON, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.CREEPER, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
|
||||
|
||||
this.addWeight(BOPClimates.MEDITERRANEAN, 10);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int getGrassColor(BlockPos pos)
|
||||
{
|
||||
return 0xA9BB53;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public int getFoliageColor(BlockPos pos)
|
||||
{
|
||||
return 0x73A828;
|
||||
}
|
||||
}
|
|
@ -46,11 +46,11 @@ import net.minecraft.world.gen.surfacebuilders.CompositeSurfaceBuilder;
|
|||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class OrchardBiome extends BiomeBOP
|
||||
public class GroveOrchardBiome extends BiomeBOP
|
||||
{
|
||||
public OrchardBiome()
|
||||
public GroveOrchardBiome()
|
||||
{
|
||||
super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS).depth(0.05F).scale(0.1F).temperature(0.8F).downfall(0.7F).waterColor(4159204).waterFogColor(329011).parent((String)null));
|
||||
super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS).depth(0.05F).scale(0.1F).temperature(0.8F).downfall(0.5F).waterColor(4159204).waterFogColor(329011).parent((String)null));
|
||||
|
||||
// Mineshafts and Strongholds
|
||||
this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL));
|
||||
|
@ -97,8 +97,6 @@ public class OrchardBiome extends BiomeBOP
|
|||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.PIG, 10, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.CHICKEN, 10, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.COW, 8, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.HORSE, 5, 2, 6));
|
||||
this.addSpawn(EnumCreatureType.CREATURE, new Biome.SpawnListEntry(EntityType.DONKEY, 1, 1, 3));
|
||||
this.addSpawn(EnumCreatureType.WATER_CREATURE, new Biome.SpawnListEntry(EntityType.SQUID, 10, 1, 2));
|
||||
this.addSpawn(EnumCreatureType.AMBIENT, new Biome.SpawnListEntry(EntityType.BAT, 10, 8, 8));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SPIDER, 100, 4, 4));
|
||||
|
@ -109,9 +107,6 @@ public class OrchardBiome extends BiomeBOP
|
|||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.SLIME, 100, 4, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.ENDERMAN, 10, 1, 4));
|
||||
this.addSpawn(EnumCreatureType.MONSTER, new Biome.SpawnListEntry(EntityType.WITCH, 5, 1, 1));
|
||||
|
||||
this.addWeight(BOPClimates.MEDITERRANEAN, 5);
|
||||
this.addWeight(BOPClimates.WARM_TEMPERATE, 3);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
|
@ -10,9 +10,9 @@ package biomesoplenty.common.world.gen.feature;
|
|||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.common.world.gen.feature.tree.BasicTreeFeature;
|
||||
import biomesoplenty.common.world.gen.feature.tree.BigTreeFeature;
|
||||
import biomesoplenty.common.world.gen.feature.tree.BulbTreeFeature;
|
||||
import biomesoplenty.common.world.gen.feature.tree.BushTreeFeature;
|
||||
import biomesoplenty.common.world.gen.feature.tree.MahoganyTreeFeature;
|
||||
import biomesoplenty.common.world.gen.feature.tree.PoplarTreeFeature;
|
||||
import biomesoplenty.common.world.gen.feature.tree.RedwoodTreeFeature;
|
||||
import biomesoplenty.common.world.gen.feature.tree.TaigaTreeFeature;
|
||||
import biomesoplenty.common.world.gen.feature.tree.TwigletTreeFeature;
|
||||
|
@ -20,7 +20,6 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.world.gen.feature.AbstractFlowersFeature;
|
||||
import net.minecraft.world.gen.feature.AbstractTreeFeature;
|
||||
import net.minecraft.world.gen.feature.NoFeatureConfig;
|
||||
import net.minecraft.world.gen.surfacebuilders.ExtremeHillsSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.ISurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilderConfig;
|
||||
|
||||
|
@ -61,7 +60,8 @@ public class BOPBiomeFeatures
|
|||
public static final AbstractTreeFeature<NoFeatureConfig> ACACIA_TWIGLET_SMALL = new TwigletTreeFeature.Builder().placeOn((world, pos) -> world.getBlockState(pos).getBlock() == Blocks.SAND).log(Blocks.ACACIA_LOG.getDefaultState()).leaves(Blocks.ACACIA_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create();
|
||||
public static final AbstractTreeFeature<NoFeatureConfig> DARK_OAK_TWIGLET_TREE = new TwigletTreeFeature.Builder().log(Blocks.DARK_OAK_LOG.getDefaultState()).leaves(Blocks.DARK_OAK_LEAVES.getDefaultState()).minHeight(1).maxHeight(2).create();
|
||||
public static final AbstractTreeFeature<NoFeatureConfig> TALL_TWIGLET_TREE = new TwigletTreeFeature.Builder().minHeight(2).maxHeight(4).create();
|
||||
public static final AbstractTreeFeature<NoFeatureConfig> BULB_TREE = new BulbTreeFeature.Builder().create();
|
||||
public static final AbstractTreeFeature<NoFeatureConfig> SPRUCE_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.SPRUCE_LOG.getDefaultState()).leaves(Blocks.SPRUCE_LEAVES.getDefaultState()).create();
|
||||
public static final AbstractTreeFeature<NoFeatureConfig> BIRCH_POPLAR = new PoplarTreeFeature.Builder().log(Blocks.BIRCH_LOG.getDefaultState()).leaves(Blocks.BIRCH_LEAVES.getDefaultState()).create();
|
||||
public static final AbstractTreeFeature<NoFeatureConfig> MAHOGANY_TREE = new MahoganyTreeFeature.Builder().create();
|
||||
public static final AbstractTreeFeature<NoFeatureConfig> TALL_SPRUCE_TREE = new TaigaTreeFeature.Builder().log(Blocks.SPRUCE_LOG.getDefaultState()).leaves(Blocks.SPRUCE_LEAVES.getDefaultState()).maxHeight(13).create();
|
||||
public static final AbstractTreeFeature<NoFeatureConfig> SWAMP_TREE = new BasicTreeFeature.Builder().vine(Blocks.VINE.getDefaultState()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leavesOffset(0).create();
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.world.gen.feature.tree;
|
||||
|
||||
import biomesoplenty.common.util.biome.GeneratorUtil;
|
||||
import biomesoplenty.common.util.block.IBlockPosQuery;
|
||||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
public class PoplarTreeFeature extends TreeFeatureBase
|
||||
{
|
||||
public static class Builder extends BuilderBase<PoplarTreeFeature.Builder, PoplarTreeFeature>
|
||||
{
|
||||
public Builder()
|
||||
{
|
||||
this.minHeight = 9;
|
||||
this.maxHeight = 17;
|
||||
|
||||
this.replace = (world, pos) ->
|
||||
{
|
||||
Material mat = world.getBlockState(pos).getMaterial();
|
||||
return mat == Material.AIR || mat == Material.LEAVES;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public PoplarTreeFeature create()
|
||||
{
|
||||
return new PoplarTreeFeature(this.updateNeighbours, this.placeOn, this.replace, this.log, this.leaves, this.altLeaves, this.vine, this.hanging, this.trunkFruit, this.minHeight, this.maxHeight);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected PoplarTreeFeature(boolean notify, IBlockPosQuery placeOn, IBlockPosQuery replace, IBlockState log, IBlockState leaves, IBlockState altLeaves, IBlockState vine, IBlockState hanging, IBlockState trunkFruit, int minHeight, int maxHeight)
|
||||
{
|
||||
super(notify, placeOn, replace, log, leaves, altLeaves, vine, hanging, trunkFruit, minHeight, maxHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean place(Set<BlockPos> changedBlocks, IWorld world, Random random, BlockPos startPos)
|
||||
{
|
||||
|
||||
// Move down until we reach the ground
|
||||
while (startPos.getY() > 1 && world.isAirBlock(startPos) || world.getBlockState(startPos).getMaterial() == Material.LEAVES) {startPos = startPos.down();}
|
||||
|
||||
if (!this.placeOn.matches(world, startPos))
|
||||
{
|
||||
// Abandon if we can't place the tree on this block
|
||||
return false;
|
||||
}
|
||||
|
||||
// Choose heights and width
|
||||
int height = GeneratorUtil.nextIntBetween(random, this.minHeight, this.maxHeight);
|
||||
if (height < 4) {return false;}
|
||||
int baseHeight = height / (2 + random.nextInt(3));
|
||||
int leavesHeight = height - baseHeight;
|
||||
|
||||
// Move up to space above ground
|
||||
BlockPos pos = startPos.up();
|
||||
|
||||
if (!this.checkSpace(world, pos, baseHeight, height))
|
||||
{
|
||||
// Abandon if there isn't enough room
|
||||
return false;
|
||||
}
|
||||
|
||||
// Generate bottom of tree (trunk only)
|
||||
for(int i = 0; i < baseHeight; i++)
|
||||
{
|
||||
this.setLog(changedBlocks, world, pos);
|
||||
pos = pos.up();
|
||||
}
|
||||
|
||||
// Generate middle of the tree
|
||||
for(int i = 0; i < leavesHeight; i++)
|
||||
{
|
||||
int radius = radius(i, leavesHeight);
|
||||
this.generateLeafLayer(world, pos, radius);
|
||||
if (leavesHeight - i > 2) {this.setLog(changedBlocks, world, pos);}
|
||||
pos = pos.up();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int radius(int height, int maxHeight)
|
||||
{
|
||||
float x = (float)height / (float)maxHeight;
|
||||
float maxRadius = 1.0F + maxHeight * 0.10F;
|
||||
// this function creates a curved profile which has its widest point 1/4 from the bottom and a pointy top
|
||||
float r = maxRadius * 0.6667F * x * (1/(x*x + 0.08173F) - 0.9244F);
|
||||
return (int)(r + 0.5F);
|
||||
}
|
||||
|
||||
public boolean checkSpace(IWorld world, BlockPos pos, int baseHeight, int height)
|
||||
{
|
||||
for (int y = 0; y <= height; y++)
|
||||
{
|
||||
// require 3x3 for the leaves, 1x1 for the trunk
|
||||
int radius = (y <= baseHeight ? 0 : 1);
|
||||
for (int x = -radius; x <= radius; x++)
|
||||
{
|
||||
for (int z = -radius; z <= radius; z++)
|
||||
{
|
||||
BlockPos pos1 = pos.add(x, y, z);
|
||||
// note, there may be a sapling on the first layer - make sure this.replace matches it!
|
||||
if (pos1.getY() >= 255 || !this.replace.matches(world, pos1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// generates a layer of leafs with the given radius
|
||||
public void generateLeafLayer(IWorld world, BlockPos pos, int radius)
|
||||
{
|
||||
for(int x = -radius; x <= radius; x++)
|
||||
{
|
||||
for(int z = -radius; z <= radius; z++)
|
||||
{
|
||||
if (x*x + z*z <= radius*radius)
|
||||
{
|
||||
this.setLeaves(world, pos.add(x, 0, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,6 +15,8 @@ import biomesoplenty.common.biome.overworld.AlpsBiome;
|
|||
import biomesoplenty.common.biome.overworld.CherryBlossomGroveBiome;
|
||||
import biomesoplenty.common.biome.overworld.ColdDesertBiome;
|
||||
import biomesoplenty.common.biome.overworld.ConiferousForestBiome;
|
||||
import biomesoplenty.common.biome.overworld.DeadForestBiome;
|
||||
import biomesoplenty.common.biome.overworld.DeadPlainsBiome;
|
||||
import biomesoplenty.common.biome.overworld.FlowerMeadowBiome;
|
||||
import biomesoplenty.common.biome.overworld.BogBiome;
|
||||
import biomesoplenty.common.biome.overworld.BogMireBiome;
|
||||
|
@ -22,13 +24,14 @@ import biomesoplenty.common.biome.overworld.BorealForestBiome;
|
|||
import biomesoplenty.common.biome.overworld.BrushlandBiome;
|
||||
import biomesoplenty.common.biome.overworld.ChaparralBiome;
|
||||
import biomesoplenty.common.biome.overworld.GrasslandBiome;
|
||||
import biomesoplenty.common.biome.overworld.GroveBiome;
|
||||
import biomesoplenty.common.biome.overworld.LavenderFieldsBiome;
|
||||
import biomesoplenty.common.biome.overworld.LushSwampBiome;
|
||||
import biomesoplenty.common.biome.overworld.MapleWoodsBiome;
|
||||
import biomesoplenty.common.biome.overworld.MeadowBiome;
|
||||
import biomesoplenty.common.biome.overworld.MysticGroveBiome;
|
||||
import biomesoplenty.common.biome.overworld.OminousWoodsBiome;
|
||||
import biomesoplenty.common.biome.overworld.OrchardBiome;
|
||||
import biomesoplenty.common.biome.overworld.GroveOrchardBiome;
|
||||
import biomesoplenty.common.biome.overworld.OriginHillsBiome;
|
||||
import biomesoplenty.common.biome.overworld.OutbackBiome;
|
||||
import biomesoplenty.common.biome.overworld.PastureBiome;
|
||||
|
@ -77,15 +80,18 @@ public class ModBiomes
|
|||
cherry_blossom_grove = registerBiome(new CherryBlossomGroveBiome(), "cherry_blossom_grove");
|
||||
cold_desert = registerBiome(new ColdDesertBiome(), "cold_desert");
|
||||
coniferous_forest = registerBiome(new ConiferousForestBiome(), "coniferous_forest");
|
||||
dead_forest = registerBiome(new DeadForestBiome(), "dead_forest");
|
||||
dead_plains = registerBiome(new DeadPlainsBiome(), "dead_plains");
|
||||
flower_meadow = registerBiome(new FlowerMeadowBiome(), "flower_meadow");
|
||||
grassland = registerBiome(new GrasslandBiome(), "grassland");
|
||||
grove = registerBiome(new GroveBiome(), "grove");
|
||||
grove_orchard = registerBiome(new GroveOrchardBiome(), "grove_orchard");
|
||||
lavender_fields = registerBiome(new LavenderFieldsBiome(), "lavender_fields");
|
||||
lush_swamp = registerBiome(new LushSwampBiome(), "lush_swamp");
|
||||
maple_woods = registerBiome(new MapleWoodsBiome(), "maple_woods");
|
||||
meadow = registerBiome(new MeadowBiome(), "meadow");
|
||||
mystic_grove = registerBiome(new MysticGroveBiome(), "mystic_grove");
|
||||
ominous_woods = registerBiome(new OminousWoodsBiome(), "ominous_woods");
|
||||
orchard = registerBiome(new OrchardBiome(), "orchard");
|
||||
origin_hills = registerBiome(new OriginHillsBiome(), "origin_hills");
|
||||
outback = registerBiome(new OutbackBiome(), "outback");
|
||||
pasture = registerBiome(new PastureBiome(), "pasture");
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
"biome.biomesoplenty.grassland": "Grassland",
|
||||
"biome.biomesoplenty.gravel_beach": "Gravel Beach",
|
||||
"biome.biomesoplenty.grove": "Grove",
|
||||
"biome.biomesoplenty.grove_orchard": "Grove Orchard",
|
||||
"biome.biomesoplenty.highland": "Highland",
|
||||
"biome.biomesoplenty.highland_moor": "Highland Moor",
|
||||
"biome.biomesoplenty.lake": "Lake",
|
||||
|
@ -54,7 +55,6 @@
|
|||
"biome.biomesoplenty.mystic_grove": "Mystic Grove",
|
||||
"biome.biomesoplenty.oasis": "Oasis",
|
||||
"biome.biomesoplenty.ominous_woods": "Ominous Woods",
|
||||
"biome.biomesoplenty.orchard": "Orchard",
|
||||
"biome.biomesoplenty.origin_beach": "Origin Beach",
|
||||
"biome.biomesoplenty.origin_hills": "Origin Hills",
|
||||
"biome.biomesoplenty.outback": "Outback",
|
||||
|
|
Loading…
Reference in a new issue