mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-16 18:54:54 +00:00
Yeet custom config in favor of NHLib (#53)
Co-authored-by: Martin Robertz <[email protected]> Co-authored-by: Maya <[email protected]>
This commit is contained in:
63 files changed
+160
-992
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package binnie.extrabees.worldgen;
|
||||
|
||||
import static binnie.core.Mods.buildcraftCore;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
@@ -7,7 +9,7 @@ import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
||||
import binnie.core.IInitializable;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import binnie.extrabees.config.ConfigurationMain;
|
||||
import binnie.extrabees.config.EBConfig;
|
||||
import binnie.extrabees.genetics.ExtraBeeDefinition;
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
@@ -16,11 +18,6 @@ import forestry.apiculture.genetics.BeeDefinition;
|
||||
|
||||
public class ModuleGeneration implements IWorldGenerator, IInitializable {
|
||||
|
||||
protected static int waterRate = 2;
|
||||
protected static int rockRate = 2;
|
||||
protected static int netherRate = 2;
|
||||
protected static int marbleRate = 2;
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
ExtraBees.materialBeehive = new MaterialBeehive();
|
||||
@@ -30,11 +27,8 @@ public class ModuleGeneration implements IWorldGenerator, IInitializable {
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
ModuleGeneration.waterRate = ConfigurationMain.waterHiveRate;
|
||||
ModuleGeneration.rockRate = ConfigurationMain.rockHiveRate;
|
||||
ModuleGeneration.netherRate = ConfigurationMain.netherHiveRate;
|
||||
GameRegistry.registerWorldGenerator(new ModuleGeneration(), 0);
|
||||
if (!ConfigurationMain.canQuarryMineHives) {
|
||||
if (!EBConfig.canQuarryMineHives && buildcraftCore.active()) {
|
||||
BuildCraftAPI.softBlocks.add(ExtraBees.hive);
|
||||
}
|
||||
}
|
||||
@@ -62,21 +56,21 @@ public class ModuleGeneration implements IWorldGenerator, IInitializable {
|
||||
chunkX <<= 4;
|
||||
chunkZ <<= 4;
|
||||
|
||||
for (int i = 0; i < ModuleGeneration.waterRate; ++i) {
|
||||
for (int i = 0; i < EBConfig.waterHiveRate; ++i) {
|
||||
int randPosX = chunkX + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(50) + 20;
|
||||
int randPosZ = chunkZ + rand.nextInt(16);
|
||||
new WorldGenHiveWater().generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int i = 0; i < ModuleGeneration.rockRate; ++i) {
|
||||
for (int i = 0; i < EBConfig.rockHiveRate; ++i) {
|
||||
int randPosX = chunkX + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(50) + 20;
|
||||
int randPosZ = chunkZ + rand.nextInt(16);
|
||||
new WorldGenHiveRock().generate(world, rand, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for (int i = 0; i < ModuleGeneration.netherRate; ++i) {
|
||||
for (int i = 0; i < EBConfig.netherHiveRate; ++i) {
|
||||
int randPosX = chunkX + rand.nextInt(16);
|
||||
int randPosY = rand.nextInt(50) + 20;
|
||||
int randPosZ = chunkZ + rand.nextInt(16);
|
||||
|
||||
Reference in new issue
Block a user