Add rubber tree biome blacklist, closes #1529

This commit is contained in:
modmuss50 2018-06-09 12:39:55 +01:00
parent 354a80572c
commit d9b8f274e0
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
2 changed files with 6 additions and 0 deletions

View file

@ -49,6 +49,7 @@ import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
@ -247,6 +248,9 @@ public class TechRebornWorldGen implements IWorldGenerator {
int chance = config.rubberTreeConfig.chance;
boolean isValidSpawn = false;
Biome biomeGenBase = world.getBiomeForCoordsBody(new BlockPos(chunkX * 16, 72, chunkZ * 16));
if(biomeGenBase.getRegistryName() != null && Arrays.asList(config.rubberTreeConfig.rubberTreeBiomeBlacklist).contains(biomeGenBase.getRegistryName().toString())){
return;
}
if (BiomeDictionary.hasType(biomeGenBase, BiomeDictionary.Type.SWAMP)) {
// TODO check the config file for bounds on this, might cause issues
chance -= random.nextInt(10) + 10;

View file

@ -41,4 +41,6 @@ public class RubberTreeConfig {
public int spireHeight = 4;
public int treeBaseHeight = 5;
public String[] rubberTreeBiomeBlacklist = new String[]{};
}