Re-added Meadow biome (Missing Meadow Forest sub-biome)
This commit is contained in:
parent
46ca1b6fac
commit
62877eb0bb
3 changed files with 105 additions and 0 deletions
|
@ -50,6 +50,7 @@ public class BOPBiomes
|
||||||
public static Optional<BiomeGenBase> lavender_fields = Optional.absent();
|
public static Optional<BiomeGenBase> lavender_fields = Optional.absent();
|
||||||
public static Optional<BiomeGenBase> maple_woods = Optional.absent();
|
public static Optional<BiomeGenBase> maple_woods = Optional.absent();
|
||||||
public static Optional<BiomeGenBase> marsh = Optional.absent();
|
public static Optional<BiomeGenBase> marsh = Optional.absent();
|
||||||
|
public static Optional<BiomeGenBase> meadow = Optional.absent();
|
||||||
public static Optional<BiomeGenBase> moor = Optional.absent();
|
public static Optional<BiomeGenBase> moor = Optional.absent();
|
||||||
public static Optional<BiomeGenBase> mountain = Optional.absent();
|
public static Optional<BiomeGenBase> mountain = Optional.absent();
|
||||||
public static Optional<BiomeGenBase> origin_valley = Optional.absent();
|
public static Optional<BiomeGenBase> origin_valley = Optional.absent();
|
||||||
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
package biomesoplenty.common.biome.overworld;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockDoublePlant;
|
||||||
|
import net.minecraft.block.BlockPlanks;
|
||||||
|
import net.minecraft.block.BlockTallGrass;
|
||||||
|
import net.minecraft.entity.passive.EntityWolf;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
|
import biomesoplenty.api.biome.BOPBiome;
|
||||||
|
import biomesoplenty.api.biome.generation.GeneratorStage;
|
||||||
|
import biomesoplenty.api.biome.generation.GeneratorWeighted;
|
||||||
|
import biomesoplenty.api.block.BOPBlocks;
|
||||||
|
import biomesoplenty.common.block.BlockBOPCoral;
|
||||||
|
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||||
|
import biomesoplenty.common.block.BlockBOPLilypad;
|
||||||
|
import biomesoplenty.common.enums.BOPClimates;
|
||||||
|
import biomesoplenty.common.enums.BOPFlowers;
|
||||||
|
import biomesoplenty.common.enums.BOPGems;
|
||||||
|
import biomesoplenty.common.enums.BOPPlants;
|
||||||
|
import biomesoplenty.common.enums.BOPTrees;
|
||||||
|
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||||
|
import biomesoplenty.common.world.BOPWorldSettings;
|
||||||
|
import biomesoplenty.common.world.feature.GeneratorDoubleFlora;
|
||||||
|
import biomesoplenty.common.world.feature.GeneratorFlora;
|
||||||
|
import biomesoplenty.common.world.feature.GeneratorGrass;
|
||||||
|
import biomesoplenty.common.world.feature.GeneratorOreSingle;
|
||||||
|
import biomesoplenty.common.world.feature.GeneratorWaterside;
|
||||||
|
import biomesoplenty.common.world.feature.tree.GeneratorBasicTree;
|
||||||
|
import biomesoplenty.common.world.feature.tree.GeneratorBush;
|
||||||
|
import biomesoplenty.common.world.feature.tree.GeneratorTaigaTree;
|
||||||
|
|
||||||
|
public class BiomeGenMeadow extends BOPBiome
|
||||||
|
{
|
||||||
|
public BiomeGenMeadow()
|
||||||
|
{
|
||||||
|
// terrain
|
||||||
|
this.terrainSettings.avgHeight(64).heightVariation(5, 5).octaves(0, 1, 2, 2, 1, 0).sidewaysNoise(0.1D);
|
||||||
|
|
||||||
|
this.setColor(0x63B26D);
|
||||||
|
this.setTemperatureRainfall(0.7F, 0.7F);
|
||||||
|
this.addWeight(BOPClimates.WET_TEMPERATE, 10);
|
||||||
|
this.addWeight(BOPClimates.COOL_TEMPERATE, 7);
|
||||||
|
|
||||||
|
// trees & logs
|
||||||
|
GeneratorWeighted treeGenerator = new GeneratorWeighted(2);
|
||||||
|
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||||
|
treeGenerator.add("spruce_bush", 4, (new GeneratorBush.Builder()).maxHeight(2).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).create());
|
||||||
|
treeGenerator.add("spruce", 4, (new GeneratorTaigaTree.Builder()).maxHeight(13).create()); // TODO: implement pine cones
|
||||||
|
|
||||||
|
// grasses
|
||||||
|
GeneratorWeighted grassGenerator = new GeneratorWeighted(5.0F);
|
||||||
|
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||||
|
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||||
|
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||||
|
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||||
|
|
||||||
|
// flowers
|
||||||
|
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
|
||||||
|
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||||
|
flowerGenerator.add("clover", 2, (new GeneratorFlora.Builder().with(BOPFlowers.CLOVER).create()));
|
||||||
|
flowerGenerator.add("blue_hydrangeas", 3, (new GeneratorFlora.Builder().with(BOPFlowers.BLUE_HYDRANGEA).create()));
|
||||||
|
flowerGenerator.add("syringa", 1, (new GeneratorDoubleFlora.Builder().with(BlockDoublePlant.EnumPlantType.SYRINGA).create()));
|
||||||
|
flowerGenerator.add("sunflower", 2, (new GeneratorDoubleFlora.Builder().with(BlockDoublePlant.EnumPlantType.SUNFLOWER).create()));
|
||||||
|
flowerGenerator.add("sunflower", 1, (new GeneratorDoubleFlora.Builder().with(BlockDoublePlant.EnumPlantType.ROSE).create()));
|
||||||
|
|
||||||
|
// other plants
|
||||||
|
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.BUSH).create());
|
||||||
|
this.addGenerator("flax", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).generationAttempts(6).create());
|
||||||
|
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SHRUB).create());
|
||||||
|
this.addGenerator("wild_carrots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.WILDCARROT).create());
|
||||||
|
this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.CLOVERPATCH).create());
|
||||||
|
|
||||||
|
// water plants
|
||||||
|
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).replace(Blocks.water).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||||
|
this.addGenerator("duckweed", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.DUCKWEED).generationAttempts(32).create());
|
||||||
|
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||||
|
|
||||||
|
// gem
|
||||||
|
this.addGenerator("peridot", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.PERIDOT).create());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void applySettings(BOPWorldSettings settings)
|
||||||
|
{
|
||||||
|
if (!settings.generateBopGems) {this.removeGenerator("peridot");}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getGrassColorAtPos(BlockPos pos)
|
||||||
|
{
|
||||||
|
return 0x63B26D;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFoliageColorAtPos(BlockPos pos)
|
||||||
|
{
|
||||||
|
return 0x63B26D;
|
||||||
|
}
|
||||||
|
}
|
|
@ -49,6 +49,7 @@ import static biomesoplenty.api.biome.BOPBiomes.jungle_extension;
|
||||||
import static biomesoplenty.api.biome.BOPBiomes.lavender_fields;
|
import static biomesoplenty.api.biome.BOPBiomes.lavender_fields;
|
||||||
import static biomesoplenty.api.biome.BOPBiomes.maple_woods;
|
import static biomesoplenty.api.biome.BOPBiomes.maple_woods;
|
||||||
import static biomesoplenty.api.biome.BOPBiomes.marsh;
|
import static biomesoplenty.api.biome.BOPBiomes.marsh;
|
||||||
|
import static biomesoplenty.api.biome.BOPBiomes.meadow;
|
||||||
import static biomesoplenty.api.biome.BOPBiomes.mesa_extension;
|
import static biomesoplenty.api.biome.BOPBiomes.mesa_extension;
|
||||||
import static biomesoplenty.api.biome.BOPBiomes.moor;
|
import static biomesoplenty.api.biome.BOPBiomes.moor;
|
||||||
import static biomesoplenty.api.biome.BOPBiomes.mountain;
|
import static biomesoplenty.api.biome.BOPBiomes.mountain;
|
||||||
|
@ -124,6 +125,7 @@ import biomesoplenty.common.biome.overworld.BiomeGenJadeCliffs;
|
||||||
import biomesoplenty.common.biome.overworld.BiomeGenLavenderFields;
|
import biomesoplenty.common.biome.overworld.BiomeGenLavenderFields;
|
||||||
import biomesoplenty.common.biome.overworld.BiomeGenMapleWoods;
|
import biomesoplenty.common.biome.overworld.BiomeGenMapleWoods;
|
||||||
import biomesoplenty.common.biome.overworld.BiomeGenMarsh;
|
import biomesoplenty.common.biome.overworld.BiomeGenMarsh;
|
||||||
|
import biomesoplenty.common.biome.overworld.BiomeGenMeadow;
|
||||||
import biomesoplenty.common.biome.overworld.BiomeGenMoor;
|
import biomesoplenty.common.biome.overworld.BiomeGenMoor;
|
||||||
import biomesoplenty.common.biome.overworld.BiomeGenMountain;
|
import biomesoplenty.common.biome.overworld.BiomeGenMountain;
|
||||||
import biomesoplenty.common.biome.overworld.BiomeGenOriginValley;
|
import biomesoplenty.common.biome.overworld.BiomeGenOriginValley;
|
||||||
|
@ -345,6 +347,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
|
||||||
lavender_fields = registerBOPBiome(new BiomeGenLavenderFields(), "Lavender Fields");
|
lavender_fields = registerBOPBiome(new BiomeGenLavenderFields(), "Lavender Fields");
|
||||||
maple_woods = registerBOPBiome(new BiomeGenMapleWoods(), "Maple Woods");
|
maple_woods = registerBOPBiome(new BiomeGenMapleWoods(), "Maple Woods");
|
||||||
marsh = registerBOPBiome(new BiomeGenMarsh(), "Marsh");
|
marsh = registerBOPBiome(new BiomeGenMarsh(), "Marsh");
|
||||||
|
meadow = registerBOPBiome(new BiomeGenMeadow(), "Meadow");
|
||||||
moor = registerBOPBiome(new BiomeGenMoor(), "Moor");
|
moor = registerBOPBiome(new BiomeGenMoor(), "Moor");
|
||||||
mountain = registerBOPBiome(new BiomeGenMountain(BiomeGenMountain.MountainType.PEAKS), "Mountain");
|
mountain = registerBOPBiome(new BiomeGenMountain(BiomeGenMountain.MountainType.PEAKS), "Mountain");
|
||||||
origin_valley = registerBOPBiome(new BiomeGenOriginValley(), "Origin Valley");
|
origin_valley = registerBOPBiome(new BiomeGenOriginValley(), "Origin Valley");
|
||||||
|
@ -412,6 +415,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry
|
||||||
registerBiomeToDictionary(BOPBiomes.lavender_fields, Type.MAGICAL, Type.PLAINS, Type.LUSH, Type.SPARSE);
|
registerBiomeToDictionary(BOPBiomes.lavender_fields, Type.MAGICAL, Type.PLAINS, Type.LUSH, Type.SPARSE);
|
||||||
registerBiomeToDictionary(BOPBiomes.maple_woods, Type.FOREST, Type.DENSE, Type.CONIFEROUS, Type.COLD);
|
registerBiomeToDictionary(BOPBiomes.maple_woods, Type.FOREST, Type.DENSE, Type.CONIFEROUS, Type.COLD);
|
||||||
registerBiomeToDictionary(BOPBiomes.marsh, Type.SWAMP, Type.WATER, Type.WET, Type.SPARSE, Type.LUSH);
|
registerBiomeToDictionary(BOPBiomes.marsh, Type.SWAMP, Type.WATER, Type.WET, Type.SPARSE, Type.LUSH);
|
||||||
|
registerBiomeToDictionary(BOPBiomes.meadow, Type.PLAINS, Type.FOREST, Type.LUSH, Type.SPARSE);
|
||||||
registerBiomeToDictionary(BOPBiomes.moor, Type.HILLS, Type.SWAMP, Type.SPARSE, Type.WET);
|
registerBiomeToDictionary(BOPBiomes.moor, Type.HILLS, Type.SWAMP, Type.SPARSE, Type.WET);
|
||||||
registerBiomeToDictionary(BOPBiomes.mountain, Type.MOUNTAIN, Type.FOREST, Type.DRY);
|
registerBiomeToDictionary(BOPBiomes.mountain, Type.MOUNTAIN, Type.FOREST, Type.DRY);
|
||||||
registerBiomeToDictionary(BOPBiomes.origin_valley, Type.MAGICAL, Type.SPARSE);
|
registerBiomeToDictionary(BOPBiomes.origin_valley, Type.MAGICAL, Type.SPARSE);
|
||||||
|
|
Loading…
Reference in a new issue