Java 类cpw.mods.fml.common.registry.EntityRegistry 实例源码

项目:PopularMMOS-EpicProportions-Mod    文件:epicproportionsmod_christmas.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
    proxy.init(event);


    ItemLoader.LoadItems();
    BlockLoader.loadBlocks();
    Recipes.registerRecpies();
    EntityLoader.LoadEntitys();
    OreDict.addores();
    Achievements.loadAchievements();
    Stats.RegisterStats();


    EntityRegistry.registerModEntity(EntityGiantSnowBall.class, "GiantSnowBall", EntityRegistry.findGlobalUniqueEntityId(), MODID, 80, 3, true);

    proxy.registerRenderThings();

    GameRegistry.registerTileEntity(TileEntityBulb.class, "Bulb");
    TileEntity.addMapping(TileEntityBulb.class, "Bulb_Mapping");
    BulbModelID = 72;

    }
项目:Uranium    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:connor41-etfuturum2    文件:ModEntityList.java   
private static void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates, int eggColour1, int eggColour2, boolean hasEgg) {
    EntityRegistry.registerModEntity(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates);

    if (id >= array.length) {
        EntityData[] newArray = new EntityData[id + 5];
        for (int i = 0; i < array.length; i++)
            newArray[i] = array[i];
        array = newArray;
    }
    if (array[id] != null)
        throw new IllegalArgumentException("ID " + id + " is already being used! Please report this error!");
    else {
        array[id] = new EntityData(entityName, id, eggColour1, eggColour2, hasEgg);
        map.put(id, entityClass);
    }
}
项目:TFCPrimitiveTech    文件:ModCommonProxy.java   
public void registerTileEntities(boolean flag)
    {
        // non TESR registers
        registerCommonTileEntities();
        if (TFCPrimitiveTech.instance.isSlingshotEnabled)
        {
            EntityRegistry.registerModEntity(EntityProjectileSharpStone.class, "itemSharpStone", 1, TFCPrimitiveTech.instance, 64, 5, true);
            EntityRegistry.registerModEntity(EntityProjectileHardStone.class, "itemHardStone", 1, TFCPrimitiveTech.instance, 64, 5, true);
            EntityRegistry.registerModEntity(EntityProjectileSoftStone.class, "itemSoftStone", 1, TFCPrimitiveTech.instance, 64, 5, true);
            EntityRegistry.registerGlobalEntityID(EntityProjectileStone.class, "SlingshotStone", EntityRegistry.findGlobalUniqueEntityId());
        }
        if (flag)
        {
//          GameRegistry.registerTileEntity(TileEntityBurlapSack.class, "Sack");
            // TESR registers
        }
    }
项目:ThermosRebased    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:PopularMMOS-EpicProportions-Mod    文件:EntityLoader.java   
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);

    }
项目:Thermos    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:KCauldron    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:CauldronGit    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:Cauldron-Old    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:Cauldron-Reloaded    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:SteelSheep    文件:SSEntityRegistry.java   
@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()) + ")");

}
项目:FFoKC    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:vsminecraft    文件:Mekanism.java   
/**
 * Adds and registers all entities and tile entities.
 */
public void addEntities()
{
    //Registrations
    EntityRegistry.registerModEntity(EntityObsidianTNT.class, "ObsidianTNT", 0, this, 64, 5, true);
    EntityRegistry.registerModEntity(EntityRobit.class, "Robit", 1, this, 64, 2, true);
    EntityRegistry.registerModEntity(EntityBalloon.class, "Balloon", 2, this, 64, 1, true);
    EntityRegistry.registerModEntity(EntityBabySkeleton.class, "BabySkeleton", 3, this, 64, 5, true);
    EntityRegistry.registerModEntity(EntityFlame.class, "Flame", 4, this, 64, 5, true);

    //Tile entities
    GameRegistry.registerTileEntity(TileEntityBoundingBlock.class, "BoundingBlock");
    GameRegistry.registerTileEntity(TileEntityAdvancedBoundingBlock.class, "AdvancedBoundingBlock");
    GameRegistry.registerTileEntity(TileEntityCardboardBox.class, "CardboardBox");
    GameRegistry.registerTileEntity(TileEntitySolarEvaporationValve.class, "SalinationValve");
    GameRegistry.registerTileEntity(TileEntitySolarEvaporationBlock.class, "SalinationTank");
    GameRegistry.registerTileEntity(TileEntityEntangledBlock.class, "EntangledBlock");
    GameRegistry.registerTileEntity(TileEntityBoiler.class, "SteamBoiler");
    GameRegistry.registerTileEntity(TileEntityBoilerValve.class, "BoilerValve");

    //Load tile entities that have special renderers.
    proxy.registerSpecialTileEntities();
}
项目:Et-Futurum    文件:ModEntityList.java   
private static void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates, int eggColour1, int eggColour2, boolean hasEgg) {
    EntityRegistry.registerModEntity(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates);

    if (id >= array.length) {
        EntityData[] newArray = new EntityData[id + 5];
        for (int i = 0; i < array.length; i++)
            newArray[i] = array[i];
        array = newArray;
    }
    if (array[id] != null)
        throw new IllegalArgumentException("ID " + id + " is already being used! Please report this error!");
    else {
        array[id] = new EntityData(entityName, id, eggColour1, eggColour2, hasEgg);
        map.put(id, entityClass);
    }
}
项目:Koushin-General-Mod    文件:KoushinCore.java   
@EventHandler
public void init(FMLInitializationEvent event) {

    // 諸Entity
    EntityRegistry.registerModEntity(EntityLawyer.class, "Lawyer", 200,
            this, 80, 1, true);
    EntityRegistry.registerModEntity(Entity6Char.class, "6char", 201, this,
            128, 5, true);

    // 諸Recipe
    GameRegistry.addShapelessRecipe(new ItemStack(item6Char),
            Items.cooked_chicken,// 唐揚げ
            Items.fish,// 沢蟹
            Items.baked_potato,// コロッケ
            Items.cooked_porkchop// 酢豚
            );
    proxy.init(event);

}
项目:SecureCraftProtect    文件:SCPEntity.java   
public static void init() {
    registerSCP(EntitySCP0015.class, "scp:0015",
            EntityRegistry.findGlobalUniqueEntityId(),
            0x000000, 0x000000, 1);
    registerSCP(EntitySCP0015Projectile.class, "scp:0015-p",
            EntityRegistry.findGlobalUniqueEntityId(),
            -1, -1, -1);
    registerSCP(EntitySCP0023.class, "scp:0023",
            EntityRegistry.findGlobalUniqueEntityId(),
            0x000000, 0x000000, 1);
    registerSCP(EntitySCP0131.class, "scp:0131",
            EntityRegistry.findGlobalUniqueEntityId(),
            0xFF0000, 0xFFFF00, 0);
    registerSCP(EntitySCP0173.class, "scp:0173",
            EntityRegistry.findGlobalUniqueEntityId(),
            0xFEF2BF, 0x2BC600, 1);
    registerSCP(EntityClassDMale.class, "scp:classd_male",
            EntityRegistry.findGlobalUniqueEntityId(),
            0xFF6600, 0x000000, -1);
}
项目:MineFantasy    文件:EntitylistMF.java   
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);
        }
    }
}
项目:MineFantasy    文件:EntitylistMF.java   
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeDictionary.Type type)
{
    for (BiomeGenBase biome : BiomeGenBase.biomeList)
    {
        if(biome != null)
        {
            if(BiomeDictionary.isBiomeRegistered(biome))
            {
                if(BiomeDictionary.isBiomeOfType(biome, type))
                {
                    EntityRegistry.addSpawn(entityClass, weightedProb, min, max, typeOfCreature, biome);
                }
            }
        }
    }
}
项目:Carnival    文件:ModEntities.java   
public static void init()
{
    LogHelper.debug(ConfigurationHandler.enableCarnivalClowns);
    if(ConfigurationHandler.enableCarnivalClowns == true) {
        EntityRegistry.registerModEntity(EntityCarnivalClown.class, "carnival_clown", 1, Reference.MOD_ID, 80, 3, true);
        RenderingRegistry.registerEntityRenderingHandler(EntityCarnivalClown.class, new RenderClown(new ModelCarnivalClown(), 0.5F));
        EntityRegistry.addSpawn(EntityCarnivalClown.class, 10, 1, 2, EnumCreatureType.creature, BiomeGenBase.plains);
        ModelCarnivalClown.registerEntityEgg(EntityCarnivalClown.class, 0xffffff, 0xff0000);
        LanguageRegistry.instance().addStringLocalization("entity.Carnival.carnival_clown.name", "en_US", "Carnival Clown");
    }

    //Temporarily removed while i think of a way to fix it
    /*EntityRegistry.registerModEntity(EntityDethknight.class, "dethknight", 2, Reference.MOD_ID, 80, 3, true);
    RenderingRegistry.registerEntityRenderingHandler(EntityDethknight.class, new RenderDethknight(new ModelDethknight(), 0.5F));
    EntityRegistry.addSpawn(EntityDethknight.class, 10, 1, 2, EnumCreatureType.creature, BiomeGenBase.plains);
    ModelCarnivalClown.registerEntityEgg(EntityDethknight.class, 0x000000, 0xff0000);
    LanguageRegistry.instance().addStringLocalization("entity.Carnival.dethknight.name", "en_US", "Dethknight");*/
}
项目:Magicians-Artifice    文件:MAEntityRegistry.java   
public static void init() {
    EntityRegistry.registerModEntity(EntityMagician.class, "entityMagician", mageID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntitySoulFragment.class, "entitySoul", soulID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityBossOverworld.class, "bossOverworld", overworldBossID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityBossNether.class, "bossNether", netherBossID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityBossEnder.class, "bossEnder", enderBossID, MagiciansArtifice.instance, 80, 3, true);
       //EntityRegistry.registerModEntity(EntityPetPheonix.class, "petPheonix", pheonixID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityPetAppling.class, "petAppling", applingID, MagiciansArtifice.instance, 80, 3, true);
       EntityRegistry.registerModEntity(EntityPetDragon.class, "petDragon", dragonID, MagiciansArtifice.instance, 80, 3, true);
       //EntityRegistry.registerModEntity(EntityPetRat.class, "petRat", ratID, MagiciansArtifice.instance, 80, 3, true);

       BlockDispenser.dispenseBehaviorRegistry.putObject(ItemRegistry.horcrux, new DispenserSoulBehavior());

    registerEntityEgg(EntityMagician.class, 0x000349, 0xFFE343);
       registerEntityEgg(EntityBossOverworld.class, 0xBBF2FF, 0xFFFFFF);
       registerEntityEgg(EntityBossNether.class, 0xDA0000, 0x3B0000);
       registerEntityEgg(EntityBossEnder.class, 0x3C0059, 0x2B0C36);
       registerEntityEgg(EntityPetAppling.class, 0xDE0101, 0xFFC8C8);
       registerEntityEgg(EntityPetDragon.class, 0xDE0101, 0xFFC8C8);
    registerVillagers();
}
项目:Rubedo    文件:ContentSpells.java   
@Override
public void registerBase() {
    super.registerBase();

    this.initializeSpellMaterials();

    EntityRegistry.registerModEntity(EntitySpellProjectile.class,
            "SpellProjectile", cpw.mods.fml.common.registry.EntityRegistry
                    .findGlobalUniqueEntityId(), RubedoCore.instance, 64,
            1, true);

    for (MaterialMultiItem material : this.getMaterials()) {
        if (material.baseMaterial != null) {
            String name = "base_" + material.name;
            Item item = ItemSpellBase.getBaseMap().get(name);
            GameRegistry.registerItem(item, name);
        }
    }
}
项目:PixelUtilities    文件:Basemod.java   
@EventHandler
public void preInit(FMLPreInitializationEvent event) {

    try {
        if (Class.forName("com.pixelmonmod.pixelmon.Pixelmon") != null)
            pixelmonPresent = true;
    } catch (ClassNotFoundException e) {
        FMLLog.warning("Pixelmon mod not found, pixelmon functions disabled.");
    }

    AddMeta(event);
    config = PixelUtilitysConfig.getInstance();
    config.setEvent(event);
    PixelUtilitysAchievements.setupAchievements();

    EntityRegistry.registerModEntity(SeatEntity.class, "Seat", 0, this, 3, 1, false);
}
项目:RuneCraftery    文件:EntitySpawnPacket.java   
@Override
public void execute(INetworkManager network, FMLNetworkHandler handler, NetHandler netHandler, String userName)
{
    NetworkModHandler nmh = handler.findNetworkModHandler(networkId);
    ModContainer mc = nmh.getContainer();

    EntityRegistration registration = EntityRegistry.instance().lookupModSpawn(mc, modEntityId);
    if (registration == null || registration.getEntityClass() == null)
    {
        FMLLog.log(Level.WARNING, "Missing mod entity information for %s : %d", mc.getModId(), modEntityId);
        return;
    }


    Entity entity = FMLCommonHandler.instance().spawnEntityIntoClientWorld(registration, this);
}
项目:MinExtension    文件:EntityHandler.java   
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());
}
项目:ModTutoriel17    文件:ModTutoriel.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    EntityRegistry.registerGlobalEntityID(EntityMobTutoriel.class, "mobTutoriel", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 0, 255).getRGB(), new Color(255, 0, 0).getRGB());
    EntityRegistry.registerModEntity(EntityMobTutoriel.class, "mobTutoriel", 420, this.instance, 40, 2, true);

    GameRegistry.registerTileEntity(TileEntityTutoriel.class, "modtutoriel:tutoriel");
    GameRegistry.registerTileEntity(TileEntityDirectional.class, "modtutoriel:directional");
    GameRegistry.registerTileEntity(TileEntityMachineTuto.class, "modTutoriel:MachineTutoTileEntity");

    MinecraftForge.EVENT_BUS.register(new LivingEventHandler());
    MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
    FMLCommonHandler.instance().bus().register(new PlayerEventHandler());
    MinecraftForge.EVENT_BUS.register(new PlayerEventHandler());
    proxy.registerRender();
    proxy.registerKeyBinding();

    NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandlerTuto());
}
项目:Cauldron    文件:CraftWorld.java   
public Entity spawnEntity(Location loc, EntityType entityType) {
    // Cauldron start - handle custom entity spawns from plugins
    if (EntityRegistry.entityClassMap.get(entityType.getName()) != null)
    {
        net.minecraft.entity.Entity entity = null;
        entity = getEntity(EntityRegistry.entityClassMap.get(entityType.getName()), world);
        if (entity != null)
        {
            entity.setLocationAndAngles(loc.getX(), loc.getY(), loc.getZ(), 0, 0);
            world.addEntity(entity, SpawnReason.CUSTOM);
            return entity.getBukkitEntity();
        }
    }
    // Cauldron end
    return spawn(loc, entityType.getEntityClass());
}
项目:Uranium    文件:CraftLivingEntity.java   
public CraftLivingEntity(final CraftServer server, final net.minecraft.entity.EntityLivingBase entity) {
    super(server, entity);
    // Cauldron start
    this.entityClass = entity.getClass();
    this.entityName = EntityRegistry.getCustomEntityTypeName(entityClass);
    if (entityName == null)
        entityName = entity.getCommandSenderName();
    // Cauldron end

    if (entity instanceof net.minecraft.entity.EntityLiving) {
        equipment = new CraftEntityEquipment(this);
    }
}
项目:Uranium    文件:CraftCustomEntity.java   
public CraftCustomEntity(CraftServer server, net.minecraft.entity.Entity entity) {
    super(server, entity);
    this.entityClass = entity.getClass();
    this.entityName = EntityRegistry.getCustomEntityTypeName(entityClass);
    if (entityName == null)
        entityName = entity.getCommandSenderName();
}
项目:ExtraAcC    文件:MyRegistry.java   
private void registerEntities(Object ModObject) {
    //System.out.println("Register my entity");
    int modID = 1;
    EntityRegistry.registerModEntity(EntityBasicAirGun.class, "basic_air_gun", modID++, ModObject, 128, 1, true);
    EntityRegistry.registerModEntity(EntityWindBlade.class, "wind_blade", modID++, ModObject, 128, 1, true);
    EntityRegistry.registerModEntity(EntityExplosiveAirGun.class, "explosive_air_gun", modID++, ModObject, 128, 1, true);
    EntityRegistry.registerModEntity(EntityUpdraft.class, "updraft", modID++, ModObject, 128, 1, true);
    EntityRegistry.registerModEntity(EntitySand.class, "sand", modID++, ModObject, 128, 1, true);
    EntityRegistry.registerModEntity(EntityTurbulentStorm.class, "turbulent_storm", modID++, ModObject, 128, 1, true);

}
项目:minecraft-quiverbow    文件:Main.java   
private void addProjectile(Class<? extends Entity> entityClass, boolean hasRenderer, String name)
{
    EntityRegistry.registerModEntity(entityClass, "projectilechevsky_" + name, projectileCount, this, 80, 1, true);

    if (hasRenderer) { proxy.registerProjectileRenderer(entityClass); } // Entity-specific renderer

    projectileCount += 1;
}
项目:MineMania-Rebirth-1.7.10    文件:EntityKillerCow.java   
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);
        }
    }
}
项目:MineMania-Rebirth-1.7.10    文件:EntityPG.java   
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);

}
项目:MineMania-Rebirth-1.7.10    文件:EntityLG.java   
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);

}
项目:MineMania-Rebirth-1.7.10    文件:EntityCC.java   
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);

}
项目:4Space-5    文件:MarsModule.java   
public static void registerGalacticraftNonMobEntity(Class<? extends Entity> var0, String var1, int trackingDistance, int updateFreq, boolean sendVel)
  {
    if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
{
        LanguageRegistry.instance().addStringLocalization("entity.GalacticraftMars." + var1 + ".name", GCCoreUtil.translate("entity." + var1 + ".name"));
}
    EntityRegistry.registerModEntity(var0, var1, GCCoreUtil.nextInternalID(), GalacticraftPlanets.instance, trackingDistance, updateFreq, sendVel);
  }
项目:4Space-5    文件:GCCoreUtil.java   
public static void registerGalacticraftNonMobEntity(Class<? extends Entity> var0, String var1, int trackingDistance, int updateFreq, boolean sendVel)
  {
    if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
{
        LanguageRegistry.instance().addStringLocalization("entity.GalacticraftCore." + var1 + ".name", GCCoreUtil.translate("entity." + var1 + ".name"));
}
      EntityRegistry.registerModEntity(var0, var1, nextInternalID(), GalacticraftCore.instance, trackingDistance, updateFreq, sendVel);
  }
项目:4Space-5    文件:SpaceEntityUtil.java   
/**
 * Registers a space creature.
 * 
 * @param var0
 * @param var1
 * @param back
 * @param fore
 */
public static void registerSpaceCreature(Class<? extends Entity> var0, String var1, int back, int fore) {
    if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
        LanguageRegistry.instance().addStringLocalization("entity." + var1 + ".name", SpaceTranslate.translate("entity.spaceCore." + var1 + ".name"));
    }

    int newID = EntityRegistry.instance().findGlobalUniqueEntityId();
    EntityRegistry.registerGlobalEntityID(var0, var1, newID, back, fore);
    EntityRegistry.registerModEntity(var0, var1, nextInternalID(), SpaceCore.instance, 80, 3, true);
}
项目:TRHS_Club_Mod_2016    文件:FMLNetworkHandler.java   
public static Packet getEntitySpawningPacket(Entity entity)
{
    EntityRegistration er = EntityRegistry.instance().lookupModSpawn(entity.getClass(), false);
    if (er == null)
    {
        return null;
    }
    if (er.usesVanillaSpawning())
    {
        return null;
    }

    return channelPair.get(Side.SERVER).generatePacketFrom(new FMLMessage.EntitySpawnMessage(er, entity, er.getContainer()));
}
项目:ThermosRebased    文件:CraftLivingEntity.java   
public CraftLivingEntity(final CraftServer server, final net.minecraft.entity.EntityLivingBase entity) {
    super(server, entity);
    // Cauldron start
    this.entityClass = entity.getClass();
    this.entityName = EntityRegistry.getCustomEntityTypeName(entityClass);
    if (entityName == null)
        entityName = entity.getCommandSenderName();
    // Cauldron end

    if (entity instanceof net.minecraft.entity.EntityLiving) {
        equipment = new CraftEntityEquipment(this);
    }
}