mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Add more Dimension Config Blacklists for world generation (#1942)
This commit is contained in:
1 parent
8eea336fdb
commit
40445462f1
3 files changed
+16
-2
No files matched your search
@@ -40,6 +40,7 @@ import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.arboriculture.commands.TreeGenHelper;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.utils.BlockUtil;
|
||||
|
||||
public class TreeDecorator {
|
||||
@@ -54,6 +55,8 @@ public class TreeDecorator {
|
||||
}
|
||||
|
||||
public static void decorateTrees(World world, Random rand, int worldX, int worldZ) {
|
||||
if(Config.blacklistedTreeDims.contains(world.provider.getDimension()))
|
||||
return;
|
||||
if (biomeCache.isEmpty()) {
|
||||
generateBiomeCache(world, rand);
|
||||
}
|
||||
|
||||
@@ -79,11 +79,13 @@ public class Config {
|
||||
public static boolean generateApatiteOre = true;
|
||||
public static boolean generateCopperOre = true;
|
||||
public static boolean generateTinOre = true;
|
||||
public static Set<Integer> blacklistedOreDims = new HashSet<Integer>();
|
||||
private static float generateBeehivesAmount = 1.0f;
|
||||
public static boolean generateBeehivesDebug = false;
|
||||
public static boolean logHivePlacement = false;
|
||||
public static boolean enableVillagers = true;
|
||||
public static boolean generateTrees = true;
|
||||
public static Set<Integer> blacklistedTreeDims = new HashSet<Integer>();
|
||||
|
||||
// Retrogen
|
||||
public static boolean doRetrogen = false;
|
||||
@@ -219,11 +221,18 @@ public class Config {
|
||||
generateApatiteOre = configCommon.getBooleanLocalized("world.generate.ore", "apatite", generateApatiteOre);
|
||||
generateCopperOre = configCommon.getBooleanLocalized("world.generate.ore", "copper", generateCopperOre);
|
||||
generateTinOre = configCommon.getBooleanLocalized("world.generate.ore", "tin", generateTinOre);
|
||||
|
||||
for(int dimId : configCommon.get("world.generate.ore", "dimBlacklist", new int[0]).getIntList()){
|
||||
blacklistedOreDims.add(dimId);
|
||||
}
|
||||
|
||||
enableVillagers = configCommon.getBooleanLocalized("world.generate", "villagers", enableVillagers);
|
||||
|
||||
generateTrees = configCommon.getBooleanLocalized("world.generate", "trees", generateTrees);
|
||||
|
||||
for(int dimId : configCommon.get("world.generate.trees", "dimBlacklist", new int[0]).getIntList()){
|
||||
blacklistedTreeDims.add(dimId);
|
||||
}
|
||||
|
||||
|
||||
craftingBronzeEnabled = configCommon.getBooleanLocalized("crafting", "bronze", craftingBronzeEnabled);
|
||||
craftingStampsEnabled = configCommon.getBooleanLocalized("crafting.stamps", "enabled", true);
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ public class WorldGenerator implements IWorldGenerator {
|
||||
}
|
||||
|
||||
private void generateWorld(Random random, int chunkX, int chunkZ, World world) {
|
||||
if(Config.blacklistedOreDims.contains(world.provider.getDimension()))
|
||||
return;
|
||||
|
||||
if (apatiteGenerator == null || copperGenerator == null || tinGenerator == null) {
|
||||
BlockResourceOre resourcesBlock = ModuleCore.getBlocks().resources;
|
||||
|
||||
Reference in new issue
Block a user