當前位置: 首頁>>代碼示例>>Java>>正文


Java StatCollector.translateToLocal方法代碼示例

本文整理匯總了Java中net.minecraft.util.StatCollector.translateToLocal方法的典型用法代碼示例。如果您正苦於以下問題:Java StatCollector.translateToLocal方法的具體用法?Java StatCollector.translateToLocal怎麽用?Java StatCollector.translateToLocal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.util.StatCollector的用法示例。


在下文中一共展示了StatCollector.translateToLocal方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BasicTradeHandler

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
public BasicTradeHandler(long id, String traderNameRaw, LOTRTradeEntries entriesBuy, LOTRTradeEntries entriesSell) {
	super(id);
	this.traderName = StatCollector.translateToLocal(traderNameRaw);
	this.traderNameRaw = traderNameRaw;
	this.entriesBuy = entriesBuy;
	this.entriesSell = entriesSell;
	this.vesselsBuy = NeiLotrReflection.getDrinkVessels(entriesBuy);
	this.vesselsSell = NeiLotrReflection.getDrinkVessels(entriesSell);
}
 
開發者ID:CraftedMods,項目名稱:nei-lotr,代碼行數:10,代碼來源:BasicTradeHandler.java

示例2: getName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the name of this command sender (usually username, but possibly "Rcon")
 */
public String getName()
{
    if (this.hasCustomName())
    {
        return this.getCustomNameTag();
    }
    else
    {
        int i = this.getHorseType();

        switch (i)
        {
            case 0:
            default:
                return StatCollector.translateToLocal("entity.horse.name");

            case 1:
                return StatCollector.translateToLocal("entity.donkey.name");

            case 2:
                return StatCollector.translateToLocal("entity.mule.name");

            case 3:
                return StatCollector.translateToLocal("entity.zombiehorse.name");

            case 4:
                return StatCollector.translateToLocal("entity.skeletonhorse.name");
        }
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:34,代碼來源:EntityHorse.java

示例3: getItemStackDisplayName

import net.minecraft.util.StatCollector; //導入方法依賴的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;
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:13,代碼來源:ItemMonsterPlacer.java

示例4: getUnlocalizedNameInefficiently

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Translates the unlocalized name of this item, but without the .name suffix, so the translation fails and the
 * unlocalized name itself is returned.
 */
public String getUnlocalizedNameInefficiently(ItemStack stack)
{
    String s = this.getUnlocalizedName(stack);
    return s == null ? "" : StatCollector.translateToLocal(s);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:10,代碼來源:Item.java

示例5: getLocalizedName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the localized name of this block. Used for the statistics page.
 */
public String getLocalizedName()
{
    return StatCollector.translateToLocal(this.getUnlocalizedName() + "." + BlockWall.EnumType.NORMAL.getUnlocalizedName() + ".name");
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:BlockWall.java

示例6: getName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the name of this command sender (usually username, but possibly "Rcon")
 */
public String getName()
{
    return this.hasCustomName() ? this.getCustomNameTag() : (this.isTamed() ? StatCollector.translateToLocal("entity.Cat.name") : super.getName());
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:EntityOcelot.java

示例7: getLocalizedName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the localized name of this block. Used for the statistics page.
 */
public String getLocalizedName()
{
    return StatCollector.translateToLocal(this.getUnlocalizedName() + ".dry.name");
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:8,代碼來源:BlockSponge.java

示例8: getLocalizedName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the localized name of this block. Used for the statistics page.
 */
public String getLocalizedName()
{
    return StatCollector.translateToLocal("item.diode.name");
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:BlockRedstoneRepeater.java

示例9: getRecipeName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
@Override
public String getRecipeName() {
	return StatCollector.translateToLocal("lotrNei.recipe.entJar.name") + " ("
			+ StatCollector.translateToLocal("lotrNei.recipe.shapeless") + ")";
}
 
開發者ID:CraftedMods,項目名稱:nei-lotr,代碼行數:6,代碼來源:EntJarRecipeHandler.java

示例10: getTranslatedName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Returns the correct traslated name of the enchantment and the level in roman numbers.
 */
public String getTranslatedName(int level)
{
    String s = StatCollector.translateToLocal(this.getName());
    return s + " " + StatCollector.translateToLocal("enchantment.level." + level);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:9,代碼來源:Enchantment.java

示例11: getLocalizedName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the localized name of this block. Used for the statistics page.
 */
public String getLocalizedName()
{
    return StatCollector.translateToLocal(this.getUnlocalizedName() + "." + BlockPrismarine.EnumType.ROUGH.getUnlocalizedName() + ".name");
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:BlockPrismarine.java

示例12: getLocalizedName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the localized name of this block. Used for the statistics page.
 */
public String getLocalizedName()
{
    return StatCollector.translateToLocal("item.comparator.name");
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:8,代碼來源:BlockRedstoneComparator.java

示例13: getLocalizedName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the localized name of this block. Used for the statistics page.
 */
public String getLocalizedName()
{
    return StatCollector.translateToLocal("item.banner.white.name");
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:BlockBanner.java

示例14: getName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the name of this command sender (usually username, but possibly "Rcon")
 */
public String getName()
{
    return this.hasCustomName() ? this.getCustomNameTag() : StatCollector.translateToLocal("item." + this.getEntityItem().getUnlocalizedName());
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:8,代碼來源:EntityItem.java

示例15: getLocalizedName

import net.minecraft.util.StatCollector; //導入方法依賴的package包/類
/**
 * Gets the localized name of this block. Used for the statistics page.
 */
public String getLocalizedName()
{
    return StatCollector.translateToLocal(this.getUnlocalizedName() + "." + BlockStone.EnumType.STONE.getUnlocalizedName() + ".name");
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:8,代碼來源:BlockStone.java


注:本文中的net.minecraft.util.StatCollector.translateToLocal方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。