Java Code Examples for net.minecraftforge.common.BiomeManager#addBiome()
The following examples show how to use
net.minecraftforge.common.BiomeManager#addBiome() .
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: TraverseCommon.java From CommunityMod with GNU Lesser General Public License v2.1 | 6 votes |
public void init(FMLInitializationEvent event) { for (Block block : TraverseBlocks.oreDictNames.keySet()) { OreDictionary.registerOre(TraverseBlocks.oreDictNames.get(block), block); } for (TraverseWorld.TraverseBiomeEntry traverseBiome : TraverseWorld.biomeList) { BiomeManager.addBiome(traverseBiome.getType(), traverseBiome.getEntry()); if (traverseBiome.hasVillages()) { BiomeManager.addVillageBiome(traverseBiome.getBiome(), traverseBiome.canSpawn()); } if (traverseBiome.canSpawn()) { BiomeManager.addSpawnBiome(traverseBiome.getBiome()); } BiomeProvider.allowedBiomes.add(traverseBiome.getBiome()); } registerSmeltingRecipe(new ItemStack(Items.COAL, 1, 1), new ItemStack(TUtils.getBlock("fir_log")), 0.15F); registerSmeltingRecipe(new ItemStack(TUtils.getBlock("red_rock")), new ItemStack(TUtils.getBlock("red_rock_cobblestone")), 0.1F); registerSmeltingRecipe(new ItemStack(TUtils.getBlock("blue_rock")), new ItemStack(TUtils.getBlock("blue_rock_cobblestone")), 0.1F); }
Example 2
Source File: TraverseCommon.java From Traverse-Legacy-1-12-2 with MIT License | 6 votes |
public void init(FMLInitializationEvent event) { for (Block block : TraverseBlocks.oreDictNames.keySet()) { OreDictionary.registerOre(TraverseBlocks.oreDictNames.get(block), block); } for (TraverseWorld.TraverseBiomeEntry traverseBiome : TraverseWorld.biomeList) { BiomeManager.addBiome(traverseBiome.getType(), traverseBiome.getEntry()); if (traverseBiome.hasVillages()) { BiomeManager.addVillageBiome(traverseBiome.getBiome(), traverseBiome.canSpawn()); } if (traverseBiome.canSpawn()) { BiomeManager.addSpawnBiome(traverseBiome.getBiome()); } BiomeProvider.allowedBiomes.add(traverseBiome.getBiome()); } registerSmeltingRecipe(new ItemStack(Items.COAL, 1, 1), new ItemStack(getBlock("fir_log")), 0.15F); registerSmeltingRecipe(new ItemStack(getBlock("red_rock")), new ItemStack(getBlock("red_rock_cobblestone")), 0.1F); registerSmeltingRecipe(new ItemStack(getBlock("blue_rock")), new ItemStack(getBlock("blue_rock_cobblestone")), 0.1F); }
Example 3
Source File: SakuraBiomes.java From Sakura_mod with MIT License | 5 votes |
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: TraverseCommon.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
public void serverAboutToStart(FMLServerAboutToStartEvent event) { traverse_world_data = null; File rootDir = FMLCommonHandler.instance().getSavesDirectory(); if (!rootDir.exists()) { rootDir.mkdir(); } File worldDir = new File(rootDir, event.getServer().getFolderName()); if (!worldDir.exists()) { worldDir.mkdir(); } traverse_world_data = new TraverseWorldVersion(worldDir); for (TraverseWorld.TraverseBiomeEntry traverseBiome : TraverseWorld.biomeList) { BiomeProvider.allowedBiomes.remove(traverseBiome.getBiome()); BiomeManager.removeSpawnBiome(traverseBiome.getBiome()); BiomeManager.removeBiome(traverseBiome.getType(), traverseBiome.getEntry()); boolean canRegister; if (!TraverseConfig.registerBiomesRegardless) { traverse_world_data.reloadVersionFile(); canRegister = VersionUtils.isVersionLessOrEqual(traverseBiome.getVersionAdded(), traverse_world_data.version); } else { canRegister = true; } if (canRegister) { BiomeManager.addBiome(traverseBiome.getType(), traverseBiome.getEntry()); if (traverseBiome.hasVillages()) { BiomeManager.addVillageBiome(traverseBiome.getBiome(), traverseBiome.canSpawn()); } if (traverseBiome.canSpawn()) { BiomeManager.addSpawnBiome(traverseBiome.getBiome()); } BiomeProvider.allowedBiomes.add(traverseBiome.getBiome()); } } }
Example 5
Source File: TraverseCommon.java From Traverse-Legacy-1-12-2 with MIT License | 5 votes |
public void serverAboutToStart(FMLServerAboutToStartEvent event) { traverse_world_data = null; File rootDir = FMLCommonHandler.instance().getSavesDirectory(); if (!rootDir.exists()) { rootDir.mkdir(); } File worldDir = new File(rootDir, event.getServer().getFolderName()); if (!worldDir.exists()) { worldDir.mkdir(); } traverse_world_data = new TraverseWorldVersion(worldDir); for (TraverseWorld.TraverseBiomeEntry traverseBiome : TraverseWorld.biomeList) { BiomeProvider.allowedBiomes.remove(traverseBiome.getBiome()); BiomeManager.removeSpawnBiome(traverseBiome.getBiome()); BiomeManager.removeBiome(traverseBiome.getType(), traverseBiome.getEntry()); boolean canRegister; if (!TraverseConfig.registerBiomesRegardless) { traverse_world_data.reloadVersionFile(); canRegister = VersionUtils.isVersionLessOrEqual(traverseBiome.getVersionAdded(), traverse_world_data.version); } else { canRegister = true; } if (canRegister) { BiomeManager.addBiome(traverseBiome.getType(), traverseBiome.getEntry()); if (traverseBiome.hasVillages()) { BiomeManager.addVillageBiome(traverseBiome.getBiome(), traverseBiome.canSpawn()); } if (traverseBiome.canSpawn()) { BiomeManager.addSpawnBiome(traverseBiome.getBiome()); } BiomeProvider.allowedBiomes.add(traverseBiome.getBiome()); } } }