当前位置: 首页>>代码示例>>Java>>正文


Java BiomeType类代码示例

本文整理汇总了Java中net.minecraftforge.common.BiomeManager.BiomeType的典型用法代码示例。如果您正苦于以下问题:Java BiomeType类的具体用法?Java BiomeType怎么用?Java BiomeType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BiomeType类属于net.minecraftforge.common.BiomeManager包,在下文中一共展示了BiomeType类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preInit

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
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);
}
 
开发者ID:DracoAnimus,项目名称:Coding,代码行数:27,代码来源:ModBiomes.java

示例2: main

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
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);
	}
}
 
开发者ID:Wuerfel21,项目名称:The-Derpy-Shiz-Mod,代码行数:21,代码来源:DerpyWorld.java

示例3: init

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
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));
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:12,代码来源:ModBiomes.java

示例4: initBiomes

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
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);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:16,代码来源:MBiomeManager.java

示例5: registerBiomes

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
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);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:10,代码来源:MBiomeManager.java

示例6: init

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
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);
}
 
开发者ID:OmgImAlexis,项目名称:TheStuffMod,代码行数:30,代码来源:ModBiomes.java

示例7: registerBiomes

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
@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);
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:46,代码来源:InitHandler.java

示例8: registerBiomeWithTypes

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
private static void registerBiomeWithTypes(Biome biome, int weight, BiomeType btype, Type...types){
	BiomeDictionary.addTypes(biome, types);
	BiomeManager.addBiome(btype, new BiomeEntry(biome, weight));
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:5,代码来源:InitHandler.java

示例9: preinit

import net.minecraftforge.common.BiomeManager.BiomeType; //导入依赖的package包/类
@EventHandler
public void preinit(FMLPreInitializationEvent event) {
	
	System.out.println("Starting Rezolve @[email protected]");

	boolean enabled = false;
	if (enabled) {

		GameRegistry.register(CITY_BIOME);
		GameRegistry.registerWorldGenerator(CITY_GENERATOR, Integer.MAX_VALUE);
		
		BiomeProvider.allowedBiomes.clear();
		
		int cityWeight = 3;
		
		//cityWeight = 999999;
		BiomeManager.addBiome(BiomeType.DESERT, new BiomeEntry(CITY_BIOME, cityWeight));
		BiomeManager.addBiome(BiomeType.WARM, new BiomeEntry(CITY_BIOME, cityWeight));
		BiomeManager.addBiome(BiomeType.COOL, new BiomeEntry(CITY_BIOME, cityWeight));
		BiomeManager.addBiome(BiomeType.ICY, new BiomeEntry(CITY_BIOME, cityWeight));
		BiomeManager.addSpawnBiome(CITY_BIOME);
	}
	
	this.guiHandler = new RezolveGuiHandler();
	this.registerBlocks();
	this.registerItems();

	this.registerBlockRecipes();
	this.registerItemRecipes();

	GhostSlotUpdateMessageHandler.register();
	
	proxy.init(this);

	FMLInterModComms.sendMessage("Waila", "register", "com.astronautlabs.mc.rezolve.waila.WailaCompat.load");

}
 
开发者ID:astronautlabs,项目名称:rezolve,代码行数:38,代码来源:RezolveMod.java


注:本文中的net.minecraftforge.common.BiomeManager.BiomeType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。