本文整理汇总了Java中net.minecraft.entity.EntityEggInfo类的典型用法代码示例。如果您正苦于以下问题:Java EntityEggInfo类的具体用法?Java EntityEggInfo怎么用?Java EntityEggInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EntityEggInfo类属于net.minecraft.entity包,在下文中一共展示了EntityEggInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSubItems
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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);
}
示例2: addEntity
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
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++;
}
示例3: getSubItems
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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));
}
}
示例4: func_77633_a
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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));
}
}
示例5: getSubItems
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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));
}
}
示例6: load
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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));
}
示例7: registerEntityEgg
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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));
}
示例8: RegisterEntityEgg
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
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));
}
示例9: getColorFromItemStack
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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;
}
示例10: addMapping
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
/**
* 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));
}
示例11: func_75614_a
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
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_));
}
示例12: func_82790_a
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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;
}
示例13: getColorFromItemStack
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
@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;
}
示例14: registerEntityEgg
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
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));
}
示例15: registerEntityEgg
import net.minecraft.entity.EntityEggInfo; //导入依赖的package包/类
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));
}