Added ore vein config
This commit is contained in:
parent
f03fbef70e
commit
bbc5a636f1
3 changed files with 12 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue