Add rubber tree biome blacklist, closes #1529
This commit is contained in:
parent
354a80572c
commit
d9b8f274e0
2 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -41,4 +41,6 @@ public class RubberTreeConfig {
|
|||
public int spireHeight = 4;
|
||||
|
||||
public int treeBaseHeight = 5;
|
||||
|
||||
public String[] rubberTreeBiomeBlacklist = new String[]{};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue