本文整理汇总了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);
}
示例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()) + ")");
}
示例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);
}
}
}
示例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);
}
示例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);
}
示例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());
}
示例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]);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}