Skip to content

Commit

Permalink
Re-decorated vanilla Taiga biome variants.
Browse files Browse the repository at this point in the history
  • Loading branch information
whichonespink44 committed Apr 12, 2016
1 parent d7bf3f6 commit bec214c
Show file tree
Hide file tree
Showing 4 changed files with 270 additions and 134 deletions.
44 changes: 36 additions & 8 deletions src/main/java/rtg/world/biome/deco/DecoTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import rtg.world.gen.feature.tree.WorldGenTreeRTGPineEuro;
import rtg.world.gen.feature.tree.WorldGenTreeRTGPineSmall;
import rtg.world.gen.feature.tree.WorldGenTreeRTGSavanna;
import rtg.world.gen.feature.tree.WorldGenTreeRTGSpruceCustom;
import rtg.world.gen.feature.tree.WorldGenTreeRTGSprucePineBig;
import rtg.world.gen.feature.tree.WorldGenTreeRTGSpruceSmall;
import rtg.world.gen.feature.tree.WorldGenTreeRTGTrees;
Expand Down Expand Up @@ -360,21 +361,46 @@ else if (this.maxSize == this.minSize) {

break;

case TAIGA:
case TAIGA_PINE_TALL:

if (intY <= this.maxY && intY >= this.minY && isValidTreeCondition(noise, rand)) {

WorldGenerator worldgenerator =
rand.nextInt(4) == 0
? new WorldGenTreeRTGSpruceSmall(1 + rand.nextInt(2))
: rand.nextInt(6) == 0
? new WorldGenTreeRTGPineSmall(1 + rand.nextInt(3), 4 + rand.nextInt(4))
: new WorldGenTreeRTGPineSmall(4 + rand.nextInt(6), 5 + rand.nextInt(10));
WorldGenerator worldgenerator = new WorldGenTreeRTGPineSmall(4 + rand.nextInt(6), 5 + rand.nextInt(10));
worldgenerator.setScale(1.0D, 1.0D, 1.0D);
worldgenerator.generate(world, rand, intX, intY, intZ);
}

break;

case TAIGA_SPRUCE_SMALL:

if (intY <= this.maxY && intY >= this.minY && isValidTreeCondition(noise, rand)) {

int spruceTrunkSize = rand.nextInt(2) + 1;
int spruceLeavesSize = rand.nextInt(2) + 1;
byte spruceLeavesMeta = (rand.nextInt(4) != 0) ? (byte)1 : (byte)0;

WorldGenerator worldgenerator = new WorldGenTreeRTGSpruceCustom(Blocks.log, (byte)1, Blocks.leaves, spruceLeavesMeta, spruceTrunkSize, spruceLeavesSize, spruceLeavesSize);
worldgenerator.setScale(1.0D, 1.0D, 1.0D);
worldgenerator.generate(world, rand, intX, intY, intZ);
}

break;

case TAIGA_SPRUCE_TALL:

if (intY <= this.maxY && intY >= this.minY && isValidTreeCondition(noise, rand)) {

int spruceTrunkSize = rand.nextInt(5) + 3;
int spruceLeavesSize = rand.nextInt(6) + 5 + (int)Math.floor(spruceTrunkSize / 3);
byte spruceLeavesMeta = (rand.nextInt(4) != 0) ? (byte)1 : (byte)0;

WorldGenerator worldgenerator = new WorldGenTreeRTGSpruceCustom(Blocks.log, (byte)1, Blocks.leaves, spruceLeavesMeta, spruceTrunkSize, spruceLeavesSize, spruceLeavesSize);
worldgenerator.setScale(1.0D, 1.0D, 1.0D);
worldgenerator.generate(world, rand, intX, intY, intZ);
}

break;

case VANILLA_BEACH_PALM:

Expand Down Expand Up @@ -470,7 +496,9 @@ public enum TreeType
SMALL_BIRCH,
SMALL_PINES_TREES_FORESTS,
SUPER_TALL_BIRCH,
TAIGA,
TAIGA_PINE_TALL,
TAIGA_SPRUCE_SMALL,
TAIGA_SPRUCE_TALL,
VANILLA_BEACH_PALM,
VANILLA_COLD_TAIGA,
VANILLA_OAK,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
import net.minecraft.world.biome.BiomeGenBase;
import rtg.api.biome.BiomeConfig;
import rtg.api.biome.vanilla.config.BiomeConfigVanillaTaiga;
import rtg.world.biome.deco.DecoBaseBiomeDecorations;
import rtg.world.biome.deco.DecoBoulder;
import rtg.world.biome.deco.DecoFallenTree;
import rtg.world.biome.deco.DecoFallenTree.LogCondition;
import rtg.world.biome.deco.DecoGrass;
import rtg.world.biome.deco.DecoMushrooms;
import rtg.world.biome.deco.DecoPumpkin;
import rtg.world.biome.deco.DecoShrub;
import rtg.world.biome.deco.DecoShrubCustom;
import rtg.world.biome.deco.DecoTree;
import rtg.world.biome.deco.DecoTree.TreeCondition;
import rtg.world.biome.deco.DecoTree.TreeType;
Expand Down Expand Up @@ -41,31 +40,61 @@ public RealisticBiomeVanillaTaiga(BiomeConfig config)
* ##################################################
*/

DecoBoulder decoBoulder = new DecoBoulder();
decoBoulder.boulderBlock = Blocks.mossy_cobblestone;
decoBoulder.chance = 16;
decoBoulder.maxY = 95;
decoBoulder.strengthFactor = 3f;
this.addDeco(decoBoulder);

DecoTree bigSpruceTrees1 = new DecoTree();
bigSpruceTrees1.strengthFactorForLoops = 4f;
bigSpruceTrees1.treeType = TreeType.TAIGA_SPRUCE_TALL;
bigSpruceTrees1.distribution.noiseDivisor = 100f;
bigSpruceTrees1.distribution.noiseFactor = 6f;
bigSpruceTrees1.distribution.noiseAddend = 0.8f;
bigSpruceTrees1.treeCondition = TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE;
bigSpruceTrees1.treeConditionNoise = 0f;
bigSpruceTrees1.treeConditionChance = 1;
bigSpruceTrees1.maxY = 110;
this.addDeco(bigSpruceTrees1);

DecoTree bigSpruceTrees2 = new DecoTree();
bigSpruceTrees2.strengthFactorForLoops = 4f;
bigSpruceTrees2.treeType = TreeType.TAIGA_SPRUCE_TALL;
bigSpruceTrees2.distribution.noiseDivisor = 80f;
bigSpruceTrees2.distribution.noiseFactor = 60f;
bigSpruceTrees2.distribution.noiseAddend = -15f;
bigSpruceTrees2.treeCondition = TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE;
bigSpruceTrees2.treeConditionNoise = 0f;
bigSpruceTrees2.treeConditionChance = 1;
bigSpruceTrees2.maxY = 110;
this.addDeco(bigSpruceTrees2);

DecoTree bigSpruceTrees3 = new DecoTree();
bigSpruceTrees3.strengthFactorForLoops = 3f;
bigSpruceTrees3.treeType = TreeType.TAIGA_SPRUCE_TALL;
bigSpruceTrees3.treeCondition = TreeCondition.RANDOM_CHANCE;
bigSpruceTrees3.treeConditionChance = 2;
bigSpruceTrees3.maxY = 120;
this.addDeco(bigSpruceTrees3);

DecoTree decoTrees = new DecoTree();
decoTrees.strengthFactorForLoops = 4f;
decoTrees.strengthNoiseFactorXForLoops = true;
decoTrees.distribution.noiseDivisor = 100f;
decoTrees.distribution.noiseFactor = 6f;
decoTrees.distribution.noiseAddend = 0.8f;
decoTrees.treeType = TreeType.TAIGA;
decoTrees.treeCondition = TreeCondition.ALWAYS_GENERATE;
decoTrees.maxY = 100;
decoTrees.treeType = TreeType.TAIGA_PINE_TALL;
decoTrees.treeCondition = TreeCondition.RANDOM_CHANCE;
decoTrees.treeConditionChance = 3;
decoTrees.maxY = 120;
this.addDeco(decoTrees);


// DecoTree smallSpruceTrees = new DecoTree();
// smallSpruceTrees.strengthFactorForLoops = 2f;
// smallSpruceTrees.treeType = TreeType.TAIGA_SPRUCE_SMALL;
// smallSpruceTrees.treeCondition = TreeCondition.RANDOM_CHANCE;
// smallSpruceTrees.treeConditionChance = 3;
// smallSpruceTrees.maxY = 110;
// this.addDeco(smallSpruceTrees);

DecoFallenTree decoFallenTree = new DecoFallenTree();
decoFallenTree.distribution.noiseDivisor = 100f;
decoFallenTree.distribution.noiseFactor = 6f;
decoFallenTree.distribution.noiseAddend = 0.8f;
decoFallenTree.logCondition = LogCondition.NOISE_GREATER_AND_RANDOM_CHANCE;
decoFallenTree.logConditionNoise = 0f;
decoFallenTree.logConditionChance = 6;
decoFallenTree.logConditionChance = 12;
decoFallenTree.maxY = 100;
decoFallenTree.logBlock = Blocks.log;
decoFallenTree.logMeta = (byte)1;
Expand All @@ -74,32 +103,43 @@ public RealisticBiomeVanillaTaiga(BiomeConfig config)
decoFallenTree.minSize = 3;
decoFallenTree.maxSize = 6;
this.addDeco(decoFallenTree, this.config._boolean(BiomeConfigVanillaTaiga.decorationLogsId));

DecoShrubCustom decoShrubSpruce = new DecoShrubCustom();
decoShrubSpruce.logBlock = Blocks.log;
decoShrubSpruce.logMeta = 1;
decoShrubSpruce.leavesBlock = Blocks.leaves;
decoShrubSpruce.leavesMeta = 1;
decoShrubSpruce.maxY = 100;
decoShrubSpruce.strengthFactor = 3f;
decoShrubSpruce.chance = 6;
this.addDeco(decoShrubSpruce);

DecoShrub decoShrub = new DecoShrub();
decoShrub.maxY = 100;
decoShrub.strengthFactor = 2f;
decoShrub.chance = 10;
this.addDeco(decoShrub);

DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations();
decoBaseBiomeDecorations.equalsZeroChance = 3;
this.addDeco(decoBaseBiomeDecorations);

DecoMushrooms decoMushrooms = new DecoMushrooms();
decoMushrooms.maxY = 90;
decoMushrooms.randomType = rtg.world.biome.deco.DecoMushrooms.RandomType.X_DIVIDED_BY_STRENGTH;
decoMushrooms.randomFloat = 3f;
this.addDeco(decoMushrooms);

// DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations();
// decoBaseBiomeDecorations.equalsZeroChance = 3;
// this.addDeco(decoBaseBiomeDecorations);

DecoBoulder decoBoulder = new DecoBoulder();
decoBoulder.boulderBlock = Blocks.mossy_cobblestone;
decoBoulder.chance = 20;
decoBoulder.maxY = 95;
decoBoulder.strengthFactor = 2f;
this.addDeco(decoBoulder);

DecoPumpkin decoPumpkin = new DecoPumpkin();
decoPumpkin.maxY = 90;
decoPumpkin.randomType = rtg.world.biome.deco.DecoPumpkin.RandomType.X_DIVIDED_BY_STRENGTH;
decoPumpkin.randomFloat = 20f;
this.addDeco(decoPumpkin);

decoPumpkin.randomFloat = 32f;
this.addDeco(decoPumpkin);

DecoMushrooms decoMushrooms = new DecoMushrooms();
decoMushrooms.maxY = 90;
decoMushrooms.randomType = rtg.world.biome.deco.DecoMushrooms.RandomType.X_DIVIDED_BY_STRENGTH;
decoMushrooms.randomFloat = 24f;
this.addDeco(decoMushrooms);

DecoGrass decoGrass = new DecoGrass();
decoGrass.maxY = 128;
decoGrass.strengthFactor = 10f;
this.addDeco(decoGrass);
this.addDeco(decoGrass);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
import net.minecraft.world.biome.BiomeGenBase;
import rtg.api.biome.BiomeConfig;
import rtg.api.biome.vanilla.config.BiomeConfigVanillaTaigaHills;
import rtg.world.biome.deco.DecoBaseBiomeDecorations;
import rtg.world.biome.deco.DecoBoulder;
import rtg.world.biome.deco.DecoFallenTree;
import rtg.world.biome.deco.DecoFallenTree.LogCondition;
import rtg.world.biome.deco.DecoGrass;
import rtg.world.biome.deco.DecoMushrooms;
import rtg.world.biome.deco.DecoPumpkin;
import rtg.world.biome.deco.DecoShrub;
import rtg.world.biome.deco.DecoShrubCustom;
import rtg.world.biome.deco.DecoTree;
import rtg.world.biome.deco.DecoTree.TreeCondition;
import rtg.world.biome.deco.DecoTree.TreeType;
Expand All @@ -36,37 +35,61 @@ public RealisticBiomeVanillaTaigaHills(BiomeConfig config)
);
this.noLakes=true;

/**
* ##################################################
* # DECORATIONS (ORDER MATTERS)
* ##################################################
*/

DecoBoulder decoBoulder = new DecoBoulder();
decoBoulder.boulderBlock = Blocks.mossy_cobblestone;
decoBoulder.chance = 16;
decoBoulder.maxY = 95;
decoBoulder.strengthFactor = 3f;
this.addDeco(decoBoulder);

DecoTree bigSpruceTrees1 = new DecoTree();
bigSpruceTrees1.strengthFactorForLoops = 4f;
bigSpruceTrees1.treeType = TreeType.TAIGA_SPRUCE_TALL;
bigSpruceTrees1.distribution.noiseDivisor = 100f;
bigSpruceTrees1.distribution.noiseFactor = 6f;
bigSpruceTrees1.distribution.noiseAddend = 0.8f;
bigSpruceTrees1.treeCondition = TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE;
bigSpruceTrees1.treeConditionNoise = 0f;
bigSpruceTrees1.treeConditionChance = 1;
bigSpruceTrees1.maxY = 110;
this.addDeco(bigSpruceTrees1);

DecoTree bigSpruceTrees2 = new DecoTree();
bigSpruceTrees2.strengthFactorForLoops = 4f;
bigSpruceTrees2.treeType = TreeType.TAIGA_SPRUCE_TALL;
bigSpruceTrees2.distribution.noiseDivisor = 80f;
bigSpruceTrees2.distribution.noiseFactor = 60f;
bigSpruceTrees2.distribution.noiseAddend = -15f;
bigSpruceTrees2.treeCondition = TreeCondition.NOISE_GREATER_AND_RANDOM_CHANCE;
bigSpruceTrees2.treeConditionNoise = 0f;
bigSpruceTrees2.treeConditionChance = 1;
bigSpruceTrees2.maxY = 110;
this.addDeco(bigSpruceTrees2);

DecoTree bigSpruceTrees3 = new DecoTree();
bigSpruceTrees3.strengthFactorForLoops = 3f;
bigSpruceTrees3.treeType = TreeType.TAIGA_SPRUCE_TALL;
bigSpruceTrees3.treeCondition = TreeCondition.RANDOM_CHANCE;
bigSpruceTrees3.treeConditionChance = 2;
bigSpruceTrees3.maxY = 120;
this.addDeco(bigSpruceTrees3);

DecoTree decoTrees = new DecoTree();
decoTrees.strengthFactorForLoops = 4f;
decoTrees.strengthNoiseFactorXForLoops = true;
decoTrees.distribution.noiseDivisor = 100f;
decoTrees.distribution.noiseFactor = 6f;
decoTrees.distribution.noiseAddend = 0.8f;
decoTrees.treeType = TreeType.TAIGA;
decoTrees.treeCondition = TreeCondition.ALWAYS_GENERATE;
decoTrees.maxY = 100;
decoTrees.treeType = TreeType.TAIGA_PINE_TALL;
decoTrees.treeCondition = TreeCondition.RANDOM_CHANCE;
decoTrees.treeConditionChance = 3;
decoTrees.maxY = 120;
this.addDeco(decoTrees);


// DecoTree smallSpruceTrees = new DecoTree();
// smallSpruceTrees.strengthFactorForLoops = 2f;
// smallSpruceTrees.treeType = TreeType.TAIGA_SPRUCE_SMALL;
// smallSpruceTrees.treeCondition = TreeCondition.RANDOM_CHANCE;
// smallSpruceTrees.treeConditionChance = 3;
// smallSpruceTrees.maxY = 110;
// this.addDeco(smallSpruceTrees);

DecoFallenTree decoFallenTree = new DecoFallenTree();
decoFallenTree.distribution.noiseDivisor = 100f;
decoFallenTree.distribution.noiseFactor = 6f;
decoFallenTree.distribution.noiseAddend = 0.8f;
decoFallenTree.logCondition = LogCondition.NOISE_GREATER_AND_RANDOM_CHANCE;
decoFallenTree.logConditionNoise = 0f;
decoFallenTree.logConditionChance = 6;
decoFallenTree.logConditionChance = 12;
decoFallenTree.maxY = 100;
decoFallenTree.logBlock = Blocks.log;
decoFallenTree.logMeta = (byte)1;
Expand All @@ -75,32 +98,43 @@ public RealisticBiomeVanillaTaigaHills(BiomeConfig config)
decoFallenTree.minSize = 3;
decoFallenTree.maxSize = 6;
this.addDeco(decoFallenTree, this.config._boolean(BiomeConfigVanillaTaigaHills.decorationLogsId));

DecoShrubCustom decoShrubSpruce = new DecoShrubCustom();
decoShrubSpruce.logBlock = Blocks.log;
decoShrubSpruce.logMeta = 1;
decoShrubSpruce.leavesBlock = Blocks.leaves;
decoShrubSpruce.leavesMeta = 1;
decoShrubSpruce.maxY = 100;
decoShrubSpruce.strengthFactor = 3f;
decoShrubSpruce.chance = 6;
this.addDeco(decoShrubSpruce);

DecoShrub decoShrub = new DecoShrub();
decoShrub.maxY = 100;
decoShrub.strengthFactor = 2f;
decoShrub.chance = 10;
this.addDeco(decoShrub);

DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations();
decoBaseBiomeDecorations.equalsZeroChance = 3;
this.addDeco(decoBaseBiomeDecorations);

DecoMushrooms decoMushrooms = new DecoMushrooms();
decoMushrooms.maxY = 90;
decoMushrooms.randomType = rtg.world.biome.deco.DecoMushrooms.RandomType.X_DIVIDED_BY_STRENGTH;
decoMushrooms.randomFloat = 3f;
this.addDeco(decoMushrooms);

// DecoBaseBiomeDecorations decoBaseBiomeDecorations = new DecoBaseBiomeDecorations();
// decoBaseBiomeDecorations.equalsZeroChance = 3;
// this.addDeco(decoBaseBiomeDecorations);

DecoBoulder decoBoulder = new DecoBoulder();
decoBoulder.boulderBlock = Blocks.mossy_cobblestone;
decoBoulder.chance = 20;
decoBoulder.maxY = 95;
decoBoulder.strengthFactor = 2f;
this.addDeco(decoBoulder);

DecoPumpkin decoPumpkin = new DecoPumpkin();
decoPumpkin.maxY = 90;
decoPumpkin.randomType = rtg.world.biome.deco.DecoPumpkin.RandomType.X_DIVIDED_BY_STRENGTH;
decoPumpkin.randomFloat = 20f;
this.addDeco(decoPumpkin);

decoPumpkin.randomFloat = 32f;
this.addDeco(decoPumpkin);

DecoMushrooms decoMushrooms = new DecoMushrooms();
decoMushrooms.maxY = 90;
decoMushrooms.randomType = rtg.world.biome.deco.DecoMushrooms.RandomType.X_DIVIDED_BY_STRENGTH;
decoMushrooms.randomFloat = 24f;
this.addDeco(decoMushrooms);

DecoGrass decoGrass = new DecoGrass();
decoGrass.maxY = 128;
decoGrass.strengthFactor = 10f;
this.addDeco(decoGrass);
this.addDeco(decoGrass);
}
}
Loading

0 comments on commit bec214c

Please sign in to comment.