当前位置: 首页>>代码示例>>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;未经允许,请勿转载。