From eaf82b68e814c59e19280a3bf5d5eafa1ad2406e Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Sat, 20 Feb 2016 00:58:04 +0000 Subject: [PATCH] Fix tree rarity --- src/main/java/techreborn/world/TreeGenerator.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/techreborn/world/TreeGenerator.java b/src/main/java/techreborn/world/TreeGenerator.java index 2297b03ad..c167552cf 100644 --- a/src/main/java/techreborn/world/TreeGenerator.java +++ b/src/main/java/techreborn/world/TreeGenerator.java @@ -23,13 +23,12 @@ public class TreeGenerator implements IWorldGenerator { public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { int chance = 0; BiomeGenBase biomeGenBase = world.getBiomeGenForCoords( new BlockPos(chunkX * 16 + 16, 72, chunkZ * 16 + 16)); -// if(BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.SWAMP)){ -// chance += random.nextInt(10) + 5; -// } -// if(BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.FOREST) || BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.JUNGLE)){ -// chance += random.nextInt(5) + 1; -// } - chance = 10; + if(BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.SWAMP)){ + chance += random.nextInt(10) + 5; + } + if(BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.FOREST) || BiomeDictionary.isBiomeOfType(biomeGenBase, BiomeDictionary.Type.JUNGLE)){ + chance += random.nextInt(5) + 1; + } if(world.provider.isSurfaceWorld()){ if(random.nextInt(100) + 1 <= chance * 2){ treeGenerator.generate(world, random, new BlockPos(chunkX * 16 + random.nextInt(16), 72, chunkZ * 16 + random.nextInt(16)));