本文整理汇总了Java中net.minecraft.entity.EntityList.getStringFromID方法的典型用法代码示例。如果您正苦于以下问题:Java EntityList.getStringFromID方法的具体用法?Java EntityList.getStringFromID怎么用?Java EntityList.getStringFromID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.EntityList
的用法示例。
在下文中一共展示了EntityList.getStringFromID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEntityId
import net.minecraft.entity.EntityList; //导入方法依赖的package包/类
private static int getEntityId(String p_getEntityId_0_)
{
if (p_getEntityId_0_ == null)
{
return -1;
}
else
{
int i = EntityList.getIDFromString(p_getEntityId_0_);
if (i < 0)
{
return -1;
}
else
{
String s = EntityList.getStringFromID(i);
return !Config.equals(p_getEntityId_0_, s) ? -1 : i;
}
}
}
示例2: getItemStackDisplayName
import net.minecraft.entity.EntityList; //导入方法依赖的package包/类
public String getItemStackDisplayName(ItemStack stack)
{
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
String s1 = EntityList.getStringFromID(stack.getMetadata());
if (s1 != null)
{
s = s + " " + StatCollector.translateToLocal("entity." + s1 + ".name");
}
return s;
}
示例3: getStatKillEntity
import net.minecraft.entity.EntityList; //导入方法依赖的package包/类
public static StatBase getStatKillEntity(EntityList.EntityEggInfo eggInfo)
{
String s = EntityList.getStringFromID(eggInfo.spawnedID);
return s == null ? null : (new StatBase("stat.killEntity." + s, new ChatComponentTranslation("stat.entityKill", new Object[] {new ChatComponentTranslation("entity." + s + ".name", new Object[0])}))).registerStat();
}
示例4: getStatEntityKilledBy
import net.minecraft.entity.EntityList; //导入方法依赖的package包/类
public static StatBase getStatEntityKilledBy(EntityList.EntityEggInfo eggInfo)
{
String s = EntityList.getStringFromID(eggInfo.spawnedID);
return s == null ? null : (new StatBase("stat.entityKilledBy." + s, new ChatComponentTranslation("stat.entityKilledBy", new Object[] {new ChatComponentTranslation("entity." + s + ".name", new Object[0])}))).registerStat();
}