當前位置: 首頁>>代碼示例>>Java>>正文


Java BiomeDictionary.getBiomesForType方法代碼示例

本文整理匯總了Java中net.minecraftforge.common.BiomeDictionary.getBiomesForType方法的典型用法代碼示例。如果您正苦於以下問題:Java BiomeDictionary.getBiomesForType方法的具體用法?Java BiomeDictionary.getBiomesForType怎麽用?Java BiomeDictionary.getBiomesForType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraftforge.common.BiomeDictionary的用法示例。


在下文中一共展示了BiomeDictionary.getBiomesForType方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: main

import net.minecraftforge.common.BiomeDictionary; //導入方法依賴的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

示例2: typeToArray

import net.minecraftforge.common.BiomeDictionary; //導入方法依賴的package包/類
protected HashSet<String> typeToArray(BiomeDictionary.Type type) {
    BiomeGenBase[] biomes = BiomeDictionary.getBiomesForType(type);
    HashSet<String> names = new HashSet<String>(15);
    for (BiomeGenBase biome : biomes) {
        names.add(biome.biomeName);
    }
    return names;
}
 
開發者ID:soultek101,項目名稱:projectzulu1.7.10-pre-1.3a,代碼行數:9,代碼來源:SpawnableDeclaration.java

示例3: isBeaconBase

import net.minecraftforge.common.BiomeDictionary; //導入方法依賴的package包/類
@Override
public boolean isBeaconBase(IBlockAccess world, BlockPos pos, BlockPos beaconPos) {
	for(BiomeGenBase swamp : BiomeDictionary.getBiomesForType(Type.SWAMP)) {
		if(world.getBiomeGenForCoords(beaconPos) == swamp) {
			return true;
		}
	}
	return false;
}
 
開發者ID:Tyler1555,項目名稱:Mini-Bosses,代碼行數:10,代碼來源:BlockSlime.java

示例4: load

import net.minecraftforge.common.BiomeDictionary; //導入方法依賴的package包/類
@EventHandler
public void load(FMLInitializationEvent event) {

	EntityRegistry.registerModEntity(EntityDwarf.class, "Dwarf", 1, instance, 15, 4, true);	
	LanguageRegistry.instance().addStringLocalization("entity.AMJM.Dwarf.name", "Dwarf");

	EntityRegistry.registerModEntity(EntityDwarfKing.class, "DwarfKing", 2, instance, 10, 3, true);	
	LanguageRegistry.instance().addStringLocalization("entity.AMJM.DwarfKing.name", "Dwarf King");


	//Temp spawn code
	BiomeGenBase[] mountain = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.MOUNTAIN);
	BiomeGenBase[] hills = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.HILLS);
	//EntityRegistry.addSpawn(EntityDwarf.class, 70, 8, 12, EnumCreatureType.creature, forest);
	EntityRegistry.addSpawn(EntityDwarfKing.class, 10, 0, 1, EnumCreatureType.creature, hills);
	EntityRegistry.addSpawn(EntityDwarfKing.class, 15, 0, 1, EnumCreatureType.creature, mountain);

	proxy.rendering();

	mineDoor = new BlockMineDoor(2900, Material.iron);
	GameRegistry.registerBlock(mineDoor, "mineDoor");
	LanguageRegistry.addName(mineDoor, "Mine Door");
	
	debugKingTool = new ItemDebug(2901);
	GameRegistry.registerItem(debugKingTool, "debugKingTool");
	LanguageRegistry.addName(debugKingTool, "debugKingTool");



	int id = 230; // has to be unique
	EntityList.IDtoClassMapping.put(id, EntityDwarf.class);
	EntityList.entityEggs.put(id, new EntityEggInfo(id, 0x00000, 0xFFFFF));

	id = 231; // has to be unique
	EntityList.IDtoClassMapping.put(id, EntityDwarfKing.class);
	EntityList.entityEggs.put(id, new EntityEggInfo(id, 0x00110, 0xFFFFF));

}
 
開發者ID:Altra,項目名稱:ModJam,代碼行數:39,代碼來源:MJMod.java

示例5: addBiomesByType

import net.minecraftforge.common.BiomeDictionary; //導入方法依賴的package包/類
public static void addBiomesByType(Type type) {
	for (BiomeGenBase biome : BiomeDictionary.getBiomesForType(type)) {
		addBiome(biome);
	}
}
 
開發者ID:DracoAnimus,項目名稱:Coding,代碼行數:6,代碼來源:BiomeRegistrant.java

示例6: removeBiomesByType

import net.minecraftforge.common.BiomeDictionary; //導入方法依賴的package包/類
public static void removeBiomesByType(BiomeDictionary.Type type) {
	for (BiomeGenBase biome : BiomeDictionary.getBiomesForType(type)) {
		removeBiome(biome);
	}
}
 
開發者ID:DracoAnimus,項目名稱:Coding,代碼行數:6,代碼來源:BiomeRegistrant.java


注:本文中的net.minecraftforge.common.BiomeDictionary.getBiomesForType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。