本文整理匯總了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);
}
}
示例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;
}
示例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;
}
示例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));
}
示例5: addBiomesByType
import net.minecraftforge.common.BiomeDictionary; //導入方法依賴的package包/類
public static void addBiomesByType(Type type) {
for (BiomeGenBase biome : BiomeDictionary.getBiomesForType(type)) {
addBiome(biome);
}
}
示例6: removeBiomesByType
import net.minecraftforge.common.BiomeDictionary; //導入方法依賴的package包/類
public static void removeBiomesByType(BiomeDictionary.Type type) {
for (BiomeGenBase biome : BiomeDictionary.getBiomesForType(type)) {
removeBiome(biome);
}
}