Java 类net.minecraftforge.fml.common.registry.EntityRegistry 实例源码

项目:pnc-repressurized    文件:ClientProxy.java   
@Override
public void init() {
    for (Fluid fluid : Fluids.FLUIDS) {
        ModelLoader.setBucketModelDefinition(Fluids.getBucket(fluid));
    }

    ThirdPartyManager.instance().clientInit();

    RenderingRegistry.registerEntityRenderingHandler(EntityRing.class, RenderEntityRing.FACTORY);
    EntityRegistry.registerModEntity(RL("ring"), EntityRing.class, Names.MOD_ID + ".ring", 100, PneumaticCraftRepressurized.instance, 80, 1, true);

    registerModuleRenderers();

    Blockss.setupColorHandlers();
    BlockColorHandler.registerColorHandlers();
    ItemColorHandler.registerColorHandlers();

    super.init();
}
项目:ProgressiveDifficulty    文件:SpecificMobKilledControl.java   
@Override
public int getChangeForSpawn(SpawnEventDetails details) {

    EntityList.EntityEggInfo eggInfo = EntityRegistry.getEntry(details.entity.getClass()).getEgg();
    if(eggInfo==null) {
        if(DifficultyManager.debugLogSpawns){
            LOG.info("Tried to get kills for mob with class "+details.entity.getClass()+", but not spawn egg found.  Cannot count kills for this mob for difficulty.");
        }
        return 0;
    }
    StatBase stat = eggInfo.killEntityStat;
    int killedMobs = PlayerAreaStatAccumulator.getStatForPlayersInArea(type,stat,details.entity,128);

    int contribution = (int)(((double)killedMobs * difficultyPerHundredKills) / 100);

    if(maxAddedDifficulty>=0){
        contribution = Math.min(contribution,maxAddedDifficulty);
    }

    return contribution;
}
项目:Infernum    文件:InfernumEntities.java   
public static void init() {
    int id = 0;
    EntityRegistry.registerModEntity(new ResourceLocation(Infernum.MODID + ":withering_bolt"), EntityWitheringBolt.class, "withering_bolt", id++, Infernum.instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(Infernum.MODID + ":zombie_pigman_mage"), EntityPigZombieMage.class, "zombie_pigman_mage", id++, Infernum.instance, 64, 1, true);
    EntityRegistry.registerEgg(new ResourceLocation(Infernum.MODID + ":zombie_pigman_mage"), 14581128, 11799808);
    EntityRegistry.registerModEntity(new ResourceLocation(Infernum.MODID + ":pigman_mage"), EntityPigMage.class, "pigman_mage", id++, Infernum.instance, 64, 1, true);
    EntityRegistry.registerEgg(new ResourceLocation(Infernum.MODID + ":pigman_mage"), 14581128, 11665527);
    EntityRegistry.registerModEntity(new ResourceLocation(Infernum.MODID + ":fire_breath"), EntityFireBreath.class, "fire_breath", id++, Infernum.instance, 64, 1, true);

    List<Biome> spawnBiomes = new ArrayList<Biome>();
    spawnBiomes.addAll(BiomeDictionary.getBiomes(BiomeDictionary.Type.NETHER));
    spawnBiomes.add(Biomes.HELL);
    for (Biome b : spawnBiomes) {
        System.out.println(b.getBiomeName());
    }
    EntityRegistry.addSpawn(EntityPigZombieMage.class, 150, 1, 2, EnumCreatureType.MONSTER, spawnBiomes.toArray(new Biome[spawnBiomes.size()]));
}
项目:BetterThanWeagles    文件:ModEntities.java   
public static void init()
{
    // Register mod entities
    int entityId = 1;
    EntityRegistry.registerModEntity(new ResourceLocation("btweagles:stevebeej"), EntitySteveBeej.class, "SteveBeej", entityId++, BetterThanWeagles.instance, 64, 3, true, 0xD1A288, 0x00CCCC);

    // Set up spawn criteria
    Set<Biome> validBiomes = new HashSet<>();

    validBiomes.addAll(BiomeDictionary.getBiomes(BiomeDictionary.Type.PLAINS));
    validBiomes.addAll(BiomeDictionary.getBiomes(BiomeDictionary.Type.FOREST));
    validBiomes.addAll(BiomeDictionary.getBiomes(BiomeDictionary.Type.HILLS));
    validBiomes.addAll(BiomeDictionary.getBiomes(BiomeDictionary.Type.SWAMP));

    validBiomes.removeAll(BiomeDictionary.getBiomes(BiomeDictionary.Type.NETHER));
    validBiomes.removeAll(BiomeDictionary.getBiomes(BiomeDictionary.Type.END));

    EntityRegistry.addSpawn(EntitySteveBeej.class, 10, 1, 1, EnumCreatureType.MONSTER, validBiomes.toArray(new Biome[validBiomes.size()]));

    // Register entity loot tables
    LootTableList.register(EntitySteveBeej.LOOT_TABLE);
}
项目:Melodium    文件:RegistryManager.java   
public static void registerAll() {

    SongRegistry.addSong(SoundType.AMBIENT, horse = new SongHorse("horse"));
    SongRegistry.addSong(SoundType.AMBIENT, hunt = new SongHunt("hunt"));
    SongRegistry.addSong(SoundType.AMBIENT, calm = new SongCalm("calm"));
    SongRegistry.addSong(SoundType.AMBIENT, invisible = new SongInvisible("invisible"));

    items.add(lyre = new ItemBase("lyre", true));
    items.add(flute = new ItemBase("flute", true));
    items.add(drum = new ItemBase("drum", true));
    items.add(bell = new ItemTempSpellCaster("bell", true));
    items.add(composition_paper = new ItemCompositionPaper("composition_paper", true));

    SongRegistry.addSong(SoundType.NEUTRAL, horse = new SongHorse("horse"));
    EntityRegistry.registerModEntity(new ResourceLocation(Melodium.MODID + ":ghost_horse"), 
            EntityGhostHorse.class, "ghost_horse", 0, Melodium.instance, 80, 3, true);
}
项目:metamorph    文件:CommonProxy.java   
public void preLoad(FMLPreInitializationEvent event)
{
    /* Network messages */
    Dispatcher.register();

    /* Attaching model manager and morph factories to the morph manager */
    MorphManager.INSTANCE.models = this.models;
    MorphManager.INSTANCE.factories.add(new MobMorphFactory());
    MorphManager.INSTANCE.factories.add(new PlayerMorphFactory());

    /* Configuration */
    File config = new File(event.getModConfigurationDirectory(), "metamorph/config.cfg");
    File morphs = new File(event.getModConfigurationDirectory(), "metamorph/morphs.json");
    File blacklist = new File(event.getModConfigurationDirectory(), "metamorph/blacklist.json");

    this.forge = new Configuration(config);
    this.config = new MetamorphConfig(this.forge);
    this.morphs = morphs;
    this.blacklist = blacklist;

    /* Entities */
    EntityRegistry.registerModEntity(EntityMorph.class, "Morph", 0, Metamorph.instance, 64, 3, false);
}
项目:Count-Armours    文件:AOTA.java   
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    logger = event.getModLog();
    PacketDispatcher.registerPackets();
    ModItems.init();
    ModItems.register();
    ModTools.init();
    ModTools.register();
    ModArmour.init();
    ModArmour.register();
    AOTATradeRegistry.init();

    NetworkRegistry.INSTANCE.registerGuiHandler(this, new AOTAGuiHandler());

    int eid = -1;
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MODID + ":fairy"), EntityFairy.class, "fairy", ++eid, instance, 32, 2, false, 12564905, 9413987);

    proxy.registerRenders();
}
项目:Engination    文件:Engination.java   
@EventHandler
public void onPreInit(FMLPreInitializationEvent e) {
    LOG = LogManager.getLogger(Engination.MODID);
    File config = e.getSuggestedConfigurationFile();
    CONFIG = new Configuration(config);

    BlockDisappearing.DELAY_REAPPEAR = CONFIG.getInt(
            "delay-reappear", "block.disappearing",
            BlockDisappearing.DELAY_REAPPEAR, 1, 900,
            "The time it takes for a disappearing block to reappear");

    BlockDisappearing.DISAPPEAR_CHAIN_MAX = CONFIG.getInt(
            "chain-max", "block.disappearing",
            BlockDisappearing.DISAPPEAR_CHAIN_MAX, 1, 900,
            "The maximum number of blocks that will disappear together in a group");

    ENABLE_RECIPES_COSMETIC = CONFIG.getBoolean("enable-cosmetic", "recipe", ENABLE_RECIPES_COSMETIC, "If enabled, this registers recipes for cosmetic blocks");

    CONFIG.save();

    EntityRegistry.registerModEntity(new ResourceLocation("engination", "tomato"), EntityTomato.class, "tomato", 0, this, 80, 3, true);

    MinecraftForge.EVENT_BUS.register(this);
    proxy.preInit();
}
项目:DungeonDimension    文件:DungeonDimension.java   
@EventHandler
public void preinit(FMLPreInitializationEvent e){
    corruption = new CorruptionBlock();
    creativetp = new ItemCreativeTP();
    monumentteleporter = new MonumentTeleporterBlock(false);
    monumentteleporterbroken = new MonumentTeleporterBlock(true);
    corruptionslime = new ItemCorruptionSlime();
    GameRegistry.registerBlock(corruption, "corruptionblock");
    GameRegistry.registerBlock(monumentteleporter, "monumentteleporter");
    GameRegistry.registerBlock(monumentteleporterbroken, "monumentteleporterbroken");
    GameRegistry.registerItem(creativetp, "creativetp");
    GameRegistry.registerItem(corruptionslime, "corruptionslime");
    GameRegistry.registerTileEntity(TileEntityMonumentTeleporter.class, "TileEntityMonumentTeleporter");
    EntityRegistry.registerModEntity(EntityCorruptedSlime.class, "dd_throwable_slime", 0, "dungeondimension", 128, 1, true);
    proxy.preInit();
}
项目:Fallout_Equestria    文件:CommonProxy.java   
public void preInit() {
    System.out.println("FOE Initiating");
    System.out.println("WAR...");
    System.out.println("WAR NEVER CHANGES...");
    StartUpCommon.preInitCommon();
    // INIT Handler
    MinecraftForge.EVENT_BUS.register(new EventHandlerPre());
    MinecraftForge.EVENT_BUS.register(new UpdateEvents());
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/bullet"), EntityBullet.class, "Bullet", 0, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/laser"), EntityLaser.class, "laser", 1, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Flame"), EntityFlame.class, "Flame", 2, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Pellet"), Pellet.class, "Pellet", 3, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Pellet_one"), Pellet_one.class, "Pellet_one", 4, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Pellet_two"), Pellet_two.class, "Pellet_two", 5, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Pellet_tree"), Pellet_tree.class, "Pellet_tree", 6, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Pellet_four"), Pellet_four.class, "Pellet_four", 7, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Pellet_five"), Pellet_five.class, "Pellet_five", 8, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Pellet_six"), Pellet_six.class, "Pellet_six", 9, main.instance, 64, 10, true);
    EntityRegistry.registerModEntity(new ResourceLocation(GlobalNames.Domain + ":entity/Flare"), EntityFlare.class, "Flare", 10, main.instance, 64, 10, true);
}
项目:Survivalist    文件:Survivalist.java   
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
    int entityId = 1;
    EntityRegistry.registerModEntity(location("thrown_rock"), EntityRock.class, "ThrownRock", entityId++, this, 80, 3, true);
    logger.debug("Last used id: %i", entityId);


    NetworkRegistry.INSTANCE.registerGuiHandler(this, guiHandler);

    addSmeltingNugget(rock_ore.getStack(OreMaterial.IRON), "nuggetIron");
    addSmeltingNugget(rock_ore.getStack(OreMaterial.GOLD), "nuggetGold");
    addSmeltingNugget(rock_ore.getStack(OreMaterial.COPPER), "nuggetCopper");
    addSmeltingNugget(rock_ore.getStack(OreMaterial.TIN), "nuggetTin");
    addSmeltingNugget(rock_ore.getStack(OreMaterial.LEAD), "nuggetLead");
    addSmeltingNugget(rock_ore.getStack(OreMaterial.SILVER), "nuggetSilver");

    GameRegistry.addSmelting(dough, new ItemStack(round_bread), 0);
}
项目:Factorization    文件:RegistrationViewer.java   
@Override
public void process(ITypesetter out, String arg) throws TruthError {
    if (arg.equalsIgnoreCase("entity")) {
        BiMap<Class<? extends Entity>, EntityRegistry.EntityRegistration> registrationMap;
        registrationMap = ReflectionHelper.getPrivateValue(EntityRegistry.class, EntityRegistry.instance(), "entityClassRegistrations");
        for (EntityRegistry.EntityRegistration reg : registrationMap.values()) {
            out.write("\\u{" + reg.getEntityName() + "}");
            out.write("\\nlRegistered by: " + reg.getContainer().getDisplayVersion());
            out.write("\\nTracking range: " + reg.getTrackingRange());
            out.write("\\nlLocation sync frequency: " + reg.getUpdateFrequency());
            out.write("\\nlSends velocity updates: " + reg.sendsVelocityUpdates());
            out.write("\\nl");
        }
    } else if (arg.equalsIgnoreCase("tileentity")) {
        //See: GameRegistry.registerTileEntity();
        out.write("TODO: too lazy to add an AT just for this...");
    } else {
        for (String s : new String[] {
                "entity",
                "tileentity"
        }) {
            out.write("\\{cgi/registry/" + s + "}{" + s +"}\n\n");
        }
    }
}
项目:LightningCraft    文件:LCEntities.java   
private static void registerEntities() {
    // living
    modEntityID = 0;
    EntityRegistry.registerModEntity(EntityLCZombie.class, "helperZombie", ++modEntityID, LightningCraft.modInstance, 80, 3, true);
    EntityRegistry.registerModEntity(EntityDemonSoldier.class, "demonSoldier", ++modEntityID, LightningCraft.modInstance, 80, 3, true);
    EntityRegistry.registerModEntity(EntityUnderworldSlime.class, "underworldSlime", ++modEntityID, LightningCraft.modInstance, 80, 3, true);
    EntityRegistry.registerModEntity(EntityUnderworldSkeleton.class, "underworldSkeleton", ++modEntityID, LightningCraft.modInstance, 80, 3, true);
    EntityRegistry.registerModEntity(EntityUnderworldSilverfish.class, "underworldSilverfish", ++modEntityID, LightningCraft.modInstance, 80, 3, true);
    EntityRegistry.registerModEntity(EntityUnderworldGhast.class, "underworldGhast", ++modEntityID, LightningCraft.modInstance, 80, 3, true);
    EntityRegistry.registerModEntity(EntityUnderworldCreeper.class, "underworldCreeper", ++modEntityID, LightningCraft.modInstance, 80, 3, true);

    // non-living
    modEntityID = 100;
    EntityRegistry.registerModEntity(EntityLCTNTPrimed.class, "lcTNTPrimed", ++modEntityID, LightningCraft.modInstance, 160, 3, true);
    EntityRegistry.registerModEntity(EntityLCElectricAttack.class, "lcElectricAttack", ++modEntityID, LightningCraft.modInstance, 160, 3, true);
}
项目:MrCrayfishSkateboardingMod    文件:MrCrayfishSkateboardingMod.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    proxy.registerRenders();

    EntityRegistry.registerModEntity(EntitySkateboard.class, "csmSkateboard", 0, this, 64, 1, false);

    GameRegistry.registerTileEntity(TileEntitySlope.class, Reference.MOD_ID + "TileEntitySlope");
    GameRegistry.registerTileEntity(TileEntityCornerSlope.class, Reference.MOD_ID + "TileEntityCornerSlope");
    GameRegistry.registerTileEntity(TileEntityStair.class, Reference.MOD_ID + "TileEntityStair");

    if (event.getSide() == Side.CLIENT)
    {
        FMLCommonHandler.instance().bus().register(new SkateboardInput());
        FMLCommonHandler.instance().bus().register(new ComboOverlay());
    }
}
项目:TFC2    文件:CommonProxy.java   
protected void registerEntities() 
{
    DataSerializersTFC.register();
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"cart"), EntityCart.class, "cart", 0, TFC.instance, 80, 3, true, 0x000000, 0x00ff00);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bear"), EntityBear.class, "bear", 1, TFC.instance, 80, 3, true, 0x000000, 0xff0000);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bearpanda"), EntityBearPanda.class, "bearpanda", 2, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"lion"), EntityLion.class, "lion", 3, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"tiger"), EntityTiger.class, "tiger", 4, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"rhino"), EntityRhino.class, "rhino", 5, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"elephant"), EntityElephant.class, "elephant", 6, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"mammoth"), EntityMammoth.class, "mammoth", 7, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"boar"), EntityBoar.class, "boar", 8, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bison"), EntityBison.class, "bison", 9, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxred"), EntityFoxRed.class, "foxred", 10, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxarctic"), EntityFoxArctic.class, "foxarctic", 11, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxdesert"), EntityFoxDesert.class, "foxdesert", 12, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"hippo"), EntityHippo.class, "hippo", 13, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bigcat"), EntityBigCat.class, "bigcat", 14, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"sabertooth"), EntitySabertooth.class, "sabertooth", 15, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"elk"), EntityElk.class, "elk", 16, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
}
项目:TechStack-s-HeavyMachineryMod    文件:ModEntities.java   
public static void init(Object mod) {
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "drillingrig"), EntityDrillingRig.class, "drillingrig", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "bulldozer"), EntityBulldozer.class, "bulldozer", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "dumptruck"), EntityDumpTruck.class, "dumptruck", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "loader"), EntityLoader.class, "loader", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "tractor"), EntityTractor.class, "tractor", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "combine"), EntityCombine.class, "combine", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "widebedtruck"), EntitySemiTractor.class, "widebedtruck", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "crane"), EntityCrane.class, "crane", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "excavator"), EntityExcavator.class, "excavator", ++entityID, mod, 224, 1, false);

    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "paver"), EntityPaver.class, "paver", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "lawnmower"), EntityLawnmower.class, "lawnmower", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "grader"), EntityGrader.class, "grader", ++entityID, mod, 224, 1, false);

    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "bagger"), EntityBagger.class, "bagger", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "roadroller"), EntityRoadRoller.class, "roadroller", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "oilrig"), EntityOilRig.class, "oilrig", ++entityID, mod, 224, 1, false);

    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "sub"), EntitySub.class, "sub", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "chopper"), EntityChopper.class, "chopper", ++entityID, mod, 224, 1, false);
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + "continuousminer"), EntityContinuousMiner.class, "continuousminer", ++entityID, mod, 224, 1, false);

    // EntityRegistry.registerModEntity(EntityPumpJack.class, "pumpjack", ++entityID, mod, 224, 1, false);

}
项目:Minestrappolation-4    文件:Minestrappolation.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    proxy.registerRenders();
    proxy.init(event);
    MGenHandler.load();
    EntityRegistry.registerModEntity(EntityMudBall.class, "mud_ball", EntityRegistry.findGlobalUniqueEntityId(),
                                     Minestrappolation.instance, 350, 5, true);
    EntityRegistry.registerModEntity(EntityIceball.class, "ice_ball", EntityRegistry.findGlobalUniqueEntityId() + 1,
                                     Minestrappolation.instance, 350, 5, true);
    GameRegistry.registerTileEntity(TileEntityBarrel.class, "tile_entity_barrel");
    GameRegistry.registerTileEntity(TileEntityCrate.class, "tile_entity_crate");
    GameRegistry.registerTileEntity(TileEntityMelter.class, "tile_entity_melter");
    GameRegistry.registerTileEntity(TileEntityAlloy.class, "tile_entity_alloy");
    GameRegistry.registerTileEntity(TileEntityStoneCutter.class, "tile_entity_stonecutter");
    GameRegistry.registerTileEntity(TileEntitySawMill.class, "tile_entity_sawmill");
    GameRegistry.registerTileEntity(TileEntityCrusher.class, "tile_entity_crusher");
    GameRegistry.registerTileEntity(TileEntitySplitter.class, "tile_entity_splitter");
    GameRegistry.registerTileEntity(TileEntityEnderPorter.class, "tile_entity_enderporter");
    GameRegistry.registerTileEntity(TileEntityPipe.class, "tile_entity_pipe");
    GameRegistry.registerTileEntity(TileEntitySorter.class, "tile_entity_sorter");

    GameRegistry.registerFuelHandler(new MFuelHandler());
}
项目:ARKCraft-Code    文件:EntityHandler.java   
public static void registerEntityEgg(Class eClass, String name, BiomeGenBase... biomes)
{
    int id = getUniqueEntityId();
    Random rand = new Random(name.hashCode());
    int mainColor = rand.nextInt() * 16777215;
    int secondColor = rand.nextInt() * 16777215;

    EntityRegistry.registerGlobalEntityID(eClass, name, id);
    //TODO Model error
    //EntityRegistry.registerModEntity(eClass, name, id, ARKCraft.instance(), 64, 4, true);
    EntityRegistry.addSpawn(eClass, CoreBalance.DINO_PROPERTIES.SPAWN_PROBABILITY, 2, 4,
            EnumCreatureType.CREATURE, biomes);
    EntityList.idToClassMapping.put(id, eClass);
    EntityList.entityEggs.put(Integer.valueOf(id), new EntityList.EntityEggInfo(id, mainColor,
            secondColor));
}
项目:Real-Life-Mod-1.8    文件:RealLifeMod.java   
public void registerEntities() {
    log("Registering Entities");
    ModEntityID = EntityRegistry.findGlobalUniqueEntityId();
    EntityRegistry.registerModEntity(EntityDriveable.class, "DriveableEntity", ModEntityID++, RealLifeMod.instance,
            256, 1, true);
    EntityRegistry.registerModEntity(EntityCar.class, "CarEntity", ModEntityID++, RealLifeMod.instance, 256, 1,
            true);
    EntityRegistry.registerModEntity(EntityPylon.class, "EntityPylon", ModEntityID++, RealLifeMod.instance, 80, 1,
            true);
    EntityRegistry.registerModEntity(EntityWheel.class, "EntityWheel", ModEntityID++, RealLifeMod.instance, 80, 1,
            true);
    EntityRegistry.registerModEntity(EntitySeat.class, "EntitySeat", ModEntityID++, RealLifeMod.instance, 80, 1,
            true);
    EntityRegistry.registerModEntity(EntitySit.class, "EntitySit", ModEntityID++, RealLifeMod.instance, 80, 1,
            false);

}
项目:MrCrayfishSkateboardingMod    文件:MrCrayfishSkateboardingMod.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    proxy.registerRenders();

    EntityRegistry.registerModEntity(EntitySkateboard.class, "csmSkateboard", 0, this, 64, 1, false);

    GameRegistry.registerTileEntity(TileEntitySlope.class, Reference.MOD_ID + "TileEntitySlope");
    GameRegistry.registerTileEntity(TileEntityCornerSlope.class, Reference.MOD_ID + "TileEntityCornerSlope");
    GameRegistry.registerTileEntity(TileEntityStair.class, Reference.MOD_ID + "TileEntityStair");

    if (event.getSide() == Side.CLIENT)
    {
        FMLCommonHandler.instance().bus().register(new SkateboardInput());
        FMLCommonHandler.instance().bus().register(new ComboOverlay());
    }
}
项目:Aura-Cascade    文件:CommonProxy.java   
public void init(FMLInitializationEvent event) {
    registry.init();

    NetworkRegistry.INSTANCE.registerGuiHandler(AuraCascade.instance, new GuiHandler());

    PylonRecipeRegistry.init();
    ProcessorRecipeRegistry.init();
    PotionManager.init();
    eventHandler = new EventHandler();
    MinecraftForge.EVENT_BUS.register(eventHandler);
    EnchantmentManager.init();
    eventHandlerEnch = new EnchantEventHandler();
    MinecraftForge.EVENT_BUS.register(eventHandlerEnch);
    EntityRegistry.registerModEntity(EntityFairy.class, "Fairy", 0, AuraCascade.instance, 50, 250, true);
    EntityRegistry.registerModEntity(EntityMinerExplosion.class, "ExplosionMiner", 1, AuraCascade.instance, 50, 40, true);
    QuestManager.init();
}
项目:TFC2    文件:CommonProxy.java   
protected void registerEntities() 
{
    DataSerializersTFC.register();
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"cart"), EntityCart.class, "cart", 0, TFC.instance, 80, 3, true, 0x000000, 0x00ff00);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bear"), EntityBear.class, "bear", 1, TFC.instance, 80, 3, true, 0x000000, 0xff0000);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bearpanda"), EntityBearPanda.class, "bearpanda", 2, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"lion"), EntityLion.class, "lion", 3, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"tiger"), EntityTiger.class, "tiger", 4, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"rhino"), EntityRhino.class, "rhino", 5, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"elephant"), EntityElephant.class, "elephant", 6, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"mammoth"), EntityMammoth.class, "mammoth", 7, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"boar"), EntityBoar.class, "boar", 8, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bison"), EntityBison.class, "bison", 9, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxred"), EntityFoxRed.class, "foxred", 10, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxarctic"), EntityFoxArctic.class, "foxarctic", 11, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"foxdesert"), EntityFoxDesert.class, "foxdesert", 12, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"hippo"), EntityHippo.class, "hippo", 13, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"bigcat"), EntityBigCat.class, "bigcat", 14, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"sabertooth"), EntitySabertooth.class, "sabertooth", 15, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
    EntityRegistry.registerModEntity(Core.CreateRes(Reference.getResID()+"elk"), EntityElk.class, "elk", 16, TFC.instance, 80, 3, true, 0x000000, 0xffffff);
}
项目:vintagecraft    文件:CommonProxy.java   
public void init(FMLInitializationEvent event) {
    EntityRegistry.registerModEntity(EntityStone.class, "stonethrown", 3, VintageCraft.instance, 64, 1, true);  
    EntityRegistry.registerModEntity(EntityMobHorse.class, "mobhorse", 4, VintageCraft.instance, 64, 1, true);
    EntityRegistry.registerModEntity(EntityForestSpider.class, "VCForestSpider", 5, VintageCraft.instance, 64, 1, true);
    EntityRegistry.registerModEntity(EntityCoalPoweredMinecartVC.class, "VCCoalPoweredMinecart", 6, VintageCraft.instance, 80, 1, true);
    EntityRegistry.registerModEntity(EntityEmptyMinecartVC.class, "VCMinecart", 7, VintageCraft.instance, 80, 1, true);

    EntityRegistry.registerModEntity(EntityCowVC.class, "CowVC", 8, VintageCraft.instance, 80, 1, true);
    EntityRegistry.registerModEntity(EntitySheepVC.class, "SheepVC", 9, VintageCraft.instance, 80, 1, true);


    for (Achievement ach : AchievementsVC.achievements) {
        ach.registerStat();
    }

    AchievementPage.registerAchievementPage(new AchievementPage(
        "Vintagecraft", 
        AchievementsVC.achievements.toArray(new Achievement[0])
    ));

}
项目:Narutocraft-PL_Mod    文件:RegMobs.java   
public static void regMobsList() {
    Logger logger = Logger.getLogger(References.MODID);
    // EntityRegistry.registerGlobalEntityID(Entity.class, "Entity", 1);
    EntityRegistry.registerGlobalEntityID(EntityKyuubi.class, "EntityKyuubi",
            EntityRegistry.findGlobalUniqueEntityId(), 2, 2);
    boolean finished = false;
    int id = 0;
    do {
        try {
            // EntityRegistry.registerGlobalEntityID(EntityKyuubi.class,
            // "EntityKyuubi", id, 2, 2);
            finished = true;
        } catch (IllegalArgumentException e) {
            logger.warning(e.getMessage());
            id++;
            if (id > 255) {
                finished = true;
            }
        }
    } while (!finished);
}
项目:Narutocraft-PL_Mod    文件:RegEntities.java   
public static void RegEntitiesList() {
    int id = 0;
    EntityRegistry.registerModEntity(EntityKunai.class, "Kunai", id, NarutoCraft.instance, 80, 1, true);
    id++;
    EntityRegistry.registerModEntity(EntityExplodeKunai.class, "ExplodeKunai", id, NarutoCraft.instance, 80, 1, true);
    id++;
    EntityRegistry.registerModEntity(EntitySenbon.class, "Senbon", id, NarutoCraft.instance, 80, 1, true);
    id++;
    EntityRegistry.registerModEntity(EntityShuriken.class, "Shuriken", id, NarutoCraft.instance, 80, 1, true);
    id++;

    EntityRegistry.registerModEntity(EntityKyuubi.class, "Kyuubi", id, NarutoCraft.instance, 90, 1, true);
    id++;
    // TODO Normal summons sometimes spawn. (After making summons.
    // EntityRegistry.addSpawn(EntityKyuubi.class, 2, 0, 1,
    // EnumCreatureType.creature, BiomeGenBase.biomeList);//change the
    // values to vary the spawn rarity, biome, etc.
}
项目:Project-Zed    文件:CommonProxy.java   
private void registerEntities() {
    // EntityRegistry.instance().registerGlobalEntityID(EntityAtomicBomb.class, "entityAtomicBomb", 0);

    PZEntityRegistry.instance().init();

    int counter = 0;
    Iterator iter = PZEntityRegistry.instance().getMap().entrySet().iterator();
    while (iter.hasNext()) {
        Entry<Class<? extends Entity>, String> entry = (Entry<Class<? extends Entity>, String>) iter.next();
        if (entry.getKey() != null && entry.getValue() != null && entry.getValue().length() > 0) {
            // EntityRegistry.instance().registerGlobalEntityID(entry.getKey(), entry.getValue(), PZEntityRegistry.instance().getNextID());
            // EntityRegistry.instance().registerGlobalEntityID(entry.getKey(), entry.getValue(), EntityRegistry.findGlobalUniqueEntityId());
            EntityRegistry.registerModEntity(entry.getKey(), entry.getValue(), counter++, ProjectZed.instance, 0, 0, false);
        }
    }
}
项目:EnderZoo    文件:WailaCompat.java   
@Override
 public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
String name = ENTRY_MAP.get(entity.getClass());

if(name == null) {
    name = EntityRegistry.getEntry(entity.getClass()).getName();
    ENTRY_MAP.put(entity.getClass(), name);
}

   String locKey = "entity." + EnderZoo.MODID + "." + name + ".desc.";
   String loc = null;
   for (int line = 1; !(loc = EnderZoo.proxy.translate(locKey + line)).equals(locKey + line); line++) {
     currenttip.add(loc);
   }
   return currenttip;
 }
项目:IGW-mod    文件:Util.java   
public static String getModIdForEntity(Class<? extends Entity> entity){
    if(reflectionFailed) return "minecraft";
    if(entityNames == null) {
        try {
            entityNames = (HashMap<String, ModContainer>)ReflectionHelper.findField(EntityRegistry.class, "entityNames").get(EntityRegistry.instance());
        } catch(Exception e) {
            IGWLog.warning("IGW-Mod failed to perform reflection! A result of this is that wiki pages related to Entities will not be found. Report to MineMaarten please!");
            e.printStackTrace();
            reflectionFailed = true;
            return "minecraft";
        }
    }
    EntityRegistration entityReg = EntityRegistry.instance().lookupModSpawn(entity, true);
    if(entityReg == null) return "minecraft";
    ModContainer mod = entityNames.get(entityReg.getEntityName());
    if(mod == null) {
        IGWLog.info("Couldn't find the owning mod of the entity " + entityReg.getEntityName() + " even though it's registered through the EntityRegistry!");
        return "minecraft";
    } else {
        return mod.getModId().toLowerCase();
    }
}
项目:LavaBoat-mod    文件:ModLavaBoat.java   
@Mod.EventHandler
public void load(FMLInitializationEvent event) {
    lavaBoat = new ItemLavaBoat();
    GameRegistry.registerItem(lavaBoat, "LBBoat");
    proxy.registerModels();

    // recipe
    GameRegistry.addRecipe(new ItemStack(lavaBoat, 1, 0), "xyx", "xxx", 'x', Items.iron_ingot, 'y', Items.boat);
    GameRegistry.addRecipe(new ItemStack(lavaBoat, 1, 1), "xx", 'x', new ItemStack(lavaBoat, 1, 0));
    GameRegistry.addRecipe(new ItemStack(lavaBoat, 1, 3), "xyx", "xxx", 'x', Blocks.obsidian, 'y', new ItemStack(lavaBoat, 1, 0));
    GameRegistry.addRecipe(new ItemStack(lavaBoat, 1, 4), "xx", 'x', new ItemStack(lavaBoat, 1, 3));


    EntityRegistry.registerModEntity(EntityReinforcedBoat.class, "ReinforcedBoat", 0, this, 40, 1, true);
    EntityRegistry.registerModEntity(EntityDoubleReinforcedBoat.class, "DoubleReinforcedBoat", 1, this, 40, 1, true);
    EntityRegistry.registerModEntity(EntityLavaBoat.class, "LavaBoat", 3, this, 40, 1, true);
    EntityRegistry.registerModEntity(EntityDoubleLavaBoat.class, "DoubleLavaBoat", 4, this, 40, 1, true);

    proxy.registerRenderers();
}
项目:pnc-repressurized    文件:EntityRegistrator.java   
public static void init() {
    // Entities
    // parms: entity class, mobname (for spawners), id, modclass, max player
    // distance for update, update frequency, boolean keep server updated
    // about velocities.
    EntityRegistry.registerModEntity(RL("vortex"), EntityVortex.class, "Vortex", 0, PneumaticCraftRepressurized.instance, 80, 1, true);
    EntityRegistry.registerModEntity(RL("drone"), EntityDrone.class, "Drone", 1, PneumaticCraftRepressurized.instance, 80, 1, true);
    EntityRegistry.registerModEntity(RL("logistic_drone"), EntityLogisticsDrone.class, "logisticDrone", 2, PneumaticCraftRepressurized.instance, 80, 1, true);
    // Entity Eggs:
    // registerEntityEgg(EntityRook.class, 0xffffff, 0x000000);
}
项目:Industrial-Foregoing    文件:CommonProxy.java   
public void preInit(FMLPreInitializationEvent event) {
    IFRegistries.poke();

    CraftingHelper.register(new ResourceLocation(Reference.MOD_ID, "configuration_value"), new ConfigurationConditionFactory());
    random = new Random();

    FluidsRegistry.registerFluids();
    BlockRegistry.poke();

    MinecraftForge.EVENT_BUS.register(new BlockRegistry());
    MinecraftForge.EVENT_BUS.register(new ItemRegistry());
    MinecraftForge.EVENT_BUS.register(new StrawRegistry());
    MinecraftForge.EVENT_BUS.register(new MeatFeederTickHandler());
    MinecraftForge.EVENT_BUS.register(new MobDeathHandler());
    MinecraftForge.EVENT_BUS.register(new WorldTickHandler());
    MinecraftForge.EVENT_BUS.register(new PlantRecollectableRegistryHandler());
    MinecraftForge.EVENT_BUS.register(new FakePlayerRideEntityHandler());
    MinecraftForge.EVENT_BUS.register(new PlantInteractorHarvestDropsHandler());

    NetworkRegistry.INSTANCE.registerGuiHandler(IndustrialForegoing.instance, new GuiHandler());

    CustomConfiguration.config = new Configuration(event.getSuggestedConfigurationFile());
    CustomConfiguration.config.load();
    CustomConfiguration.sync();
    CustomConfiguration.configValues = new HashMap<>();
    CustomConfiguration.configValues.put("useTEFrames", CustomConfiguration.config.getBoolean("useTEFrames", Configuration.CATEGORY_GENERAL, true, "Use Thermal Expansion Machine Frames instead of Tesla Core Lib"));

    if (Loader.isModLoaded("crafttweaker")) CraftTweakerHelper.register();

    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID, "pink_slime"), EntityPinkSlime.class, "pink_slime", 135135, IndustrialForegoing.instance, 32, 1, false, 10485860, 16777215);
    PINK_SLIME_LOOT = LootTableList.register(new ResourceLocation(Reference.MOD_ID, "entities/pink_slime"));
}
项目:ObsidianSuite    文件:ModEntities.java   
public static void registerEntity(Class entityClass, String name)
{
    long seed = name.hashCode();
    Random rand = new Random(seed);
    int primaryColor = rand.nextInt() * 16777215;
    int secondaryColor = rand.nextInt() * 16777215;
       EntityRegistry.registerModEntity(new ResourceLocation(ObsidianOverhaul.MODID, name), entityClass, name, id++, ObsidianOverhaul.instance, 64, 3, true, primaryColor, secondaryColor);
}
项目:SentinentAImod    文件:Main.java   
@EventHandler
public void init(FMLInitializationEvent event) {
    sentinentAItem = new SentinentAI().setRegistryName(MODID, "sentinentai");
    GameRegistry.register(sentinentAItem);

    ModelResourceLocation sentinentAItemModel = new ModelResourceLocation("sentinentai:sentinentai", "inventory"); 
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(sentinentAItem, 0, sentinentAItemModel);

    bodyKitItem = new BodyKit().setRegistryName(MODID, "bodykit");
    GameRegistry.register(bodyKitItem);

    ModelResourceLocation bodyKitItemModel = new ModelResourceLocation("sentinentai:bodykit", "inventory"); 
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(bodyKitItem, 0, bodyKitItemModel);       

    coreItemEgg = new CoreItemEgg().setRegistryName(MODID, "coreitemegg");
    GameRegistry.register(coreItemEgg);

    ModelResourceLocation coreItemEggModel = new ModelResourceLocation("sentinentai:coreitemegg", "inventory"); 
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(coreItemEgg, 0, coreItemEggModel);       

    EntityRegistry.registerModEntity(new ResourceLocation(MODID,"corentity"), CoreEntity.class, "coreentity", 1, this, 80, 3, true);

    GameRegistry.addRecipe(
            new ItemStack(coreItemEgg),
            " s ",
            " r ",
            " b ",
            's', sentinentAItem,
            'r', Blocks.REDSTONE_BLOCK,
            'b', bodyKitItem);
}
项目:WirelessRedstone    文件:Proxy.java   
public void preInit() {
    ModItems.init();
    PacketCustom.assignHandler(NET_CHANNEL, new WRServerPH());
    ConfigTag coreconfig = SaveManager.config().getTag("core").useBraces().setPosition(10);
    WirelessBolt.init(coreconfig);
    EntityRegistry.registerModEntity(new ResourceLocation("wrcbe:tracker"), EntityWirelessTracker.class, "tracker", 0, WirelessRedstone.instance, 64, 1, true);
}
项目:Torched    文件:ProxyCommon.java   
public void preInitMod()
{
    EntityRegistry.registerModEntity(new ResourceLocation("torched", "entity_torch"), EntityTorch.class, "torchEnt", 20, Torched.instance, 64, 20, true);
    EntityRegistry.registerModEntity(new ResourceLocation("torched", "entity_torch_firework"), EntityTorchFirework.class, "torchFireworkEnt", 21, Torched.instance, 128, 2, true);

    Torched.eventHandlerServer = new EventHandlerServer();
    MinecraftForge.EVENT_BUS.register(Torched.eventHandlerServer);

    ItemHandler.registerDualHandedItem(ItemTorchGun.class);
    ItemHandler.registerDualHandedItem(ItemTorchLauncher.class);
}
项目:MeeCreeps    文件:ModEntities.java   
public static void init() {
    // Every entity in our mod has an ID (local to this mod)
    int id = 1;
    EntityRegistry.registerModEntity(new ResourceLocation(MeeCreeps.MODID, "meecreeps"), EntityMeeCreeps.class, "MeeCreeps", id++, MeeCreeps.instance, 64, 3, true, 0x0CD5F2, 0xFF7300);
    EntityRegistry.registerModEntity(new ResourceLocation(MeeCreeps.MODID, "meecreeps_projectile"), EntityProjectile.class, "meecreeps_projectile", id++, MeeCreeps.instance, 100, 5, true);

    // This is the loot table for our mob
    LootTableList.register(EntityMeeCreeps.LOOT);
}
项目:ArcaneMagic    文件:ModEntities.java   
public static void init()
{
    int entityID = 0;

    EntityRegistry.registerModEntity(new ResourceLocation(ArcaneMagic.MODID, "item_fancy"), EntityItemFancy.class,
            "item_fancy", entityID++, ArcaneMagic.instance, 64, 20, true);

    EntityRegistry.registerModEntity(new ResourceLocation(ArcaneMagic.MODID, "entity_magic_circles"),
            EntityMagicCircles.class, "magic_circles", entityID++, ArcaneMagic.instance, 64, 20, true);
}
项目:Anima-Mundi    文件:CommonProxy.java   
@Override
public void OnPreInit(FMLPreInitializationEvent e)
{
    //TODO: move these
    int id = 1;
    EntityRegistry.registerModEntity(new ResourceLocation(ModConstants.MODID + ":nodeitem"), EntityNodeItem.class, "nodeItem", id++, Anima.Instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ModConstants.MODID + ":blockSuck"), EntityBlockSuck.class, "blockSuck", id++, Anima.Instance, 64, 3, true);
    GameRegistry.registerWorldGenerator(new AnimaWorldGenerator(), 0);

    CapabilityAnima.register();
}
项目:Halloween    文件:ModEntities.java   
/**
 * Add spawning rules for the living mobs we want to be able to spawn naturally.
 */
public static void addEntitySpawns()
{
    // get the list of biomes that creepers can spawn in, we'll use the same biomes for all of our mobs
    Biome[] biomes = getBiomeList(EntityCreeper.class, EnumCreatureType.MONSTER);

    // add the spawn rules to the entity registry
    EntityRegistry.addSpawn(EntityJumpkin.class, 100, 4, 4, EnumCreatureType.MONSTER, biomes);
    EntityRegistry.addSpawn(EntityZombieHands.class, 100, 4, 4, EnumCreatureType.MONSTER, biomes);
    EntityRegistry.addSpawn(EntityHallowitch.class, 75, 4, 4, EnumCreatureType.MONSTER, biomes);
    EntityRegistry.addSpawn(EntityCreeperween.class, 75, 4, 4, EnumCreatureType.MONSTER, biomes);
    EntityRegistry.addSpawn(EntityHaunter.class, 5, 1, 1, EnumCreatureType.MONSTER, biomes);
    EntityRegistry.addSpawn(EntityTreater.class, 50, 4, 4, EnumCreatureType.MONSTER, biomes);
}
项目:EndermanEvolution    文件:ModEntities.java   
public static void init() {
    int endermanEggColor1 = new Color(254, 85, 176).getRGB();
    int endermanEggColor2 = new Color(97, 230, 150).getRGB();
    EntityRegistry.registerModEntity(new ResourceLocation(ModGlobals.MODID, "enderman_evolved"), EntityEvolvedEnderman.class, "evolved_enderman", 0, EndermanEvolution.INSTANCE, 80, 3, false, 0, endermanEggColor2);
    EntityRegistry.registerModEntity(new ResourceLocation(ModGlobals.MODID, "frienderman"), EntityFrienderman.class, "frienderman", 1, EndermanEvolution.INSTANCE, 80, 3, false, 0, endermanEggColor1);
    EntityRegistry.registerModEntity(new ResourceLocation(ModGlobals.MODID, "friender_pearl"), EntityFrienderPearl.class, "friender_pearl", 2, EndermanEvolution.INSTANCE, 80, 3, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ModGlobals.MODID, "evolved_endermite"), EntityEvolvedEndermite.class, "evolved_endermite", 4, EndermanEvolution.INSTANCE, 80, 3, false, new Color(1, 66, 16).getRGB(), endermanEggColor2);

    EntitySpawnPlacementRegistry.setPlacementType(EntityEvolvedEnderman.class, SpawnPlacementType.ON_GROUND);
    EntitySpawnPlacementRegistry.setPlacementType(EntityFrienderman.class, SpawnPlacementType.ON_GROUND);
    EntityRegistry.addSpawn(EntityEvolvedEnderman.class, ConfigOptions.ENDERMAN_PROBABILITY, 1, ConfigOptions.ENDERMAN_MAX_SPAWN, EnumCreatureType.MONSTER, getBiomeList());
    EntityRegistry.addSpawn(EntityFrienderman.class, ConfigOptions.FRIENDERMAN_PROBABILITY, 1, ConfigOptions.FRIENDERMAN_MAX_SPAWN, EnumCreatureType.CREATURE, Biomes.SKY, Biomes.DESERT, Biomes.HELL);
}