Added ore vein config

This commit is contained in:
modmuss50 2016-08-01 15:30:55 +01:00
parent f03fbef70e
commit bbc5a636f1
3 changed files with 12 additions and 13 deletions

View file

@ -110,7 +110,9 @@ public class Core {
public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException {
//World gen
VeinWorldGenerator.registerTRVeins();
GameRegistry.registerWorldGenerator(VeinWorldGenerator.INSTANCE, 0);
if(ConfigTechReborn.veinOres){
GameRegistry.registerWorldGenerator(VeinWorldGenerator.INSTANCE, 0);
}
// Registers Chest Loot
ModLoot.init();
// Multiparts
@ -136,7 +138,9 @@ public class Core {
proxy.init(event);
// WorldGen
worldGen.load();
//GameRegistry.registerWorldGenerator(worldGen, 0);
if(!ConfigTechReborn.veinOres){
GameRegistry.registerWorldGenerator(worldGen, 0);
}
// DungeonLoot.init();
// Register Gui Handler

View file

@ -146,6 +146,8 @@ public class ConfigTechReborn
public static boolean enableGemArmorAndTools;
public static boolean veinOres;
public static Configuration config;
private static ConfigTechReborn instance = null;
@ -199,6 +201,10 @@ public class ConfigTechReborn
.get(CATEGORY_WORLD, "Steel Ingots Loot", true, "Allow Steel Ingots to generate in loot chests")
.getBoolean(true);
veinOres = config
.get(CATEGORY_WORLD, "Custom Ore veins", false, "Use the new style GT vein ore generation - game restart required")
.getBoolean(false);
FortuneSecondaryOreMultiplierPerLevel = config.get(CATEGORY_WORLD, "FortuneSecondaryOreMultiplierPerLevel", 0.5,
"FortuneSecondaryOreMultiplierPerLevel").getDouble();

View file

@ -81,17 +81,6 @@ public class VeinGenerator {
return true;
}
for(int i = 0; i < 16; i++) {
for(int j = 0; j < 16; j++) {
for(int k = 0; k < world.provider.getAverageGroundLevel(); ++k) {
BlockPos pos = new BlockPos(chunkX * 16 + i, k, chunkZ * 16 + j);
if(world.getBlockState(pos).getBlock() == Blocks.STONE) {
world.setBlockToAir(pos);
}
}
}
}
return false;
}