diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 4bb28de1..65b96e35 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -133,7 +133,6 @@ public class BuildCraftEnergy extends BuildCraftMod { biomeOilOcean = BiomeGenOilOcean.makeBiome(oilOceanBiomeId); } - engineBlock = new BlockEngine(); CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class); @@ -255,6 +254,25 @@ public class BuildCraftEnergy extends BuildCraftMod { CoreProxy.proxy.addCraftingRecipe(new ItemStack(engineBlock, 1, 2), new Object[]{"www", " g ", "GpG", 'w', Items.iron_ingot, 'g', Blocks.glass, 'G', BuildCraftCore.ironGearItem, 'p', Blocks.piston}); } + + private int findUnusedBiomeID (String biomeName) { + int freeBiomeID = 0; + // code to find a free biome + for (int i=1; i<256; i++) { + if (BiomeGenBase.getBiomeGenArray()[i] == null) { + freeBiomeID = i; + return freeBiomeID; + } + } + // failed to find any free biome IDs + class BiomeIdLimitException extends RuntimeException { + public BiomeIdLimitException(String biome) { + super(String.format("You have a run out of free Biome Ids for %s", biome)); + } + } + + throw new BiomeIdLimitException(biomeName); + } private int findUnusedBiomeID (String biomeName) { int freeBiomeID = 0; diff --git a/common/buildcraft/core/DefaultProps.java b/common/buildcraft/core/DefaultProps.java index 33d77c54..2c056f9f 100644 --- a/common/buildcraft/core/DefaultProps.java +++ b/common/buildcraft/core/DefaultProps.java @@ -124,6 +124,6 @@ public class DefaultProps { public static final int FILLER_LIFESPAN_TOUGH = 20; public static final int FILLER_LIFESPAN_NORMAL = 6000; - public static int BIOME_OIL_OCEAN = 215; - public static int BIOME_OIL_DESERT = 216; + public static int BIOME_OIL_OCEAN = 126; + public static int BIOME_OIL_DESERT = 127; }