本文整理匯總了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();
}