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


Java EntityRegistry.addSpawn方法代碼示例

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


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

示例1: LoadEntitys

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void LoadEntitys() {
	

//Pat Registry
    EntityRegistry.registerGlobalEntityID(EntitySpookyPat.class, "EntitySpookyPat",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntitySpookyPat.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
//Jen Registry
    EntityRegistry.registerGlobalEntityID(EntitySpookyJen.class, "EntitySpookyJen",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntitySpookyJen.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
//Jen Registry
    EntityRegistry.registerGlobalEntityID(EntitySpookyCaptianCookie.class, "EntitySpookyCaptianCookie",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntitySpookyCaptianCookie.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
//ScareCrow Registry
    EntityRegistry.registerGlobalEntityID(EntityScareCrow.class, "EntityScareCrow",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntityScareCrow.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
//Ghost Registry
    EntityRegistry.registerGlobalEntityID(EntityGhost.class, "EntityGhost",EntityRegistry.findGlobalUniqueEntityId());
    EntityRegistry.addSpawn(EntityGhost.class, 8, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
	
   	}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:25,代碼來源:EntityLoader.java

示例2: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
public static void registerEntity (Entity entity){
    if (!(entity instanceof SSheepEntity)) { SteelSheep.logger.error("The entity specified (" + entity + ") did not include any of the required fields"); return; }

    int newId = getUniqueId();

    EntityRegistry.registerModEntity(entity.getClass(),((SSheepEntity)entity).getEntityName(),newId,SteelSheep.instance,80,3,false);
    EntityList.IDtoClassMapping.put(newId,entity.getClass());
    EntityList.entityEggs.put(newId,new EntityList.EntityEggInfo(newId,((SSheepEntity) entity).getEggColors()[0],((SSheepEntity) entity).getEggColors()[1]));

    if (entity instanceof EntityLiving) {
        EntityRegistry.addSpawn(((EntityLiving)entity).getClass(), 30, 2, 4, EnumCreatureType.ambient, ((SSheepEntity) entity).getBiomeList());
    }

    SteelSheep.logger.info("Registered the entity " + entity + " successfully! (Name: " + EntityList.stringToClassMapping.get(entity.getClass()) + ")");

}
 
開發者ID:Mitchellbrine,項目名稱:SteelSheep,代碼行數:18,代碼來源:SSEntityRegistry.java

示例3: addSpawn

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature)
{
    for (BiomeGenBase biome : BiomeGenBase.biomeList)
    {
    	if(biome != null)
    	{
    		if(BiomeDictionary.isBiomeRegistered(biome))
    		{
    			if(BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.END))
    			{
    				return;
    			}
    			if(BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.NETHER))
    			{
    				return;
    			}
    			if(BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.MUSHROOM))
    			{
    				return;
    			}
    		}
    		
    		EntityRegistry.addSpawn(entityClass, weightedProb, min, max, typeOfCreature, biome);
    	}
    }
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:27,代碼來源:EntitylistMF.java

示例4: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void registerEntity(Class entityClass, String name)
{
	int entityID = EntityRegistry.findGlobalUniqueEntityId();
	long seed = name.hashCode();
	Random rand = new Random(seed);
	int primaryColor = rand.nextInt() * 0x000000;
	int secondaryColor = rand.nextInt() * 0xff00000;
	int spawnRateconfig = ConfigurationHandler.xenbeastSpawnRate;
	int minSpawnconfig = ConfigurationHandler.xenbeastMinSpawn;
	int maxSpawnconfig = ConfigurationHandler.xenbeastMaxSpawn;

	EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
	EntityRegistry.registerModEntity(entityClass, name, entityID, Xenorite.instance, 64, 1, true);
	EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor)); // probablity of space/minimal to spawn/max to spawn
	EntityRegistry.addSpawn(XenBeastEntity.class, spawnRateconfig, minSpawnconfig, maxSpawnconfig, EnumCreatureType.monster, new BiomeGenBase[]
	{ BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.extremeHills, BiomeGenBase.forest, BiomeGenBase.taiga, BiomeGenBase.swampland, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.icePlains, BiomeGenBase.iceMountains, BiomeGenBase.mushroomIsland, BiomeGenBase.mushroomIslandShore, BiomeGenBase.beach, BiomeGenBase.desertHills, BiomeGenBase.forestHills, BiomeGenBase.taigaHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.jungleEdge, BiomeGenBase.deepOcean, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.roofedForest, BiomeGenBase.coldTaiga, BiomeGenBase.coldTaigaHills, BiomeGenBase.megaTaiga, BiomeGenBase.megaTaigaHills, BiomeGenBase.extremeHillsPlus, BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.mesa, BiomeGenBase.mesaPlateau_F, BiomeGenBase.mesaPlateau });
	DungeonHooks.addDungeonMob("XenBeastEntity", 180);
}
 
開發者ID:TechieCrow,項目名稱:Xenorite,代碼行數:19,代碼來源:XenBeastRegistry.java

示例5: registerEntity

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void registerEntity(Class entityClass, String name)
{
	int entityID = EntityRegistry.findGlobalUniqueEntityId();
	long seed = name.hashCode();
	Random rand = new Random(seed);
	int primaryColor = rand.nextInt() * 0x0000FF;
	int secondaryColor = rand.nextInt() * 0x800080;
	int spawnRateconfig = ConfigurationHandler.enderPigIncSpawnRate;
	int minSpawnconfig = ConfigurationHandler.enderPigIncMinSpawn;
	int maxSpawnconfig = ConfigurationHandler.enderPigIncMaxSpawn;

	EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
	EntityRegistry.registerModEntity(entityClass, name, entityID, Xenorite.instance, 64, 1, true);
	EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor)); // probablity of space/minimal to spawn/max to spawn
	EntityRegistry.addSpawn(EnderPigIncEntity.class, spawnRateconfig, minSpawnconfig, maxSpawnconfig, EnumCreatureType.monster, new BiomeGenBase[]
	{ BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.extremeHills, BiomeGenBase.forest, BiomeGenBase.taiga, BiomeGenBase.swampland, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.icePlains, BiomeGenBase.iceMountains, BiomeGenBase.mushroomIsland, BiomeGenBase.mushroomIslandShore, BiomeGenBase.beach, BiomeGenBase.desertHills, BiomeGenBase.forestHills, BiomeGenBase.taigaHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.jungleEdge, BiomeGenBase.deepOcean, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, BiomeGenBase.roofedForest, BiomeGenBase.coldTaiga, BiomeGenBase.coldTaigaHills, BiomeGenBase.megaTaiga, BiomeGenBase.megaTaigaHills, BiomeGenBase.extremeHillsPlus, BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.mesa, BiomeGenBase.mesaPlateau_F, BiomeGenBase.mesaPlateau });
	DungeonHooks.addDungeonMob("EnderPigIncEntity", 180);
}
 
開發者ID:TechieCrow,項目名稱:Xenorite,代碼行數:19,代碼來源:EnderPigIncRegistry.java

示例6: addEntities

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public void addEntities()
{
	EntityRegistry.registerGlobalEntityID(EntityWarrior.class, "Warrior", EntityRegistry.findGlobalUniqueEntityId(), 0X613D06, 0X312616);
	EntityRegistry.addSpawn("Warrior", 25, 1, 1, EnumCreatureType.creature, BiomeGenBase.plains, BiomeGenBase.river);
	EntityRegistry.registerGlobalEntityID(EntityShield.class, "Shield", EntityRegistry.findGlobalUniqueEntityId(), 0X613D06, 0X286561);
	EntityRegistry.addSpawn("Shield", 25, 1, 1, EnumCreatureType.creature, BiomeGenBase.plains, BiomeGenBase.river);
	EntityRegistry.registerGlobalEntityID(EntityArcher.class, "Archer", EntityRegistry.findGlobalUniqueEntityId(), 0X613D06, 0XC30B0B);
	EntityRegistry.addSpawn("Archer", 25, 1, 1, EnumCreatureType.creature, BiomeGenBase.plains, BiomeGenBase.river);
	EntityRegistry.registerGlobalEntityID(EntityNetherSpider.class, "NetherSpider", EntityRegistry.findGlobalUniqueEntityId(), 0XC30B0B, 0X391A38);
	EntityRegistry.addSpawn("NetherSpider", 100, 1, 4, EnumCreatureType.monster, BiomeGenBase.hell);
	EntityRegistry.registerGlobalEntityID(EntityNetherCreeper.class, "NetherCreeper", EntityRegistry.findGlobalUniqueEntityId(), 0XC30B0B, 0X1EC30B);
	EntityRegistry.addSpawn("NetherCreeper", 100, 1, 4, EnumCreatureType.monster, BiomeGenBase.hell);
	EntityRegistry.registerGlobalEntityID(EntityNetherman.class, "Netherman", EntityRegistry.findGlobalUniqueEntityId(), 0XC30BB7, 0XC3110B);
	EntityRegistry.addSpawn("Netherman", 100, 1, 4, EnumCreatureType.monster, BiomeGenBase.hell);
	EntityRegistry.registerGlobalEntityID(EntityEnderCreeper.class, "EnderCreeper", EntityRegistry.findGlobalUniqueEntityId(), 0XC30BB7, 0X1EC30B);
	EntityRegistry.addSpawn("EnderCreeper", 50, 1, 1, EnumCreatureType.monster, BiomeGenBase.sky);
	EntityRegistry.registerGlobalEntityID(EntityEnderGolem.class, "EnderGolem", EntityRegistry.findGlobalUniqueEntityId(), 0XC30BB7, 0X286561);
	EntityRegistry.addSpawn("EnderGolem", 50, 1, 1, EnumCreatureType.monster, BiomeGenBase.sky);
	EntityRegistry.registerGlobalEntityID(EntityGoldGolem.class, "GoldGolem", EntityRegistry.findGlobalUniqueEntityId());
	EntityRegistry.registerGlobalEntityID(EntityDiamondGolem.class, "DiamondGolem", EntityRegistry.findGlobalUniqueEntityId());
}
 
開發者ID:AlphaSwittle-Team,項目名稱:MinExtension,代碼行數:22,代碼來源:EntityHandler.java

示例7: preinit

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void preinit(){
	//Mobs
	EntityRegistry.registerGlobalEntityID(EntityAquaticGolem.class, "AquaticGolem", EntityRegistry.findGlobalUniqueEntityId(), 0x7AE8FF, 0x47FFE2);
	EntityRegistry.registerGlobalEntityID(EntityScorpioid.class, "Scorpioid", EntityRegistry.findGlobalUniqueEntityId(), 0xFF361C, 0x880007);
	EntityRegistry.registerGlobalEntityID(EntityVoidCrawler.class, "VoidCrawler", EntityRegistry.findGlobalUniqueEntityId(), 0x666D68, 0x52E9E9);
	EntityRegistry.registerGlobalEntityID(EntityGiantFish.class, "GiantFish", EntityRegistry.findGlobalUniqueEntityId(), 0x66B69C, 0x48B0BE);
	EntityRegistry.registerGlobalEntityID(EntityKelpFish.class, "KelpFish", EntityRegistry.findGlobalUniqueEntityId(), 0x54B8DD, 0x34898D);
	
	//Bosses
	EntityRegistry.registerGlobalEntityID(EntityScorpius.class, "Scorpius", EntityRegistry.findGlobalUniqueEntityId());

	EntityRegistry.registerGlobalEntityID(EntityROCArrow.class, "ROCArrow", EntityRegistry.findGlobalUniqueEntityId());
	EntityRegistry.registerModEntity(EntityROCArrow.class, "ROCArrow", EntityRegistry.findGlobalUniqueEntityId(), RealmsOfChaos.instance, 64, 1, true);
	
	EntityRegistry.registerGlobalEntityID(EntityBullet.class, "ROCBullet", EntityRegistry.findGlobalUniqueEntityId());
	EntityRegistry.registerModEntity(EntityBullet.class, "ROCBullet", EntityRegistry.findGlobalUniqueEntityId(), RealmsOfChaos.instance, 64, 1, true);
	
	for (int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++)
    {
		if (BiomeGenBase.getBiomeGenArray()[i] != null)
        {
			EntityRegistry.addSpawn(EntityScorpioid.class, 130, 2, 5, EnumCreatureType.monster, BiomeGenBase.getBiomeGenArray()[i]);
			EntityRegistry.addSpawn(EntityVoidCrawler.class, 100, 1, 2, EnumCreatureType.monster, BiomeGenBase.getBiomeGenArray()[i]);
        }
    }
}
 
開發者ID:Eternaldoom,項目名稱:Realms-of-Chaos,代碼行數:27,代碼來源:Entities.java

示例8: addSpawn

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
@Override
public void addSpawn() {
    if (spawnType == null) {
        return;
    }

    for (int i = 0; i < biomesToSpawn.size(); i++) {
        if (useGlobalSpawn) {
            if (spawnRate > 0) {
                EntityRegistry.addSpawn(mobClass, spawnRate, minInChunk, maxInChunk, spawnType,
                        biomesToSpawn.get(i).biome);
            }
        } else {
            if (biomesToSpawn.get(i).spawnRate > 0) {
                EntityRegistry.addSpawn(mobClass, biomesToSpawn.get(i).spawnRate, biomesToSpawn.get(i).minInChunk,
                        biomesToSpawn.get(i).maxInChunk, spawnType, biomesToSpawn.get(i).biome);
            }
        }
        if (reportSpawningInLog) {
            ProjectZuluLog.info("Registering %s to biome %s at rates of %s,%s,%s", mobClass.getSimpleName(),
                    biomesToSpawn.get(i).biome.biomeName, biomesToSpawn.get(i).spawnRate,
                    biomesToSpawn.get(i).minInChunk, biomesToSpawn.get(i).maxInChunk);
        }
    }
}
 
開發者ID:soultek101,項目名稱:projectzulu1.7.10-pre-1.3a,代碼行數:26,代碼來源:SpawnableDeclaration.java

示例9: addSpawn

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void addSpawn(Class entityClass, int probability, int min, int max, EnumCreatureType type) {
	for (int i = 0; i < BiomeGenBase.getBiomeGenArray().length; i++) {
		if (BiomeGenBase.getBiomeGenArray()[i] != null) {
			EntityRegistry.addSpawn(entityClass, 1, 0, 1, type, BiomeGenBase.forest);
			EntityRegistry.addSpawn(entityClass, 1, 0, 1, type, BiomeGenBase.birchForest);
			EntityRegistry.addSpawn(entityClass, 1, 0, 1, type, BiomeGenBase.jungle);
	    }
	}
}
 
開發者ID:MAPReiff,項目名稱:MineMania-Rebirth-1.7.10,代碼行數:10,代碼來源:EntityKillerCow.java

示例10: createEntity

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void createEntity(Class entityClass, String entityName, int solidColor, int SpotColor){
	int randomId = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
	EntityRegistry.registerModEntity(entityClass, entityName, randomId, ms.modInstance, 64, 1, true);
	EntityRegistry.addSpawn(entityClass, 5, 2, 9, EnumCreatureType.creature, BiomeGenBase.icePlains);
	EntityRegistry.addSpawn(entityClass, 5, 1, 3, EnumCreatureType.creature, BiomeGenBase.iceMountains);
	//EntityRegistry.addSpawn(entityClass, 1, 1, 5, EnumCreatureType.creature, BiomeGenBase.Biome);
	
	createEgg(randomId, solidColor, SpotColor);
	
}
 
開發者ID:MAPReiff,項目名稱:MineMania-Rebirth-1.7.10,代碼行數:12,代碼來源:EntityPG.java

示例11: createEntity

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void createEntity(Class entityClass, String entityName, int solidColor, int SpotColor){
	int randomId = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
	EntityRegistry.registerModEntity(entityClass, entityName, randomId, ms.modInstance, 64, 1, true);
	EntityRegistry.addSpawn(entityClass, 0, 0, 1, EnumCreatureType.creature, BiomeGenBase.forest);
	
	createEgg(randomId, solidColor, SpotColor);
	
}
 
開發者ID:MAPReiff,項目名稱:MineMania-Rebirth-1.7.10,代碼行數:10,代碼來源:EntityLG.java

示例12: LoadEntitys

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public static void LoadEntitys() {
	

//Santa Registry
    EntityRegistry.registerGlobalEntityID(EntitySanta.class, "EntitySanta",EntityRegistry.findGlobalUniqueEntityId());
    //RenderingRegistry.registerEntityRenderingHandler(EntityCaptianCookie.class, new RenderLiving(new ModelBiped(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("epicproportionsmod:EntityCaptianCookie.png");}});//Sets CaptianCookie Texture
    EntityRegistry.addSpawn(EntitySanta.class, 5, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
 //Santa Registry
    EntityRegistry.registerGlobalEntityID(EntityGingerBreadMan.class, "EntityGingerBreadMan",EntityRegistry.findGlobalUniqueEntityId());
    //RenderingRegistry.registerEntityRenderingHandler(EntityCaptianCookie.class, new RenderLiving(new ModelBiped(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("epicproportionsmod:EntityCaptianCookie.png");}});//Sets CaptianCookie Texture
    EntityRegistry.addSpawn(EntityGingerBreadMan.class, 5, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
  //Christmas Capitan Cookie Registry
    EntityRegistry.registerGlobalEntityID(EntityXmasCaptainCookie.class, "EntityXmasCaptainCookie",EntityRegistry.findGlobalUniqueEntityId());
    //RenderingRegistry.registerEntityRenderingHandler(EntityCaptianCookie.class, new RenderLiving(new ModelBiped(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("epicproportionsmod:EntityCaptianCookie.png");}});//Sets CaptianCookie Texture
    EntityRegistry.addSpawn(EntityXmasCaptainCookie.class, 5, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
  //Christmas Pat Registry
    EntityRegistry.registerGlobalEntityID(EntityXmasPat.class, "EntityXmasPat",EntityRegistry.findGlobalUniqueEntityId());
    //RenderingRegistry.registerEntityRenderingHandler(EntityCaptianCookie.class, new RenderLiving(new ModelBiped(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("epicproportionsmod:EntityCaptianCookie.png");}});//Sets CaptianCookie Texture
    EntityRegistry.addSpawn(EntityXmasPat.class, 5, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);
  //Christmas Jen Registry
    EntityRegistry.registerGlobalEntityID(EntityXmasJen.class, "EntityXmasJen",EntityRegistry.findGlobalUniqueEntityId());
    //RenderingRegistry.registerEntityRenderingHandler(EntityCaptianCookie.class, new RenderLiving(new ModelBiped(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("epicproportionsmod:EntityCaptianCookie.png");}});//Sets CaptianCookie Texture
    EntityRegistry.addSpawn(EntityXmasJen.class, 5, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);

  //Giant SnowBall Registry
    EntityRegistry.registerGlobalEntityID(EntityGiantSnowBall.class, "EntityGiantSnowBall",EntityRegistry.findGlobalUniqueEntityId());
    //RenderingRegistry.registerEntityRenderingHandler(EntityCaptianCookie.class, new RenderLiving(new ModelBiped(), 0){protected ResourceLocation getEntityTexture(Entity par1Entity){return new ResourceLocation("epicproportionsmod:EntityCaptianCookie.png");}});//Sets CaptianCookie Texture
    //EntityRegistry.addSpawn(EntityXmasJen.class, 5, 4, 6, EnumCreatureType.creature, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.mesa, BiomeGenBase.savanna, BiomeGenBase.desert, BiomeGenBase.desertHills);

   	}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:31,代碼來源:EntityLoader.java

示例13: registerMob

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
/**
 * register an entity to the hashmap
 * @param name name that will be used to lookup the entity
 * @param mobClass
 * @param localization {"entity.entityname.name", "en_us", "Ingame Name"}
 */
private static void registerMob(String name, Class mobClass, int id)
{
	EntityRegistry.registerGlobalEntityID(mobClass, name, id);
	LanguageRegistry.instance().addStringLocalization("entity." + name + ".name", "en_US", name);
	Piggalot.proxy.registerNPC(mobClass, new GGPMobsRenderer(new ModelBiped(), 0.4F, name));
	
	EntityRegistry.addSpawn(mobClass, 10, 1, 1, EnumCreatureType.ambient, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.beach);
}
 
開發者ID:mixerrules,項目名稱:piggalot-mod,代碼行數:15,代碼來源:GGPMobs.java

示例14: addMobSpawns

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
private static void addMobSpawns() {
	//Overworld
	/**
	 * Weighted Probability info:
	 * 
	 * CREATURE (day): Cows (8), Pigs (10), Chickens (10), Sheep (12)
	 * MONSTER (night): All 100 except Endermen (10), and Witches (5)
	 * AMBIENT (ambient creatures): Bats (10)
	 * WATER (water, duh): Squids (10)
	 * 
	 * Make sure these balance out; if not balanced, it could cause excess spawning/not spawning
	 * at all, plus crashes.
	 */
	EntityRegistry.addSpawn(EntityCreeperDragon.class, BALANCE.MOBPROP.DRAGON_SPAWN_PROB, 1, 2, EnumCreatureType.creature, 
			BiomeGenBase.plains, BiomeGenBase.forest, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, 
			BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.jungleEdge, BiomeGenBase.jungleHills, 
			BiomeGenBase.roofedForest, BiomeGenBase.desert);
	EntityRegistry.addSpawn(EntityWildFireDragon.class, BALANCE.WILD_FIRE_DRAGON_PROP.SPAWN_PROB, 1, 2, EnumCreatureType.creature, 
			BiomeGenBase.plains, BiomeGenBase.forest, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, 
			BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.jungleEdge, BiomeGenBase.jungleHills, 
			BiomeGenBase.roofedForest, BiomeGenBase.desert);
	
	// TODO: Needs to match guard spawn to the village biomes somehow
	EntityRegistry.addSpawn(EntitySpearGuard.class, BALANCE.MOBPROP.GUARD_SPAWN_PROB, 1, 2, EnumCreatureType.creature, 
			BiomeGenBase.plains, BiomeGenBase.forest, BiomeGenBase.birchForest, BiomeGenBase.birchForestHills, 
			BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.jungleEdge, BiomeGenBase.jungleHills, 
			BiomeGenBase.roofedForest,  BiomeGenBase.mesa, BiomeGenBase.taiga, BiomeGenBase.swampland, 
			BiomeGenBase.mushroomIsland);
	EntityRegistry.addSpawn(EntityKnightGuard.class, BALANCE.MOBPROP.GUARD_SPAWN_PROB, 1, 2, EnumCreatureType.creature, 
			BiomeGenBase.desert, BiomeGenBase.coldTaiga, BiomeGenBase.icePlains, BiomeGenBase.savanna);
	EntityRegistry.addSpawn(EntityLongbowGuard.class, BALANCE.MOBPROP.GUARD_SPAWN_PROB, 1, 2, EnumCreatureType.creature, 
			ModBiomes.biomeTownForest);
	EntityRegistry.addSpawn(EntityCrossbowGuard.class, BALANCE.MOBPROP.GUARD_SPAWN_PROB, 1, 2, EnumCreatureType.creature, 
			ModBiomes.biomeCityPlains);
}
 
開發者ID:DracoAnimus,項目名稱:Coding,代碼行數:36,代碼來源:ModEntities.java

示例15: registerEntities

import cpw.mods.fml.common.registry.EntityRegistry; //導入方法依賴的package包/類
public void registerEntities() {
    EntityRegistry.registerModEntity(EntityFireBall.class, "Fire Ball", 1, DynamicCraft.mod, 64, 10, true);
    EntityRegistry.registerModEntity(EntityAquaBall.class, "Aqua Ball", 2, DynamicCraft.mod, 64, 10, true);

    EntityHandler.registerMobs(EntityFireWizard.class, "fireWizard", 0x990000, 0x0);
    EntityRegistry.addSpawn(EntityFireWizard.class, 3, 0, 1, EnumCreatureType.monster, BiomeGenBase.hell);

    //Tile
    GameRegistry.registerTileEntity(TileEntityInfusionAltar.class, "TileEntityInfusionAltar");
}
 
開發者ID:BRForgers,項目名稱:DynamicCraft,代碼行數:11,代碼來源:CommonProxy.java


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