Search in sources :

Example 11 with TreeRTG

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

the class DecoCollectionBirchForest method tallBirchTrees.

private DecoTree tallBirchTrees() {
    TreeRTG birchTree = new TreeRTGBetulaPapyrifera().setLogBlock(BlockUtil.getStateLog(2)).setLeavesBlock(BlockUtil.getStateLeaf(2)).setMinTrunkSize(4).setMaxTrunkSize(10).setMinCrownSize(8).setMaxCrownSize(19);
    this.addTree(birchTree);
    return new DecoTree(birchTree).setStrengthFactorForLoops(3f).setTreeType(DecoTree.TreeType.RTG_TREE).setTreeCondition(DecoTree.TreeCondition.ALWAYS_GENERATE).setMaxY(100);
}
Also used : TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG) TreeRTGBetulaPapyrifera(rtg.api.world.gen.feature.tree.rtg.TreeRTGBetulaPapyrifera)

Example 12 with TreeRTG

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

the class DecoCollectionExtremeHills method nigraTrees.

protected DecoTree nigraTrees(IBlockState log, IBlockState leaves, int maxY, int minTrunkSize, int maxTrunkSize, int minCrownSize, int maxCrownSize) {
    TreeRTG nigraTree = new TreeRTGPinusNigra();
    nigraTree.setLogBlock(log);
    nigraTree.setLeavesBlock(leaves);
    nigraTree.setMinTrunkSize(minTrunkSize);
    nigraTree.setMaxTrunkSize(maxTrunkSize);
    nigraTree.setMinCrownSize(minCrownSize);
    nigraTree.setMaxCrownSize(maxCrownSize);
    this.addTree(nigraTree);
    DecoTree nigraDeco = new DecoTree(nigraTree);
    nigraDeco.setStrengthFactorForLoops(3f);
    nigraDeco.setStrengthNoiseFactorXForLoops(true);
    nigraDeco.getDistribution().setNoiseDivisor(100f);
    nigraDeco.getDistribution().setNoiseFactor(6f);
    nigraDeco.getDistribution().setNoiseAddend(0.8f);
    nigraDeco.setTreeType(DecoTree.TreeType.RTG_TREE);
    nigraDeco.setTreeCondition(DecoTree.TreeCondition.RANDOM_CHANCE);
    nigraDeco.setTreeConditionChance(20);
    nigraDeco.setMaxY(maxY);
    return nigraDeco;
}
Also used : DecoTree(rtg.api.world.deco.DecoTree) TreeRTGPinusNigra(rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusNigra) TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG)

Example 13 with TreeRTG

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

the class DecoCollectionIceTrees method shortPineTrees.

private DecoTree shortPineTrees(IBlockState log, IBlockState leaves, float noiseMin, float noiseMax) {
    TreeRTG piceaSitchensis = new TreeRTGPiceaSitchensis().setLogBlock(log).setLeavesBlock(leaves).setMinTrunkSize(4).setMaxTrunkSize(8).setMinCrownSize(4).setMaxCrownSize(14);
    ArrayList<IBlockState> validBlocks = piceaSitchensis.getValidGroundBlocks();
    validBlocks.add(Blocks.SNOW.getDefaultState());
    piceaSitchensis.setValidGroundBlocks(validBlocks);
    this.addTree(piceaSitchensis);
    return new DecoTree(piceaSitchensis).setStrengthFactorForLoops(4f).setTreeType(TreeType.RTG_TREE).setDistribution(forestDistribution).setTreeCondition(TreeCondition.NOISE_BETWEEN_AND_RANDOM_CHANCE).setTreeConditionNoise(noiseMin).setTreeConditionNoise2(noiseMax).setTreeConditionChance(2).setMaxY(85);
}
Also used : DecoTree(rtg.api.world.deco.DecoTree) IBlockState(net.minecraft.block.state.IBlockState) TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG) TreeRTGPiceaSitchensis(rtg.api.world.gen.feature.tree.rtg.TreeRTGPiceaSitchensis)

Example 14 with TreeRTG

use of rtg.api.world.gen.feature.tree.rtg.TreeRTG 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);
}
Also used : DecoHelper5050(rtg.api.world.deco.helper.DecoHelper5050) TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG) TreeRTGPinusPonderosa(rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusPonderosa) DecoCollectionSmallPineTreesForest(rtg.api.world.deco.collection.DecoCollectionSmallPineTreesForest)

Example 15 with TreeRTG

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

the class RealisticBiomeVanillaExtremeHillsEdge method initDecos.

@Override
public void initDecos() {
    TreeRTG nigraTree = new TreeRTGPinusNigra();
    nigraTree.setLogBlock(Blocks.LOG.getDefaultState());
    nigraTree.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    nigraTree.setMinTrunkSize(18);
    nigraTree.setMaxTrunkSize(27);
    nigraTree.setMinCrownSize(7);
    nigraTree.setMaxCrownSize(10);
    this.addTree(nigraTree);
    DecoTree decoTrees = new DecoTree(nigraTree);
    decoTrees.setStrengthFactorForLoops(4f);
    decoTrees.setStrengthNoiseFactorXForLoops(true);
    decoTrees.getDistribution().setNoiseDivisor(100f);
    decoTrees.getDistribution().setNoiseFactor(6f);
    decoTrees.getDistribution().setNoiseAddend(0.8f);
    decoTrees.setTreeType(DecoTree.TreeType.RTG_TREE);
    decoTrees.setTreeCondition(DecoTree.TreeCondition.RANDOM_CHANCE);
    decoTrees.setTreeConditionChance(24);
    decoTrees.setMaxY(100);
    this.addDeco(decoTrees);
    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(6);
    decoFallenTree.setLogBlock(BlockUtil.getStateLog(1));
    decoFallenTree.setLeavesBlock(BlockUtil.getStateLeaf(1));
    decoFallenTree.setMinSize(3);
    decoFallenTree.setMaxSize(6);
    this.addDeco(decoFallenTree, this.getConfig().ALLOW_LOGS.get());
    DecoShrub decoShrub = new DecoShrub();
    decoShrub.setMaxY(100);
    decoShrub.setStrengthFactor(2f);
    this.addDeco(decoShrub);
    DecoBoulder decoBoulder = new DecoBoulder();
    decoBoulder.setBoulderBlock(Blocks.MOSSY_COBBLESTONE.getDefaultState());
    decoBoulder.setChance(12);
    decoBoulder.setMaxY(95);
    decoBoulder.setStrengthFactor(2f);
    this.addDeco(decoBoulder);
    DecoMushrooms decoMushrooms = new DecoMushrooms();
    decoMushrooms.setMaxY(90);
    decoMushrooms.setRandomType(DecoMushrooms.RandomType.X_DIVIDED_BY_STRENGTH);
    decoMushrooms.setRandomFloat(3f);
    this.addDeco(decoMushrooms);
    DecoPumpkin decoPumpkin = new DecoPumpkin();
    decoPumpkin.setMaxY(90);
    decoPumpkin.setRandomType(DecoPumpkin.RandomType.X_DIVIDED_BY_STRENGTH);
    decoPumpkin.setRandomFloat(20f);
    this.addDeco(decoPumpkin);
    DecoGrass decoGrass = new DecoGrass();
    decoGrass.setMaxY(128);
    decoGrass.setStrengthFactor(10f);
    this.addDeco(decoGrass);
}
Also used : TreeRTGPinusNigra(rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusNigra) TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG)

Aggregations

TreeRTG (rtg.api.world.gen.feature.tree.rtg.TreeRTG)32 DecoTree (rtg.api.world.deco.DecoTree)9 TreeRTGPinusNigra (rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusNigra)6 TreeRTGPinusPonderosa (rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusPonderosa)6 TreeRTGRhizophoraMucronata (rtg.api.world.gen.feature.tree.rtg.TreeRTGRhizophoraMucronata)6 DecoHelperThisOrThat (rtg.api.world.deco.helper.DecoHelperThisOrThat)5 TreeRTGBetulaPapyrifera (rtg.api.world.gen.feature.tree.rtg.TreeRTGBetulaPapyrifera)4 TreeRTGCocosNucifera (rtg.api.world.gen.feature.tree.rtg.TreeRTGCocosNucifera)4 IBlockState (net.minecraft.block.state.IBlockState)3 WorldGenMegaJungle (net.minecraft.world.gen.feature.WorldGenMegaJungle)3 DecoHelper5050 (rtg.api.world.deco.helper.DecoHelper5050)3 TreeRTGPiceaSitchensis (rtg.api.world.gen.feature.tree.rtg.TreeRTGPiceaSitchensis)3 TreeRTGSalixMyrtilloides (rtg.api.world.gen.feature.tree.rtg.TreeRTGSalixMyrtilloides)3 DecoCollectionDesertRiver (rtg.api.world.deco.collection.DecoCollectionDesertRiver)2 TreeRTGAcaciaBucheri (rtg.api.world.gen.feature.tree.rtg.TreeRTGAcaciaBucheri)2 TreeRTGCeibaPentandra (rtg.api.world.gen.feature.tree.rtg.TreeRTGCeibaPentandra)2 TreeRTGCeibaRosea (rtg.api.world.gen.feature.tree.rtg.TreeRTGCeibaRosea)2 TreeRTGPiceaPungens (rtg.api.world.gen.feature.tree.rtg.TreeRTGPiceaPungens)2 TreeRTGQuercusRobur (rtg.api.world.gen.feature.tree.rtg.TreeRTGQuercusRobur)2 DecoBaseBiomeDecorations (rtg.api.world.deco.DecoBaseBiomeDecorations)1