Java Code Examples for net.minecraftforge.common.BiomeDictionary#addTypes()

The following examples show how to use net.minecraftforge.common.BiomeDictionary#addTypes() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TraverseWorld.java    From Traverse-Legacy-1-12-2 with MIT License 7 votes vote down vote up
public static void register(Version versionAdded,
                            Biome biome,
                            BiomeType type,
                            String name,
                            int weight,
                            boolean disabled,
                            boolean canSpawn,
                            VillageReplacements villageReplacements,
                            RegistryEvent.Register<Biome> event,
                            BiomeDictionary.Type... biomeDictTypes) {
	if (!disabled) {
		biome.setRegistryName(new ResourceLocation(TraverseConstants.MOD_ID, name));
		event.getRegistry().register(biome);
		for (BiomeDictionary.Type biomeDictType : biomeDictTypes) {
			BiomeDictionary.addTypes(biome, biomeDictType);
		}
		biomeList.add(new TraverseBiomeEntry(biome, type, weight, canSpawn, !TraverseConfig.disallowVillages && villageReplacements != NO_VILLAGES, versionAdded));
		if (!TraverseConfig.disallowVillages && villageReplacements != NO_VILLAGES && villageReplacements != NO_REPLACEMENTS) {
			villageReplacementBiomes.put(biome, villageReplacements);
		}
	}
}
 
Example 2
Source File: TraverseWorld.java    From CommunityMod with GNU Lesser General Public License v2.1 6 votes vote down vote up
public static void register(Version versionAdded,
                            Biome biome,
                            BiomeType type,
                            String name,
                            int weight,
                            boolean disabled,
                            boolean canSpawn,
                            VillageReplacements villageReplacements,
                            RegistryEvent.Register<Biome> event,
                            BiomeDictionary.Type... biomeDictTypes) {
    if (!disabled) {
        biome.setRegistryName(new ResourceLocation(TraverseConstants.MOD_ID, name));
        event.getRegistry().register(biome);
        for (BiomeDictionary.Type biomeDictType : biomeDictTypes) {
            BiomeDictionary.addTypes(biome, biomeDictType);
        }
        biomeList.add(new TraverseBiomeEntry(biome, type, weight, canSpawn, !TraverseConfig.disallowVillages && villageReplacements != NO_VILLAGES, versionAdded));
        if (!TraverseConfig.disallowVillages && villageReplacements != NO_VILLAGES && villageReplacements != NO_REPLACEMENTS) {
            villageReplacementBiomes.put(biome, villageReplacements);
        }
    }
}
 
Example 3
Source File: SakuraBiomes.java    From Sakura_mod with MIT License 5 votes vote down vote up
public static void register(IForgeRegistry<Biome> registry) {
    registry.register(BAMBOOFOREST.setRegistryName("bamboo_forest"));
    BiomeManager.addBiome(BiomeManager.BiomeType.WARM,new BiomeManager.BiomeEntry(BAMBOOFOREST, 8));
    BiomeDictionary.addTypes(BAMBOOFOREST, HOT, WET, DENSE, JUNGLE);
    registry.register(MAPLEFOREST.setRegistryName("maple_forest"));
    BiomeManager.addBiome(BiomeManager.BiomeType.WARM,new BiomeManager.BiomeEntry(MAPLEFOREST, 8));
    BiomeDictionary.addTypes(MAPLEFOREST, FOREST);
}
 
Example 4
Source File: ModBiomes.java    From Wizardry with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SubscribeEvent
    public static void register(RegistryEvent.Register<Biome> evt) {
        IForgeRegistry<Biome> r = evt.getRegistry();
        r.registerAll(BIOME_UNDERWORLD);
//        BiomeDictionary.addTypes(BIOME_TORIKKI, BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.SPOOKY, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.WASTELAND);
        BiomeDictionary.addTypes(BIOME_UNDERWORLD, BiomeDictionary.Type.VOID, BiomeDictionary.Type.SPOOKY, BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.DRY, BiomeDictionary.Type.COLD);
//        BiomeDictionary.addTypes(BIOME_TORIKKISEA, BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.SPOOKY, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.WASTELAND,BiomeDictionary.Type.WATER);
    }
 
Example 5
Source File: CommonProxy.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
protected void registerWorldGen()
{
	//GameRegistry.registerWorldGenerator(new WorldGenCliffNoise(), 1);
	//GameRegistry.registerWorldGenerator(new WorldGenCliffRocks(), 1);
	//GameRegistry.registerWorldGenerator(new WorldGenPortals(), 2);
	GameRegistry.registerWorldGenerator(new WorldGenStalag(), 4);

	HexGenRegistry.registerWorldGenerator(new WorldGenCliffRocksHex(), 1);
	HexGenRegistry.registerWorldGenerator(new WorldGenPortalsHex(), 2);
	HexGenRegistry.registerWorldGenerator(new WorldGenClayHex(), 5);
	HexGenRegistry.registerWorldGenerator(new WorldGenLooseRockHex(), 5);
	HexGenRegistry.registerWorldGenerator(new WorldGenTreesHex(), 10);
	HexGenRegistry.registerWorldGenerator(new WorldGenSwampTreesHex(), 10);
	HexGenRegistry.registerWorldGenerator(new WorldGenCatTailsHex(), 100);
	HexGenRegistry.registerWorldGenerator(new WorldGenGrassHex(), 100);
	HexGenRegistry.registerWorldGenerator(new WorldGenGrassDryHex(), 100);
	HexGenRegistry.registerWorldGenerator(new WorldGenPamsGardensHex(), 25);

	Biome.registerBiome(200, "BIOME_BARE", Global.BIOME_BARE);
	Biome.registerBiome(201, "BIOME_BEACH", Global.BIOME_BEACH);
	Biome.registerBiome(202, "BIOME_DECIDUOUS_FOREST", Global.BIOME_DECIDUOUS_FOREST);
	Biome.registerBiome(203, "BIOME_DEEP_OCEAN", Global.BIOME_DEEP_OCEAN);
	Biome.registerBiome(204, "BIOME_DRY_FOREST", Global.BIOME_DRY_FOREST);
	Biome.registerBiome(205, "BIOME_GRASSLAND", Global.BIOME_GRASSLAND);
	Biome.registerBiome(206, "BIOME_LAKE", Global.BIOME_LAKE);
	Biome.registerBiome(207, "BIOME_MARSH", Global.BIOME_MARSH);
	Biome.registerBiome(208, "BIOME_OCEAN", Global.BIOME_OCEAN);
	Biome.registerBiome(209, "BIOME_POLAR_DESERT", Global.BIOME_POLAR_DESERT);
	Biome.registerBiome(210, "BIOME_POND", Global.BIOME_POND);
	Biome.registerBiome(211, "BIOME_RAIN_FOREST", Global.BIOME_RAIN_FOREST);
	Biome.registerBiome(212, "BIOME_RIVER", Global.BIOME_RIVER);
	Biome.registerBiome(213, "BIOME_SCORCHED", Global.BIOME_SCORCHED);
	Biome.registerBiome(214, "BIOME_SHRUBLAND", Global.BIOME_SHRUBLAND);
	Biome.registerBiome(215, "BIOME_SUBTROPICAL_DESERT", Global.BIOME_SUBTROPICAL_DESERT);
	Biome.registerBiome(216, "BIOME_TAIGA", Global.BIOME_TAIGA);
	Biome.registerBiome(217, "BIOME_TEMPERATE_DESERT", Global.BIOME_TEMPERATE_DESERT);
	Biome.registerBiome(218, "BIOME_TROPICAL_DESERT", Global.BIOME_TROPICAL_DESERT);
	Biome.registerBiome(219, "BIOME_TUNDRA", Global.BIOME_TUNDRA);
	Biome.registerBiome(220, "BIOME_SWAMP", Global.BIOME_SWAMP);

	BiomeDictionary.addTypes(Global.BIOME_BARE, Type.SPARSE, Type.DEAD, Type.WASTELAND);
	BiomeDictionary.addTypes(Global.BIOME_BEACH, Type.BEACH);
	BiomeDictionary.addTypes(Global.BIOME_DECIDUOUS_FOREST, Type.FOREST);
	BiomeDictionary.addTypes(Global.BIOME_DEEP_OCEAN, Type.OCEAN);
	BiomeDictionary.addTypes(Global.BIOME_DRY_FOREST, Type.DRY, Type.FOREST);
	BiomeDictionary.addTypes(Global.BIOME_GRASSLAND, Type.PLAINS);
	BiomeDictionary.addTypes(Global.BIOME_LAKE, Type.WATER);
	BiomeDictionary.addTypes(Global.BIOME_MARSH, Type.WET, Type.LUSH, Type.SWAMP);
	BiomeDictionary.addTypes(Global.BIOME_OCEAN, Type.OCEAN);
	BiomeDictionary.addTypes(Global.BIOME_POLAR_DESERT, Type.COLD, Type.SPARSE, Type.DRY, Type.SANDY, Type.SNOWY);
	BiomeDictionary.addTypes(Global.BIOME_POND, Type.WATER);
	BiomeDictionary.addTypes(Global.BIOME_RAIN_FOREST, Type.HOT, Type.DENSE, Type.WET, Type.JUNGLE, Type.LUSH, Type.FOREST);
	BiomeDictionary.addTypes(Global.BIOME_RIVER, Type.RIVER);
	BiomeDictionary.addTypes(Global.BIOME_SCORCHED, Type.HOT, Type.SPARSE, Type.DRY, Type.DEAD, Type.WASTELAND);
	BiomeDictionary.addTypes(Global.BIOME_SHRUBLAND, Type.DRY, Type.PLAINS);
	BiomeDictionary.addTypes(Global.BIOME_SUBTROPICAL_DESERT, Type.HOT, Type.SPARSE, Type.DRY, Type.SANDY);
	BiomeDictionary.addTypes(Global.BIOME_TAIGA, Type.COLD, Type.CONIFEROUS, Type.FOREST, Type.SNOWY);
	BiomeDictionary.addTypes(Global.BIOME_TEMPERATE_DESERT, Type.SPARSE, Type.DRY, Type.SANDY);
	BiomeDictionary.addTypes(Global.BIOME_TROPICAL_DESERT, Type.HOT, Type.SPARSE, Type.DRY, Type.SANDY);
	BiomeDictionary.addTypes(Global.BIOME_TUNDRA, Type.COLD, Type.SPARSE, Type.SNOWY);
	BiomeDictionary.addTypes(Global.BIOME_SWAMP, Type.WET, Type.SPOOKY, Type.LUSH, Type.SWAMP);
}