use of rtg.api.world.deco.collection.DecoCollectionSmallPineTreesForest in project Realistic-Terrain-Generation by Team-RTG.
the class RealisticBiomeVanillaFlowerForest method initDecos.
@Override
public void initDecos() {
// First, let's get a few shrubs in to break things up a bit.
DecoShrub decoShrub = new DecoShrub();
decoShrub.setMaxY(110);
decoShrub.setStrengthFactor(4f);
decoShrub.setChance(3);
this.addDeco(decoShrub);
// Flowers are the most aesthetically important feature of this biome, so let's add those next.
DecoFlowersRTG decoFlowers1 = new DecoFlowersRTG();
//Only colourful 1-block-tall flowers.
decoFlowers1.setFlowers(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
// Lots and lots of flowers!
decoFlowers1.setStrengthFactor(12f);
// We're only bothered about surface flowers here.
decoFlowers1.setHeightType(DecoFlowersRTG.HeightType.GET_HEIGHT_VALUE);
this.addDeco(decoFlowers1);
DecoFlowersRTG decoFlowers2 = new DecoFlowersRTG();
//Only 2-block-tall flowers.
decoFlowers2.setFlowers(new int[] { 10, 11, 14, 15 });
// Not as many of these.
decoFlowers2.setStrengthFactor(2f);
decoFlowers2.setChance(3);
// We're only bothered about surface flowers here.
decoFlowers2.setHeightType(DecoFlowersRTG.HeightType.GET_HEIGHT_VALUE);
this.addDeco(decoFlowers2);
// Trees first.
TreeRTG ponderosaOakTree = new TreeRTGPinusPonderosa();
ponderosaOakTree.setLogBlock(Blocks.LOG.getDefaultState());
ponderosaOakTree.setLeavesBlock(Blocks.LEAVES.getDefaultState());
ponderosaOakTree.setMinTrunkSize(11);
ponderosaOakTree.setMaxTrunkSize(21);
ponderosaOakTree.setMinCrownSize(15);
ponderosaOakTree.setMaxCrownSize(29);
this.addTree(ponderosaOakTree);
DecoTree oakPines = new DecoTree(ponderosaOakTree);
oakPines.setStrengthNoiseFactorForLoops(true);
oakPines.setTreeType(DecoTree.TreeType.RTG_TREE);
oakPines.getDistribution().setNoiseDivisor(80f);
oakPines.getDistribution().setNoiseFactor(60f);
oakPines.getDistribution().setNoiseAddend(-15f);
oakPines.setTreeCondition(DecoTree.TreeCondition.ALWAYS_GENERATE);
oakPines.setTreeConditionNoise(0f);
oakPines.setTreeConditionChance(1);
oakPines.setMaxY(140);
TreeRTG ponderosaSpruceTree = new TreeRTGPinusPonderosa();
ponderosaSpruceTree.setLogBlock(BlockUtil.getStateLog(1));
ponderosaSpruceTree.setLeavesBlock(BlockUtil.getStateLeaf(1));
ponderosaSpruceTree.setMinTrunkSize(11);
ponderosaSpruceTree.setMaxTrunkSize(21);
ponderosaSpruceTree.setMinCrownSize(15);
ponderosaSpruceTree.setMaxCrownSize(29);
this.addTree(ponderosaSpruceTree);
DecoTree sprucePines = new DecoTree(ponderosaSpruceTree);
sprucePines.setStrengthNoiseFactorForLoops(true);
sprucePines.setTreeType(DecoTree.TreeType.RTG_TREE);
sprucePines.getDistribution().setNoiseDivisor(80f);
sprucePines.getDistribution().setNoiseFactor(60f);
sprucePines.getDistribution().setNoiseAddend(-15f);
sprucePines.setTreeCondition(DecoTree.TreeCondition.ALWAYS_GENERATE);
sprucePines.setTreeConditionNoise(0f);
sprucePines.setTreeConditionChance(1);
sprucePines.setMaxY(140);
DecoHelper5050 decoPines = new DecoHelper5050(oakPines, sprucePines);
this.addDeco(decoPines);
// More trees.
this.addDecoCollection(new DecoCollectionSmallPineTreesForest());
// Not much free space left, so let's give some space to the base biome.
DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations();
decoBaseBiomeDecorations.setNotEqualsZeroChance(4);
this.addDeco(decoBaseBiomeDecorations);
// Add some fallen trees of the oak and spruce variety (50/50 distribution).
DecoFallenTree decoFallenOak = new DecoFallenTree();
decoFallenOak.setLogCondition(RANDOM_CHANCE);
decoFallenOak.setLogConditionChance(8);
decoFallenOak.setMaxY(100);
decoFallenOak.setLogBlock(Blocks.LOG.getDefaultState());
decoFallenOak.setLeavesBlock(Blocks.LEAVES.getDefaultState());
decoFallenOak.setMinSize(3);
decoFallenOak.setMaxSize(6);
DecoFallenTree decoFallenSpruce = new DecoFallenTree();
decoFallenSpruce.setLogCondition(RANDOM_CHANCE);
decoFallenSpruce.setLogConditionChance(8);
decoFallenSpruce.setMaxY(100);
decoFallenSpruce.setLogBlock(BlockUtil.getStateLog(1));
decoFallenSpruce.setLeavesBlock(BlockUtil.getStateLeaf(1));
decoFallenSpruce.setMinSize(3);
decoFallenSpruce.setMaxSize(6);
DecoHelper5050 decoFallenTree = new DecoHelper5050(decoFallenOak, decoFallenSpruce);
this.addDeco(decoFallenTree, this.getConfig().ALLOW_LOGS.get());
// Grass filler.
DecoGrass decoGrass = new DecoGrass();
decoGrass.setMaxY(128);
decoGrass.setStrengthFactor(24f);
this.addDeco(decoGrass);
}
Aggregations