public static void preInit() { int biomeID = 10; while (BiomeDictionary.isBiomeRegistered(biomeID)) biomeID++; // Create Town Forest biomeTownForest = new BiomeTownForest(biomeID).setBiomeName(BiomeTownForest.name); // Allow villages in this biome BiomeManager.addVillageBiome(biomeTownForest, true); BiomeDictionary.registerBiomeType(biomeTownForest, Type.MAGICAL); int weight = Configs.VILLAGE.town_weight; LogHelper.info("ModBiomes: Town Forest created with weight: " + weight); biomeEntryTownForest = new BiomeEntry(biomeTownForest, weight); BiomeManager.addBiome(BiomeType.WARM, biomeEntryTownForest); // Create City Forest biomeID++; biomeCityPlains = new BiomeCityPlains(biomeID).setBiomeName(BiomeCityPlains.name); // Allow villages in this biome BiomeManager.addVillageBiome(biomeCityPlains, true); BiomeDictionary.registerBiomeType(biomeCityPlains, Type.MAGICAL); weight = Configs.VILLAGE.city_weight; LogHelper.info("ModBiomes: City Plains created with weight: " + weight); biomeEntryCityPlains = new BiomeEntry(biomeCityPlains, weight); BiomeManager.addBiome(BiomeType.WARM, biomeEntryCityPlains); }
public void main() { //Ores GameRegistry.registerWorldGenerator(new WorldGenDerpyOres(), 42); //Biome BiomeGenBase magicBiome = new MagicBiomeGen(Main.idMagicBiome); BiomeDictionary.registerBiomeType(magicBiome, BiomeDictionary.Type.MAGICAL); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(magicBiome, 10)); BiomeManager.addSpawnBiome(magicBiome); //Trees GameRegistry.registerWorldGenerator(new DerpyTreeGen(new WorldGenMagicTree(false),magicBiome,9,1),42); GameRegistry.registerWorldGenerator(new DerpyTreeGen(new WorldGenEbonyTree(false),magicBiome,10,1),42); BiomeGenBase[] forests = BiomeDictionary.getBiomesForType(Type.FOREST); for (int i=0;i<forests.length;i++) { BiomeGenBase b = forests[i]; GameRegistry.registerWorldGenerator(new DerpyTreeGen(new WorldGenEbonyTree(false),b,2,3),1); } }
public static void init(){ float height = ((float)68 - 65.0F) / 17.0F; float heightVar = Math.abs((((float)10 - 7.0F) / (20.0F * 4.0F) + ((float)5 - 4.0F) / 20.0F) / 2.0F); Biome.BiomeProperties bambooProperties = new Biome.BiomeProperties("Bamboo Forest").setBaseHeight(height).setHeightVariation(heightVar).setTemperature(0.8F).setRainfall(0.4F); BAMBOO_FOREST = (BiomeBambooForest) new BiomeBambooForest(bambooProperties).setRegistryName(CrystalMod.resourceL("bambooforest")); GameRegistry.register(BAMBOO_FOREST); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(BAMBOO_FOREST, 10)); BiomeDictionary.addTypes(BAMBOO_FOREST, BiomeDictionary.Type.FOREST, BiomeDictionary.Type.WET); BiomeManager.addSpawnBiome(BAMBOO_FOREST); ModLogger.info("Added "+BAMBOO_FOREST.getBiomeName()+" id = "+Biome.getIdForBiome(BAMBOO_FOREST)); }
private static void initBiomes() { if (Config.genRedwood == true) { int redwoodID = nextBiomeID(); redwood = new BiomeRedwood(redwoodID).setBiomeName("Redwood Forest"); registerBiomes(redwood, BiomeType.WARM, Type.FOREST, redwoodID, true); } if (Config.genFrost == true) { int frostID = nextBiomeID(); frost = new BiomeFrost(frostID).setBiomeName("The Frost"); registerBiomes(frost, BiomeType.ICY, Type.COLD, frostID, false); } }
private static void registerBiomes(BiomeGenBase biome, BiomeType type, Type forgeType, int id, boolean canSpawnIn) { BiomeDictionary.registerBiomeType(biome, forgeType); BiomeManager.addBiome(type, new BiomeEntry(biome, id)); if (canSpawnIn) { BiomeManager.addSpawnBiome(biome); } }
public static void init() { BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(cherryForest, 4)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(rubberPlains, 4)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(lemonForest, 4)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(pearForest, 4)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(mangoForest, 4)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(fruitForest, 2)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(mapleWoods, 5)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(oliveWoods, 5)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(ebonyWoods, 5)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(jacarandaWoods, 5)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(endearingWoods, 3)); BiomeManager.addBiome(BiomeType.DESERT, new BiomeEntry(bananaGrove, 6)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(cherryForest, 4)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(rubberPlains, 4)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(lemonForest, 4)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(pearForest, 4)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(mangoForest, 4)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(fruitForest, 2)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(mapleWoods, 5)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(oliveWoods, 5)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(ebonyWoods, 5)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(jacarandaWoods, 5)); BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(endearingWoods, 3)); BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(bananaGrove, 3)); BiomeManager.addVillageBiome(rubberPlains, true); BiomeManager.addVillageBiome(bananaGrove, true); }
@SubscribeEvent public void registerBiomes(RegistryEvent.Register<Biome> event){ event.getRegistry().registerAll(BIOMES.toArray(new Biome[0])); if(dark1){ registerBiomeWithTypes(ACBiomes.darklands, darkWeight1, BiomeType.WARM, Type.WASTELAND, Type.SPOOKY); BiomeManager.addVillageBiome(ACBiomes.darklands, true); } if(dark2){ registerBiomeWithTypes(ACBiomes.darklands_forest, darkWeight2, BiomeType.WARM, Type.FOREST, Type.SPOOKY); BiomeManager.addVillageBiome(ACBiomes.darklands_forest, true); } if(dark3){ registerBiomeWithTypes(ACBiomes.darklands_plains, darkWeight3, BiomeType.WARM, Type.PLAINS, Type.SPOOKY); BiomeManager.addVillageBiome(ACBiomes.darklands_plains, true); } if(dark4) registerBiomeWithTypes(ACBiomes.darklands_hills, darkWeight4, BiomeType.COOL, Type.HILLS, Type.SPOOKY); if(dark5){ registerBiomeWithTypes(ACBiomes.darklands_mountains, darkWeight5, BiomeType.COOL, Type.MOUNTAIN, Type.SPOOKY); BiomeManager.addStrongholdBiome(ACBiomes.darklands_mountains); } if(coralium1) registerBiomeWithTypes(ACBiomes.coralium_infested_swamp, coraliumWeight, BiomeType.WARM, Type.SWAMP); if(darkspawn1) BiomeManager.addSpawnBiome(ACBiomes.darklands); if(darkspawn2) BiomeManager.addSpawnBiome(ACBiomes.darklands_forest); if(darkspawn3) BiomeManager.addSpawnBiome(ACBiomes.darklands_plains); if(darkspawn4) BiomeManager.addSpawnBiome(ACBiomes.darklands_hills); if(darkspawn5) BiomeManager.addSpawnBiome(ACBiomes.darklands_mountains); if(coraliumspawn1) BiomeManager.addSpawnBiome(ACBiomes.coralium_infested_swamp); BiomeDictionary.addTypes(ACBiomes.abyssal_wastelands, Type.DEAD); BiomeDictionary.addTypes(ACBiomes.dreadlands, Type.DEAD); BiomeDictionary.addTypes(ACBiomes.purified_dreadlands, Type.DEAD); BiomeDictionary.addTypes(ACBiomes.dreadlands_mountains, Type.DEAD); BiomeDictionary.addTypes(ACBiomes.dreadlands_forest, Type.DEAD); BiomeDictionary.addTypes(ACBiomes.omothol, Type.DEAD); BiomeDictionary.addTypes(ACBiomes.dark_realm, Type.DEAD); }
private static void registerBiomeWithTypes(Biome biome, int weight, BiomeType btype, Type...types){ BiomeDictionary.addTypes(biome, types); BiomeManager.addBiome(btype, new BiomeEntry(biome, weight)); }