Fix tree rarity
This commit is contained in:
parent
a76384504f
commit
eaf82b68e8
1 changed files with 6 additions and 7 deletions
|
@ -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)));
|
||||
|
|
Loading…
Reference in a new issue