Added bushes to the Shrubland, added the Dense Forest
This commit is contained in:
parent
04d54ad29e
commit
73790cfe0f
|
@ -17,6 +17,7 @@ public class BOPBiomes
|
|||
public static Optional<BiomeGenBase> alps = Optional.absent();
|
||||
public static Optional<BiomeGenBase> arctic = Optional.absent();
|
||||
public static Optional<BiomeGenBase> crag = Optional.absent();
|
||||
public static Optional<BiomeGenBase> denseForest = Optional.absent();
|
||||
public static Optional<BiomeGenBase> flowerField = Optional.absent();
|
||||
public static Optional<BiomeGenBase> lavenderFields = Optional.absent();
|
||||
public static Optional<BiomeGenBase> originValley = Optional.absent();
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015, 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 java.util.Random;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiome;
|
||||
import biomesoplenty.api.biome.generation.GeneratorStage;
|
||||
import biomesoplenty.api.biome.generation.GeneratorWeighted;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.BOPPlantEnums.AllPlants;
|
||||
import biomesoplenty.api.block.BOPTreeEnums.AllTrees;
|
||||
import biomesoplenty.api.block.BOPWoodEnums.AllWoods;
|
||||
import biomesoplenty.common.block.BlockBOPLeaves;
|
||||
import biomesoplenty.common.block.BlockBOPLeaves3;
|
||||
import biomesoplenty.common.block.BlockBOPLog;
|
||||
import biomesoplenty.common.block.BlockBOPLog3;
|
||||
import biomesoplenty.common.block.BlockBOPPlant;
|
||||
import biomesoplenty.common.block.BlockGem;
|
||||
import biomesoplenty.common.block.BlockGem.GemType;
|
||||
import biomesoplenty.common.world.feature.GeneratorFlora;
|
||||
import biomesoplenty.common.world.feature.GeneratorGrass;
|
||||
import biomesoplenty.common.world.feature.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.feature.tree.GeneratorBasicTree;
|
||||
import biomesoplenty.common.world.feature.tree.GeneratorBigTree;
|
||||
import biomesoplenty.common.world.feature.tree.GeneratorBush;
|
||||
import net.minecraft.block.BlockDirt;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase.Height;
|
||||
import net.minecraft.world.chunk.ChunkPrimer;
|
||||
import net.minecraftforge.common.BiomeManager.BiomeType;
|
||||
|
||||
public class BiomeGenDenseForest extends BOPBiome
|
||||
{
|
||||
private static final Height biomeHeight = new Height(0.075F, 0.05F);
|
||||
|
||||
public BiomeGenDenseForest()
|
||||
{
|
||||
this.setHeight(biomeHeight);
|
||||
this.setColor(8246897);
|
||||
this.setTemperatureRainfall(0.7F, 0.7F);
|
||||
|
||||
this.addWeight(BiomeType.WARM, 7);
|
||||
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS, new GeneratorFlora(1, BlockBOPPlant.getVariantState(AllPlants.BUSH)));
|
||||
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS, new GeneratorFlora(1, BlockBOPPlant.getVariantState(AllPlants.BERRYBUSH)));
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS, new GeneratorFlora(1, BlockBOPPlant.getVariantState(AllPlants.SHRUB)));
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, new GeneratorFlora(2, BlockBOPPlant.getVariantState(AllPlants.REED), 128));
|
||||
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS, new GeneratorFlora(15, BlockBOPPlant.getVariantState(AllPlants.LEAFPILE), 256));
|
||||
|
||||
this.addGenerator("huge_trees", GeneratorStage.TREE, new GeneratorBigTree(7, false, 15, 25, Blocks.log.getDefaultState(), Blocks.leaves.getDefaultState()));
|
||||
this.addGenerator("leaves_clusters", GeneratorStage.POST, new GeneratorBush(7, Blocks.log.getDefaultState(), Blocks.leaves.getDefaultState()));
|
||||
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(10);
|
||||
grassGenerator.add(1, new GeneratorGrass(1, BlockBOPPlant.getVariantState(AllPlants.WHEATGRASS)));
|
||||
grassGenerator.add(1, new GeneratorGrass(1, BlockBOPPlant.getVariantState(AllPlants.DAMPGRASS)));
|
||||
grassGenerator.add(1, new GeneratorGrass(1, Blocks.tallgrass.getDefaultState().withProperty(BlockTallGrass.TYPE, BlockTallGrass.EnumType.FERN)));
|
||||
grassGenerator.add(2, new GeneratorGrass(1, Blocks.tallgrass.getDefaultState().withProperty(BlockTallGrass.TYPE, BlockTallGrass.EnumType.GRASS)));
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
|
||||
this.addGenerator("amber", GeneratorStage.SAND, new GeneratorOreSingle(BOPBlocks.gem_ore.getDefaultState().withProperty(BlockGem.VARIANT, GemType.AMBER), 12, 4, 32));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void genTerrainBlocks(World world, Random random, ChunkPrimer primer, int x, int z, double noise)
|
||||
{
|
||||
this.topBlock = Blocks.grass.getDefaultState();
|
||||
this.fillerBlock = Blocks.dirt.getDefaultState();
|
||||
|
||||
if (noise > 1.75D)
|
||||
{
|
||||
this.topBlock = Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.COARSE_DIRT);
|
||||
}
|
||||
|
||||
this.generateBiomeTerrain(world, random, primer, x, z, noise);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 8246897;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 10022742;
|
||||
}
|
||||
}
|
|
@ -47,6 +47,7 @@ public class BiomeGenShrubland extends BOPBiome
|
|||
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, new GeneratorWaterside(4, 7, Blocks.gravel.getDefaultState()));
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS, new GeneratorFlora(7, BlockBOPPlant.getVariantState(AllPlants.BUSH)));
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS, new GeneratorFlora(5, BlockBOPPlant.getVariantState(AllPlants.SHRUB)));
|
||||
this.addGenerator("flax", GeneratorStage.FLOWERS, new GeneratorDoubleFlora(1, BOPBlocks.double_plant.getDefaultState().withProperty(VARIANT, FoliageType.FLAX).withProperty(HALF, Half.LOWER), BOPBlocks.double_plant.getDefaultState().withProperty(VARIANT, FoliageType.FLAX).withProperty(HALF, Half.UPPER), 24));
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, new GeneratorFlora(3, BlockBOPPlant.getVariantState(AllPlants.REED), 128));
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.apache.commons.io.FileUtils;
|
|||
import biomesoplenty.common.biome.overworld.BiomeGenAlps;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenArctic;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenCrag;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenDenseForest;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenFlowerField;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenLavenderFields;
|
||||
import biomesoplenty.common.biome.overworld.BiomeGenOriginValley;
|
||||
|
@ -53,6 +54,7 @@ public class ModBiomes
|
|||
alps = registerBiome(new BiomeGenAlps().setBiomeName("Alps"), "alps");
|
||||
arctic = registerBiome(new BiomeGenArctic().setBiomeName("Arctic"), "arctic");
|
||||
crag = registerBiome(new BiomeGenCrag().setBiomeName("Crag"), "crag");
|
||||
denseForest = registerBiome(new BiomeGenDenseForest().setBiomeName("Dense Forest"), "dense_forest");
|
||||
flowerField = registerBiome(new BiomeGenFlowerField().setBiomeName("Flower Field"), "flower_field");
|
||||
lavenderFields = registerBiome(new BiomeGenLavenderFields().setBiomeName("Lavender Fields"), "lavender_fields");
|
||||
originValley = registerBiome(new BiomeGenOriginValley().setBiomeName("Origin Valley"), "origin_valley");
|
||||
|
|
|
@ -327,7 +327,5 @@ public class GeneratorBasicTree extends GeneratorCustomizable
|
|||
this.log = context.deserialize(json.get("log_state"), IBlockState.class);
|
||||
this.leaves = context.deserialize(json.get("leaves_state"), IBlockState.class);
|
||||
this.vine = context.deserialize(json.get("vine_state"), IBlockState.class);
|
||||
|
||||
System.out.println(amountPerChunk + " " + updateNeighbours + " " + minHeight + " " + maxHeight + " " + log + " " + leaves);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"parent": "block/leaves",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/leaves_pink_cherry"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"parent": "block/leaves",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/leaves_white_cherry"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue