Search in sources :

Example 6 with DecoTree

use of rtg.api.world.deco.DecoTree in project Realistic-Terrain-Generation by Team-RTG.

the class RealisticBiomeVanillaBeach method initDecos.

@Override
public void initDecos() {
    // Scattered palm trees.
    TreeRTG nuciferaTree = new TreeRTGCocosNucifera();
    nuciferaTree.setMinTrunkSize(7);
    nuciferaTree.setMaxTrunkSize(9);
    nuciferaTree.setMinCrownSize(6);
    nuciferaTree.setMaxCrownSize(8);
    nuciferaTree.getValidGroundBlocks().clear();
    nuciferaTree.getValidGroundBlocks().add(Blocks.SAND.getDefaultState());
    this.addTree(nuciferaTree);
    DecoTree palmTrees = new DecoTree(nuciferaTree);
    palmTrees.setTreeType(DecoTree.TreeType.RTG_TREE);
    palmTrees.setTreeCondition(DecoTree.TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE);
    palmTrees.setTreeConditionNoise(-0.2f);
    palmTrees.setTreeConditionChance(12);
    palmTrees.setMaxY(68);
    this.addDeco(palmTrees, this.getConfig().ALLOW_PALM_TREES.get());
}
Also used : DecoTree(rtg.api.world.deco.DecoTree) TreeRTGCocosNucifera(rtg.api.world.gen.feature.tree.rtg.TreeRTGCocosNucifera) TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG)

Example 7 with DecoTree

use of rtg.api.world.deco.DecoTree in project Realistic-Terrain-Generation by Team-RTG.

the class RealisticBiomeBYGWillowSwamps method initDecos.

@Override
public void initDecos() {
    DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations();
    decoBaseBiomeDecorations.setMaxY(82);
    this.addDeco(decoBaseBiomeDecorations);
    TreeRTG myrtilloidesTree = new TreeRTGSalixMyrtilloides();
    myrtilloidesTree.setLogBlock(Blocks.LOG.getDefaultState());
    myrtilloidesTree.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    this.addTree(myrtilloidesTree);
    DecoTree decoTrees = new DecoTree(myrtilloidesTree);
    decoTrees.getDistribution().setNoiseDivisor(80f);
    decoTrees.getDistribution().setNoiseFactor(60f);
    decoTrees.getDistribution().setNoiseAddend(-15f);
    decoTrees.setTreeType(DecoTree.TreeType.RTG_TREE);
    decoTrees.setTreeCondition(DecoTree.TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE);
    decoTrees.setTreeConditionNoise(0f);
    decoTrees.setTreeConditionChance(16);
    decoTrees.setMaxY(70);
    this.addDeco(decoTrees);
    DecoFallenTree decoFallenTree = new DecoFallenTree();
    decoFallenTree.getDistribution().setNoiseDivisor(80f);
    decoFallenTree.getDistribution().setNoiseFactor(60f);
    decoFallenTree.getDistribution().setNoiseAddend(-15f);
    decoFallenTree.setLogCondition(NOISE_GREATER_AND_RANDOM_CHANCE);
    decoFallenTree.setLogConditionNoise(0f);
    decoFallenTree.setLogConditionChance(6);
    decoFallenTree.setLogBlock(BlockUtil.getStateLog2(1));
    decoFallenTree.setLeavesBlock(BlockUtil.getStateLeaf2(1));
    decoFallenTree.setMinSize(3);
    decoFallenTree.setMaxSize(6);
    decoFallenTree.setMaxY(76);
    this.addDeco(decoFallenTree, this.getConfig().ALLOW_LOGS.get());
    TreeRTG deadWillowTree = new TreeRTGSalixMyrtilloides();
    deadWillowTree.setLogBlock(Blocks.LOG.getDefaultState());
    deadWillowTree.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    deadWillowTree.setNoLeaves(true);
    this.addTree(deadWillowTree);
    DecoTree deadWillow = new DecoTree(deadWillowTree);
    deadWillow.setTreeType(DecoTree.TreeType.RTG_TREE);
    deadWillow.setTreeCondition(DecoTree.TreeCondition.RANDOM_CHANCE);
    deadWillow.setTreeConditionChance(18);
    deadWillow.setMaxY(84);
    this.addDeco(deadWillow);
    DecoShrub decoShrub = new DecoShrub();
    decoShrub.setMaxY(88);
    decoShrub.setStrengthFactor(6f);
    this.addDeco(decoShrub);
    DecoShrub decoShrubBYG = new DecoShrub();
    decoShrubBYG.setLogBlock(willowLogBlock);
    decoShrubBYG.setLeavesBlock(willowLeavesBlock);
    decoShrubBYG.setMaxY(88);
    decoShrubBYG.setStrengthFactor(3f);
    this.addDeco(decoShrubBYG);
}
Also used : DecoBaseBiomeDecorations(rtg.api.world.deco.DecoBaseBiomeDecorations) DecoTree(rtg.api.world.deco.DecoTree) TreeRTGSalixMyrtilloides(rtg.api.world.gen.feature.tree.rtg.TreeRTGSalixMyrtilloides) DecoShrub(rtg.api.world.deco.DecoShrub) TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG) DecoFallenTree(rtg.api.world.deco.DecoFallenTree)

Example 8 with DecoTree

use of rtg.api.world.deco.DecoTree in project Realistic-Terrain-Generation by Team-RTG.

the class DecoCollectionExtremeHillsM method nigraTrees.

@Override
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);
    return new DecoTree(nigraTree).setLoops(4).setTreeType(DecoTree.TreeType.RTG_TREE).setTreeCondition(DecoTree.TreeCondition.RANDOM_CHANCE).setTreeConditionChance(3).setMaxY(maxY);
}
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 9 with DecoTree

use of rtg.api.world.deco.DecoTree in project Realistic-Terrain-Generation by Team-RTG.

the class DecoCollectionIceTrees method randomPungensTrees.

private DecoTree randomPungensTrees() {
    TreeRTG piceaPungens = new TreeRTGPiceaPungens().setLogBlock(Blocks.PACKED_ICE.getDefaultState()).setLeavesBlock(Blocks.ICE.getDefaultState()).setMinTrunkSize(2).setMaxTrunkSize(4).setMinCrownSize(4).setMaxCrownSize(8);
    ArrayList<IBlockState> validBlocks = piceaPungens.getValidGroundBlocks();
    validBlocks.add(Blocks.SNOW.getDefaultState());
    piceaPungens.setValidGroundBlocks(validBlocks);
    this.addTree(piceaPungens);
    return new DecoTree(piceaPungens).setStrengthFactorForLoops(3f).setTreeType(TreeType.RTG_TREE).setTreeCondition(TreeCondition.RANDOM_CHANCE).setTreeConditionChance(8).setMaxY(100);
}
Also used : DecoTree(rtg.api.world.deco.DecoTree) IBlockState(net.minecraft.block.state.IBlockState) TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG) TreeRTGPiceaPungens(rtg.api.world.gen.feature.tree.rtg.TreeRTGPiceaPungens)

Aggregations

DecoTree (rtg.api.world.deco.DecoTree)9 TreeRTG (rtg.api.world.gen.feature.tree.rtg.TreeRTG)9 TreeRTGPinusNigra (rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusNigra)4 IBlockState (net.minecraft.block.state.IBlockState)3 DecoBaseBiomeDecorations (rtg.api.world.deco.DecoBaseBiomeDecorations)1 DecoFallenTree (rtg.api.world.deco.DecoFallenTree)1 DecoShrub (rtg.api.world.deco.DecoShrub)1 TreeRTGCocosNucifera (rtg.api.world.gen.feature.tree.rtg.TreeRTGCocosNucifera)1 TreeRTGPiceaPungens (rtg.api.world.gen.feature.tree.rtg.TreeRTGPiceaPungens)1 TreeRTGPiceaSitchensis (rtg.api.world.gen.feature.tree.rtg.TreeRTGPiceaSitchensis)1 TreeRTGPinusPonderosa (rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusPonderosa)1 TreeRTGSalixMyrtilloides (rtg.api.world.gen.feature.tree.rtg.TreeRTGSalixMyrtilloides)1