diff --git a/src/minecraft/biomesoplenty/configuration/BOPBiomes.java b/src/minecraft/biomesoplenty/configuration/BOPBiomes.java index 8b0798a48..9cac8b135 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPBiomes.java +++ b/src/minecraft/biomesoplenty/configuration/BOPBiomes.java @@ -1,5 +1,6 @@ package biomesoplenty.configuration; +import ted80.api.DefaultBiomeList; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.BiomeManager; @@ -88,6 +89,7 @@ import biomesoplenty.worldtype.WTBiomesOP; import com.google.common.base.Optional; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.registry.GameRegistry; public class BOPBiomes { @@ -192,6 +194,12 @@ public class BOPBiomes { //Initialize new world type WTBiomesOP = new WTBiomesOP(); + + if (Loader.isModLoaded("BWG4")) + { + /* ==== biometypes: 4=hot, 3=wet, 2=norm, 1=cold, 0=tech, 5=island ==== */ + //DefaultBiomeList.addBiome("Alps", Biomes.alps, 1); + } //Spawning addSpawnBiome(Biomes.alps); diff --git a/src/minecraft/ted80/api/DefaultBiomeList.java b/src/minecraft/ted80/api/DefaultBiomeList.java new file mode 100644 index 000000000..1a6d85237 --- /dev/null +++ b/src/minecraft/ted80/api/DefaultBiomeList.java @@ -0,0 +1,79 @@ +package ted80.api; + +import java.util.ArrayList; +import net.minecraft.world.biome.BiomeGenBase; + +public class DefaultBiomeList +{ + public static ArrayList allowedBiomes = new ArrayList(); + public static String[] biomeList = new String[256]; + public static int[] biomeType = new int[256]; + public static int generatorversion = 1; + + public static void addBiome(String name, BiomeGenBase biome, int biometype) + { + allowedBiomes.add(biome); + + for(int i = 0; i < biomeList.length; i++) + { + if(biomeList[i] == null) + { + biomeList[i] = name; + biomeType[i] = biometype; + break; + } + } + } + + public static ArrayList getBiomeList() + { + return allowedBiomes; + } + + public static int[] getTypesList() + { + return biomeType; + } + + public static String[] getStringList() + { + String[] newbiomelist = new String[biomeList.length]; + for(int i = 0; i < biomeList.length; i++) + { + if(biomeList[i] != null) + { + newbiomelist[i] = biomeList[i] + "=true"; + } + else + { + break; + } + } + return newbiomelist; + } + + public static String getDefaultString() + { + String genstring = generatorversion + "&"; + + for(int i = 0; i < biomeList.length; i++) + { + if(biomeList[i] != null) + { + if(i != 0) + { + genstring += ";" + biomeList[i] + "=true"; + } + else + { + genstring += biomeList[i] + "=true"; + } + } + else + { + break; + } + } + return genstring; + } +}