Java 类net.minecraft.entity.EntityEggInfo 实例源码

项目:MineFantasy    文件:ItemHoundFeedbagMF.java   
@Override
public void getSubItems(int id, CreativeTabs tabs, List list)
{
    if(this == ItemListMF.hound_feed)
    {
        Iterator var4 = EntityList.entityEggs.values().iterator();

        while (var4.hasNext())
        {
            EntityEggInfo var5 = (EntityEggInfo)var4.next();

            String var3 = EntityList.getStringFromID(var5.spawnedID);

            if (var3 != null && var3 == "HoundMF")
            {
                list.add(new ItemStack(Item.monsterPlacer.itemID, 1, var5.spawnedID));
            }

        }
        list.add(new ItemStack(Item.bone));
        list.add(new ItemStack(id, 1, getMaxDamage()-1));
        addTabItems(id, tabs, list);
    }
    else
    super.getSubItems(id, tabs, list);
}
项目:MineFantasy    文件:EntitylistMF.java   
private static void addEntity(Class<? extends Entity> entityClass, String entityName, int eggColor, int eggDotsColor)
{
        if (MineFantasyBase.isDebug())
        {
            System.out.println("MineFantasy: registerEntity " + entityClass + " with Mod ID " + IDBase);
        }
        EntityRegistry.registerModEntity(entityClass, entityName, IDBase, MineFantasyBase.instance, 128, 1, true);
        EntityList.entityEggs.put(Integer.valueOf(IDBase), new EntityEggInfo(IDBase, eggColor, eggDotsColor));

        EntityList.addMapping(entityClass, entityName, IDBase);
        IDBase++;
}
项目:ZeroQuest    文件:CustomEntityEgg.java   
@SideOnly(Side.CLIENT)

    /**
     * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
     */
    public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
    {
        Iterator iterator = CustomEntityList.entityEggs.values().iterator();

        while (iterator.hasNext())
        {
            EntityEggInfo entityegginfo = (EntityEggInfo)iterator.next();
            par3List.add(new ItemStack(par1, 1, entityegginfo.spawnedID));
        }
    }
项目:RuneCraftery    文件:ItemMonsterPlacer.java   
@SideOnly(Side.CLIENT)
public void func_77633_a(int p_77633_1_, CreativeTabs p_77633_2_, List p_77633_3_) {
   Iterator var4 = EntityList.field_75627_a.values().iterator();

   while(var4.hasNext()) {
      EntityEggInfo var5 = (EntityEggInfo)var4.next();
      p_77633_3_.add(new ItemStack(p_77633_1_, 1, var5.field_75613_a));
   }

}
项目:RuneCraftery    文件:ItemMonsterPlacer.java   
@SideOnly(Side.CLIENT)

    /**
     * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
     */
    public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
    {
        Iterator iterator = EntityList.entityEggs.values().iterator();

        while (iterator.hasNext())
        {
            EntityEggInfo entityegginfo = (EntityEggInfo)iterator.next();
            par3List.add(new ItemStack(par1, 1, entityegginfo.spawnedID));
        }
    }
项目:BetterNutritionMod    文件:ItemMonsterPlacer.java   
@SideOnly(Side.CLIENT)

    /**
     * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
     */
    public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
    {
        Iterator iterator = EntityList.entityEggs.values().iterator();

        while (iterator.hasNext())
        {
            EntityEggInfo entityegginfo = (EntityEggInfo)iterator.next();
            par3List.add(new ItemStack(par1, 1, entityegginfo.spawnedID));
        }
    }
项目:ModJam    文件:MJMod.java   
@EventHandler
public void load(FMLInitializationEvent event) {

    EntityRegistry.registerModEntity(EntityDwarf.class, "Dwarf", 1, instance, 15, 4, true); 
    LanguageRegistry.instance().addStringLocalization("entity.AMJM.Dwarf.name", "Dwarf");

    EntityRegistry.registerModEntity(EntityDwarfKing.class, "DwarfKing", 2, instance, 10, 3, true); 
    LanguageRegistry.instance().addStringLocalization("entity.AMJM.DwarfKing.name", "Dwarf King");


    //Temp spawn code
    BiomeGenBase[] mountain = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.MOUNTAIN);
    BiomeGenBase[] hills = BiomeDictionary.getBiomesForType(BiomeDictionary.Type.HILLS);
    //EntityRegistry.addSpawn(EntityDwarf.class, 70, 8, 12, EnumCreatureType.creature, forest);
    EntityRegistry.addSpawn(EntityDwarfKing.class, 10, 0, 1, EnumCreatureType.creature, hills);
    EntityRegistry.addSpawn(EntityDwarfKing.class, 15, 0, 1, EnumCreatureType.creature, mountain);

    proxy.rendering();

    mineDoor = new BlockMineDoor(2900, Material.iron);
    GameRegistry.registerBlock(mineDoor, "mineDoor");
    LanguageRegistry.addName(mineDoor, "Mine Door");

    debugKingTool = new ItemDebug(2901);
    GameRegistry.registerItem(debugKingTool, "debugKingTool");
    LanguageRegistry.addName(debugKingTool, "debugKingTool");



    int id = 230; // has to be unique
    EntityList.IDtoClassMapping.put(id, EntityDwarf.class);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, 0x00000, 0xFFFFF));

    id = 231; // has to be unique
    EntityList.IDtoClassMapping.put(id, EntityDwarfKing.class);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, 0x00110, 0xFFFFF));

}
项目:WeaponsMod    文件:Weapons.java   
@SuppressWarnings("unchecked")
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor) 
{
    int id = getUniqueEntityId();
    EntityList.IDtoClassMapping.put(id, entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
项目:Runes-And-Silver    文件:RunesAndSilver.java   
public static void RegisterEntityEgg(Class<? extends Entity> entity, int primarycolor, int secondaryColor){
    int id = getUniqueEntityId();
    EntityList.IDtoClassMapping.put(id, entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, primarycolor, secondaryColor));
}
项目:ZeroQuest    文件:CustomEntityEgg.java   
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack par1ItemStack, int par2)
{
    EntityEggInfo entityegginfo = (EntityEggInfo)CustomEntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage()));
    return entityegginfo != null ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) : 16777215;
}
项目:ZeroQuest    文件:CustomEntityList.java   
/**
 * Adds a entity mapping with egg info.
 */
public static void addMapping(Class par0Class, String par1Str, int par2, int par3, int par4)
{
    addMapping(par0Class, par1Str, par2);
    entityEggs.put(Integer.valueOf(par2), new EntityEggInfo(par2, par3, par4));
}
项目:RuneCraftery    文件:EntityList.java   
public static void func_75614_a(Class p_75614_0_, String p_75614_1_, int p_75614_2_, int p_75614_3_, int p_75614_4_) {
   func_75618_a(p_75614_0_, p_75614_1_, p_75614_2_);
   field_75627_a.put(Integer.valueOf(p_75614_2_), new EntityEggInfo(p_75614_2_, p_75614_3_, p_75614_4_));
}
项目:RuneCraftery    文件:ItemMonsterPlacer.java   
@SideOnly(Side.CLIENT)
public int func_82790_a(ItemStack p_82790_1_, int p_82790_2_) {
   EntityEggInfo var3 = (EntityEggInfo)EntityList.field_75627_a.get(Integer.valueOf(p_82790_1_.func_77960_j()));
   return var3 != null?(p_82790_2_ == 0?var3.field_75611_b:var3.field_75612_c):16777215;
}
项目:RuneCraftery    文件:ItemMonsterPlacer.java   
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack par1ItemStack, int par2)
{
    EntityEggInfo entityegginfo = (EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage()));
    return entityegginfo != null ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) : 16777215;
}
项目:BetterNutritionMod    文件:ItemMonsterPlacer.java   
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack par1ItemStack, int par2)
{
    EntityEggInfo entityegginfo = (EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage()));
    return entityegginfo != null ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) : 16777215;
}
项目:EnhancedBooks    文件:Utils.java   
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor) {
    int id = 300;
    EntityList.IDtoClassMapping.put(id, entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
项目:GlowTools    文件:GlowTools.java   
public static void registerEntityEgg(Class <? extends Entity> entity, int primaryColor, int secondaryColor) {
    int id = getUniqueEntityId();
    EntityList.IDtoClassMapping.put(id, entity);
    EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
项目:Community-Mod-1    文件:CommunityMod.java   
@SuppressWarnings("unchecked")
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor) {
       int id = getUniqueEntityId();
       EntityList.IDtoClassMapping.put(id, entity);
       EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
   }
项目:CountryGamer_Oceanic    文件:EntDec.java   
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor) 
{
 int id = getUniqueEntityId();
 EntityList.IDtoClassMapping.put(id, entity);
 EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
项目:Modjam-3-Winter-Warfare-Mod    文件:WinterWarMain.java   
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor) {
int id = getUniqueEntityId();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
项目:Agriculture    文件:IMobEggHandler.java   
/**
 * @param safariNet The Safari Net that is looking for egg info.
 * @return An EntityEggInfo, or null if this instance cannot handle this mob.
 */
public EntityEggInfo getEgg(ItemStack safariNet);