Search in sources :

Example 1 with TreeRTGQuercusRobur

use of rtg.api.world.gen.feature.tree.rtg.TreeRTGQuercusRobur in project Realistic-Terrain-Generation by Team-RTG.

the class RealisticBiomeBYGAutumnForest method initDecos.

@Override
public void initDecos() {
    DecoFallenTree decoFallenTree = new DecoFallenTree();
    decoFallenTree.getDistribution().setNoiseDivisor(100f);
    decoFallenTree.getDistribution().setNoiseFactor(6f);
    decoFallenTree.getDistribution().setNoiseAddend(0.8f);
    decoFallenTree.setLogCondition(NOISE_GREATER_AND_RANDOM_CHANCE);
    decoFallenTree.setLogConditionNoise(0f);
    decoFallenTree.setLogConditionChance(24);
    decoFallenTree.setLogBlock(Blocks.LOG.getDefaultState());
    decoFallenTree.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    decoFallenTree.setMinSize(3);
    decoFallenTree.setMaxSize(6);
    this.addDeco(decoFallenTree, this.getConfig().ALLOW_LOGS.get());
    DecoShrub decoShrubCika = new DecoShrub();
    decoShrubCika.setLogBlock(cikaLogBlock);
    decoShrubCika.setLeavesBlock(cikaLeavesBlock);
    decoShrubCika.setMaxY(90);
    decoShrubCika.setStrengthFactor(4f);
    decoShrubCika.setChance(8);
    this.addDeco(decoShrubCika);
    DecoShrub decoShrubOak = new DecoShrub();
    decoShrubOak.setMaxY(90);
    decoShrubOak.setStrengthFactor(4f);
    decoShrubOak.setChance(4);
    this.addDeco(decoShrubOak);
    DecoBoulder decoBoulder = new DecoBoulder();
    decoBoulder.setBoulderBlock(Blocks.COBBLESTONE.getDefaultState());
    decoBoulder.setChance(24);
    decoBoulder.setMaxY(80);
    decoBoulder.setStrengthFactor(2f);
    this.addDeco(decoBoulder);
    TreeRTG quercusRoburOakTree = new TreeRTGQuercusRobur();
    quercusRoburOakTree.setLogBlock(Blocks.LOG.getDefaultState());
    quercusRoburOakTree.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    quercusRoburOakTree.setMinTrunkSize(3);
    quercusRoburOakTree.setMaxTrunkSize(6);
    quercusRoburOakTree.setMinCrownSize(5);
    quercusRoburOakTree.setMaxCrownSize(9);
    quercusRoburOakTree.getValidGroundBlocks().clear();
    quercusRoburOakTree.getValidGroundBlocks().add(BlockUtil.getStateDirt(2));
    this.addTree(quercusRoburOakTree);
    DecoTree bigOakTrees = new DecoTree(quercusRoburOakTree);
    bigOakTrees.setStrengthFactorForLoops(2f);
    bigOakTrees.setTreeType(DecoTree.TreeType.RTG_TREE);
    bigOakTrees.getDistribution().setNoiseDivisor(100f);
    bigOakTrees.getDistribution().setNoiseFactor(6f);
    bigOakTrees.getDistribution().setNoiseAddend(0.8f);
    bigOakTrees.setTreeCondition(DecoTree.TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE);
    bigOakTrees.setTreeConditionNoise(0f);
    bigOakTrees.setTreeConditionChance(6);
    bigOakTrees.setMaxY(105);
    this.addDeco(bigOakTrees);
    DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations();
    decoBaseBiomeDecorations.setMaxY(105);
    decoBaseBiomeDecorations.setNotEqualsZeroChance(8);
    this.addDeco(decoBaseBiomeDecorations);
    // Grass filler.
    DecoGrass decoGrass = new DecoGrass();
    decoGrass.setMinY(63);
    decoGrass.setMaxY(105);
    decoGrass.setLoops(1);
    this.addDeco(decoGrass);
}
Also used : TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG) TreeRTGQuercusRobur(rtg.api.world.gen.feature.tree.rtg.TreeRTGQuercusRobur)

Example 2 with TreeRTGQuercusRobur

use of rtg.api.world.gen.feature.tree.rtg.TreeRTGQuercusRobur in project Realistic-Terrain-Generation by Team-RTG.

the class RealisticBiomeVanillaPlains method initDecos.

@Override
public void initDecos() {
    //Sparse wheat
    DecoCrop decoCropWheat = new DecoCrop();
    decoCropWheat.setSize(8);
    decoCropWheat.setDensity(5);
    decoCropWheat.setChance(this.getConfig().WHEAT_CHANCE.get());
    decoCropWheat.setType(3);
    decoCropWheat.setWater(false);
    decoCropWheat.setMinY(this.getConfig().WHEAT_MIN_Y.get());
    decoCropWheat.setMaxY(this.getConfig().WHEAT_MAX_Y.get());
    this.addDeco(decoCropWheat, this.getConfig().ALLOW_WHEAT.get());
    // Very sparse shrubs.
    DecoShrub decoShrubOak = new DecoShrub();
    decoShrubOak.setLogBlock(Blocks.LOG.getDefaultState());
    decoShrubOak.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    decoShrubOak.setMaxY(110);
    decoShrubOak.setLoops(1);
    decoShrubOak.setChance(36);
    this.addDeco(decoShrubOak);
    // The occasional flower.
    DecoFlowersRTG decoFlowersRTG = new DecoFlowersRTG();
    decoFlowersRTG.setFlowers(new int[] { 0, 2, 3, 4, 5, 6, 7, 8, 9 });
    decoFlowersRTG.setMaxY(128);
    decoFlowersRTG.setStrengthFactor(2f);
    this.addDeco(decoFlowersRTG);
    // Lots of grass, but not as much as vanilla.
    DecoGrass decoGrass = new DecoGrass();
    decoGrass.setMinY(60);
    decoGrass.setMaxY(128);
    decoGrass.setLoops(6);
    this.addDeco(decoGrass);
    // Very rare fat oak/birch trees.
    TreeRTG roburTree1 = new TreeRTGQuercusRobur();
    roburTree1.setLogBlock(Blocks.LOG.getDefaultState());
    roburTree1.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    roburTree1.setMinTrunkSize(3);
    roburTree1.setMaxTrunkSize(5);
    roburTree1.setMinCrownSize(7);
    roburTree1.setMaxCrownSize(9);
    this.addTree(roburTree1);
    DecoTree oakTrees = new DecoTree(roburTree1);
    oakTrees.setTreeType(DecoTree.TreeType.RTG_TREE);
    oakTrees.setTreeCondition(DecoTree.TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE);
    oakTrees.setDistribution(new DecoTree.Distribution(100f, 6f, 0.8f));
    oakTrees.setTreeConditionNoise(0.4f);
    oakTrees.setTreeConditionChance(48);
    TreeRTG roburTree2 = new TreeRTGQuercusRobur();
    roburTree2.setLogBlock(BlockUtil.getStateLog(2));
    roburTree2.setLeavesBlock(BlockUtil.getStateLeaf(2));
    roburTree2.setMinTrunkSize(3);
    roburTree2.setMaxTrunkSize(5);
    roburTree2.setMinCrownSize(7);
    roburTree2.setMaxCrownSize(9);
    this.addTree(roburTree2);
    DecoTree birchTrees = new DecoTree(roburTree2);
    birchTrees.setTreeType(DecoTree.TreeType.RTG_TREE);
    birchTrees.setTreeCondition(DecoTree.TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE);
    birchTrees.setDistribution(new DecoTree.Distribution(100f, 6f, 0.8f));
    birchTrees.setTreeConditionNoise(0.4f);
    birchTrees.setTreeConditionChance(48);
    this.addDeco(new DecoHelperThisOrThat(4, DecoHelperThisOrThat.ChanceType.NOT_EQUALS_ZERO, oakTrees, birchTrees));
// Vanilla trees look awful in this biome, so let's make sure they don't generate.
//DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations();
//this.addDeco(decoBaseBiomeDecorations);
}
Also used : TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG) DecoHelperThisOrThat(rtg.api.world.deco.helper.DecoHelperThisOrThat) TreeRTGQuercusRobur(rtg.api.world.gen.feature.tree.rtg.TreeRTGQuercusRobur)

Aggregations

TreeRTG (rtg.api.world.gen.feature.tree.rtg.TreeRTG)2 TreeRTGQuercusRobur (rtg.api.world.gen.feature.tree.rtg.TreeRTGQuercusRobur)2 DecoHelperThisOrThat (rtg.api.world.deco.helper.DecoHelperThisOrThat)1