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 {
|
public void init(FMLInitializationEvent event) throws IllegalAccessException, InstantiationException {
|
||||||
//World gen
|
//World gen
|
||||||
VeinWorldGenerator.registerTRVeins();
|
VeinWorldGenerator.registerTRVeins();
|
||||||
|
if(ConfigTechReborn.veinOres){
|
||||||
GameRegistry.registerWorldGenerator(VeinWorldGenerator.INSTANCE, 0);
|
GameRegistry.registerWorldGenerator(VeinWorldGenerator.INSTANCE, 0);
|
||||||
|
}
|
||||||
// Registers Chest Loot
|
// Registers Chest Loot
|
||||||
ModLoot.init();
|
ModLoot.init();
|
||||||
// Multiparts
|
// Multiparts
|
||||||
|
@ -136,7 +138,9 @@ public class Core {
|
||||||
proxy.init(event);
|
proxy.init(event);
|
||||||
// WorldGen
|
// WorldGen
|
||||||
worldGen.load();
|
worldGen.load();
|
||||||
//GameRegistry.registerWorldGenerator(worldGen, 0);
|
if(!ConfigTechReborn.veinOres){
|
||||||
|
GameRegistry.registerWorldGenerator(worldGen, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// DungeonLoot.init();
|
// DungeonLoot.init();
|
||||||
// Register Gui Handler
|
// Register Gui Handler
|
||||||
|
|
|
@ -146,6 +146,8 @@ public class ConfigTechReborn
|
||||||
|
|
||||||
public static boolean enableGemArmorAndTools;
|
public static boolean enableGemArmorAndTools;
|
||||||
|
|
||||||
|
public static boolean veinOres;
|
||||||
|
|
||||||
public static Configuration config;
|
public static Configuration config;
|
||||||
private static ConfigTechReborn instance = null;
|
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")
|
.get(CATEGORY_WORLD, "Steel Ingots Loot", true, "Allow Steel Ingots to generate in loot chests")
|
||||||
.getBoolean(true);
|
.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 = config.get(CATEGORY_WORLD, "FortuneSecondaryOreMultiplierPerLevel", 0.5,
|
||||||
"FortuneSecondaryOreMultiplierPerLevel").getDouble();
|
"FortuneSecondaryOreMultiplierPerLevel").getDouble();
|
||||||
|
|
||||||
|
|
|
@ -81,17 +81,6 @@ public class VeinGenerator {
|
||||||
return true;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue