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