本文整理汇总了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);
}
示例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");
}
}
}
示例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;
}
示例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);
}
示例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");
}
示例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());
}
示例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");
}
示例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");
}
示例9: getRecipeName
import net.minecraft.util.StatCollector; //导入方法依赖的package包/类
@Override
public String getRecipeName() {
return StatCollector.translateToLocal("lotrNei.recipe.entJar.name") + " ("
+ StatCollector.translateToLocal("lotrNei.recipe.shapeless") + ")";
}
示例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);
}
示例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");
}
示例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");
}
示例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");
}
示例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());
}
示例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");
}