Search in sources :

Example 1 with DecoHelper5050

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

the class RealisticBiomeBOPLandOfLakes method initDecos.

@Override
public void initDecos() {
    TreeRTG birchTree = new TreeRTGBetulaPapyrifera();
    birchTree.setLogBlock(BlockUtil.getStateLog(2));
    birchTree.setLeavesBlock(BlockUtil.getStateLeaf(2));
    birchTree.setMinTrunkSize(4);
    birchTree.setMaxTrunkSize(10);
    birchTree.setMinCrownSize(8);
    birchTree.setMaxCrownSize(19);
    this.addTree(birchTree);
    DecoTree birchTrees = new DecoTree(birchTree);
    birchTrees.setStrengthFactorForLoops(9f);
    birchTrees.setTreeType(DecoTree.TreeType.RTG_TREE);
    birchTrees.getDistribution().setNoiseDivisor(100f);
    birchTrees.getDistribution().setNoiseFactor(6f);
    birchTrees.getDistribution().setNoiseAddend(0.8f);
    birchTrees.setTreeCondition(DecoTree.TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE);
    birchTrees.setTreeConditionChance(1);
    birchTrees.setTreeConditionNoise(0f);
    birchTrees.setMaxY(120);
    TreeRTG sitchensisTree = new TreeRTGPiceaSitchensis();
    sitchensisTree.setLogBlock(BlockUtil.getStateLog(1));
    sitchensisTree.setLeavesBlock(BlockUtil.getStateLeaf(1));
    sitchensisTree.setMinTrunkSize(4);
    sitchensisTree.setMaxTrunkSize(9);
    sitchensisTree.setMinCrownSize(5);
    sitchensisTree.setMaxCrownSize(14);
    this.addTree(sitchensisTree);
    DecoTree smallPine = new DecoTree(sitchensisTree);
    smallPine.setStrengthFactorForLoops(9f);
    smallPine.setTreeType(DecoTree.TreeType.RTG_TREE);
    smallPine.getDistribution().setNoiseDivisor(100f);
    smallPine.getDistribution().setNoiseFactor(6f);
    smallPine.getDistribution().setNoiseAddend(0.8f);
    smallPine.setTreeCondition(DecoTree.TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE);
    smallPine.setTreeConditionChance(1);
    smallPine.setTreeConditionNoise(0f);
    smallPine.setMaxY(120);
    DecoHelper5050 decoHelper5050 = new DecoHelper5050(birchTrees, smallPine);
    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(12);
    decoFallenTree.setRandomLogBlocks(new IBlockState[] { Blocks.LOG.getDefaultState(), BlockUtil.getStateLog(1), BlockUtil.getStateLog(2) });
    decoFallenTree.setMinSize(8);
    decoFallenTree.setMaxSize(12);
    this.addDeco(decoFallenTree, this.getConfig().ALLOW_LOGS.get());
    DecoShrub decoShrub = new DecoShrub();
    decoShrub.setMaxY(110);
    decoShrub.setStrengthFactor(3f);
    this.addDeco(decoShrub);
    DecoBoulder decoBoulder = new DecoBoulder();
    decoBoulder.setBoulderBlock(Blocks.COBBLESTONE.getDefaultState());
    decoBoulder.setMaxY(80);
    decoBoulder.setChance(12);
    decoBoulder.setStrengthFactor(1f);
    this.addDeco(decoBoulder);
    DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoSingleBiomeDecorations();
    this.addDeco(decoBaseBiomeDecorations);
}
Also used : DecoHelper5050(rtg.api.world.deco.helper.DecoHelper5050) DecoSingleBiomeDecorations(rtg.api.world.deco.DecoSingleBiomeDecorations) TreeRTG(rtg.api.world.gen.feature.tree.rtg.TreeRTG) TreeRTGPiceaSitchensis(rtg.api.world.gen.feature.tree.rtg.TreeRTGPiceaSitchensis) TreeRTGBetulaPapyrifera(rtg.api.world.gen.feature.tree.rtg.TreeRTGBetulaPapyrifera)

Example 2 with DecoHelper5050

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

the class RealisticBiomeBOPShield method initDecos.

@Override
public void initDecos() {
    DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoSingleBiomeDecorations();
    this.addDeco(decoBaseBiomeDecorations);
    DecoBoulder decoBoulder = new DecoBoulder();
    decoBoulder.setBoulderBlock(Blocks.COBBLESTONE.getDefaultState());
    decoBoulder.setMaxY(80);
    decoBoulder.setChance(16);
    decoBoulder.setStrengthFactor(1f);
    this.addDeco(decoBoulder);
    DecoFallenTree decoFallenTree1 = new DecoFallenTree();
    decoFallenTree1.getDistribution().setNoiseDivisor(80f);
    decoFallenTree1.getDistribution().setNoiseFactor(60f);
    decoFallenTree1.getDistribution().setNoiseAddend(-15f);
    decoFallenTree1.setLogCondition(RANDOM_CHANCE);
    decoFallenTree1.setLogConditionNoise(0f);
    decoFallenTree1.setLogConditionChance(6);
    decoFallenTree1.setMaxY(100);
    decoFallenTree1.setLogBlock(BOPBlocks.log_2.getStateFromMeta(6));
    decoFallenTree1.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    decoFallenTree1.setMinSize(3);
    decoFallenTree1.setMaxSize(4);
    DecoFallenTree decoFallenTree2 = new DecoFallenTree();
    decoFallenTree2.getDistribution().setNoiseDivisor(80f);
    decoFallenTree2.getDistribution().setNoiseFactor(60f);
    decoFallenTree2.getDistribution().setNoiseAddend(-15f);
    decoFallenTree2.setLogCondition(RANDOM_CHANCE);
    decoFallenTree2.setLogConditionNoise(0f);
    decoFallenTree2.setLogConditionChance(6);
    decoFallenTree2.setMaxY(100);
    decoFallenTree2.setLogBlock(BlockUtil.getStateLog(1));
    decoFallenTree2.setLeavesBlock(BlockUtil.getStateLeaf(1));
    decoFallenTree2.setMinSize(3);
    decoFallenTree2.setMaxSize(4);
    DecoHelper5050 decoHelperHelper5050 = new DecoHelper5050(decoFallenTree1, decoFallenTree2);
    this.addDeco(decoHelperHelper5050, this.getConfig().ALLOW_LOGS.get());
}
Also used : DecoBaseBiomeDecorations(rtg.api.world.deco.DecoBaseBiomeDecorations) DecoHelper5050(rtg.api.world.deco.helper.DecoHelper5050) DecoSingleBiomeDecorations(rtg.api.world.deco.DecoSingleBiomeDecorations) DecoFallenTree(rtg.api.world.deco.DecoFallenTree) DecoBoulder(rtg.api.world.deco.DecoBoulder)

Example 3 with DecoHelper5050

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

the class RealisticBiomeBOPEucalyptusForest method initDecos.

@Override
public void initDecos() {
    DecoBoulder decoBoulder1 = new DecoBoulder();
    decoBoulder1.setBoulderBlock(Blocks.COBBLESTONE.getDefaultState());
    decoBoulder1.setMaxY(80);
    decoBoulder1.setChance(12);
    decoBoulder1.setStrengthFactor(1f);
    DecoBoulder decoBoulder2 = new DecoBoulder();
    decoBoulder2.setBoulderBlock(Blocks.COBBLESTONE.getDefaultState());
    decoBoulder2.setMaxY(80);
    decoBoulder2.setChance(12);
    decoBoulder2.setStrengthFactor(1f);
    DecoHelper5050 decoHelper5050 = new DecoHelper5050(decoBoulder1, decoBoulder2);
    this.addDeco(decoHelper5050);
    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(16);
    decoFallenTree.setLogBlock(BlockUtil.getStateLog(3));
    decoFallenTree.setLeavesBlock(BlockUtil.getStateLeaf(3));
    decoFallenTree.setMinSize(8);
    decoFallenTree.setMaxSize(14);
    this.addDeco(decoFallenTree, this.getConfig().ALLOW_LOGS.get());
    DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoSingleBiomeDecorations();
    this.addDeco(decoBaseBiomeDecorations);
}
Also used : DecoBaseBiomeDecorations(rtg.api.world.deco.DecoBaseBiomeDecorations) DecoHelper5050(rtg.api.world.deco.helper.DecoHelper5050) DecoSingleBiomeDecorations(rtg.api.world.deco.DecoSingleBiomeDecorations) DecoFallenTree(rtg.api.world.deco.DecoFallenTree) DecoBoulder(rtg.api.world.deco.DecoBoulder)

Example 4 with DecoHelper5050

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

the class RealisticBiomeBOPFen method initDecos.

@Override
public void initDecos() {
    DecoBoulder decoBoulder1 = new DecoBoulder();
    decoBoulder1.setBoulderBlock(Blocks.COBBLESTONE.getDefaultState());
    decoBoulder1.setMaxY(80);
    decoBoulder1.setChance(12);
    decoBoulder1.setStrengthFactor(1f);
    DecoBoulder decoBoulder2 = new DecoBoulder();
    decoBoulder2.setBoulderBlock(Blocks.COBBLESTONE.getDefaultState());
    decoBoulder2.setMaxY(80);
    decoBoulder2.setChance(12);
    decoBoulder2.setStrengthFactor(1f);
    DecoHelper5050 decoHelper5050 = new DecoHelper5050(decoBoulder1, decoBoulder2);
    this.addDeco(decoHelper5050);
    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(16);
    decoFallenTree.setLogBlock(BOPBlocks.log_3.getStateFromMeta(2));
    decoFallenTree.setLeavesBlock(Blocks.LEAVES.getDefaultState());
    decoFallenTree.setMinSize(3);
    decoFallenTree.setMaxSize(5);
    DecoFallenTree decoFallenTree2 = new DecoFallenTree();
    decoFallenTree2.getDistribution().setNoiseDivisor(100f);
    decoFallenTree2.getDistribution().setNoiseFactor(6f);
    decoFallenTree2.getDistribution().setNoiseAddend(0.8f);
    decoFallenTree2.setLogCondition(NOISE_GREATER_AND_RANDOM_CHANCE);
    decoFallenTree2.setLogConditionNoise(0f);
    decoFallenTree2.setLogConditionChance(16);
    decoFallenTree2.setMaxY(100);
    decoFallenTree2.setLogBlock(BlockUtil.getStateLog2(1));
    decoFallenTree2.setLeavesBlock(BlockUtil.getStateLeaf(1));
    decoFallenTree2.setMinSize(3);
    decoFallenTree2.setMaxSize(5);
    DecoHelperRandomSplit decoHelperRandomSplit = new DecoHelperRandomSplit();
    decoHelperRandomSplit.decos = new DecoBase[] { decoFallenTree, decoFallenTree2 };
    decoHelperRandomSplit.chances = new int[] { 4, 1 };
    this.addDeco(decoHelperRandomSplit, this.getConfig().ALLOW_LOGS.get());
    DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoSingleBiomeDecorations();
    this.addDeco(decoBaseBiomeDecorations);
}
Also used : DecoBaseBiomeDecorations(rtg.api.world.deco.DecoBaseBiomeDecorations) DecoHelper5050(rtg.api.world.deco.helper.DecoHelper5050) DecoSingleBiomeDecorations(rtg.api.world.deco.DecoSingleBiomeDecorations) DecoFallenTree(rtg.api.world.deco.DecoFallenTree) DecoHelperRandomSplit(rtg.api.world.deco.helper.DecoHelperRandomSplit) DecoBoulder(rtg.api.world.deco.DecoBoulder)

Example 5 with DecoHelper5050

use of rtg.api.world.deco.helper.DecoHelper5050 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)

Aggregations

DecoHelper5050 (rtg.api.world.deco.helper.DecoHelper5050)8 DecoSingleBiomeDecorations (rtg.api.world.deco.DecoSingleBiomeDecorations)6 DecoBaseBiomeDecorations (rtg.api.world.deco.DecoBaseBiomeDecorations)4 DecoBoulder (rtg.api.world.deco.DecoBoulder)4 DecoFallenTree (rtg.api.world.deco.DecoFallenTree)4 TreeRTG (rtg.api.world.gen.feature.tree.rtg.TreeRTG)3 TreeRTGBetulaPapyrifera (rtg.api.world.gen.feature.tree.rtg.TreeRTGBetulaPapyrifera)2 TreeRTGPinusPonderosa (rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusPonderosa)2 DecoCollectionSmallPineTreesForest (rtg.api.world.deco.collection.DecoCollectionSmallPineTreesForest)1 DecoHelperRandomSplit (rtg.api.world.deco.helper.DecoHelperRandomSplit)1 TreeRTGPiceaSitchensis (rtg.api.world.gen.feature.tree.rtg.TreeRTGPiceaSitchensis)1 TreeRTGPinusNigra (rtg.api.world.gen.feature.tree.rtg.TreeRTGPinusNigra)1