本文整理汇总了Java中net.minecraft.potion.PotionHelper.func_77905_c方法的典型用法代码示例。如果您正苦于以下问题:Java PotionHelper.func_77905_c方法的具体用法?Java PotionHelper.func_77905_c怎么用?Java PotionHelper.func_77905_c使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.potion.PotionHelper
的用法示例。
在下文中一共展示了PotionHelper.func_77905_c方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getItemStackDisplayName
import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
@Override
public String getItemStackDisplayName(ItemStack stack) {
if (stack.getItemDamage() == 0)
return StatCollector.translateToLocal("item.emptyPotion.name").trim();
else {
String s = StatCollector.translateToLocal("potion.prefix.lingering").trim() + " ";
List<PotionEffect> list = getEffects(stack);
String s1;
if (list != null && !list.isEmpty()) {
s1 = list.get(0).getEffectName();
s1 = s1 + ".postfix";
return s + StatCollector.translateToLocal(s1).trim();
} else {
s1 = PotionHelper.func_77905_c(stack.getItemDamage());
return StatCollector.translateToLocal(s1).trim() + " " + super.getItemStackDisplayName(stack);
}
}
}
示例2: func_77628_j
import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
public String func_77628_j(ItemStack p_77628_1_) {
if(p_77628_1_.func_77960_j() == 0) {
return StatCollector.func_74838_a("item.emptyPotion.name").trim();
} else {
String var2 = "";
if(func_77831_g(p_77628_1_.func_77960_j())) {
var2 = StatCollector.func_74838_a("potion.prefix.grenade").trim() + " ";
}
List var3 = Item.field_77726_bs.func_77832_l(p_77628_1_);
String var4;
if(var3 != null && !var3.isEmpty()) {
var4 = ((PotionEffect)var3.get(0)).func_76453_d();
var4 = var4 + ".postfix";
return var2 + StatCollector.func_74838_a(var4).trim();
} else {
var4 = PotionHelper.func_77905_c(p_77628_1_.func_77960_j());
return StatCollector.func_74838_a(var4).trim() + " " + super.func_77628_j(p_77628_1_);
}
}
}
示例3: getItemStackDisplayName
import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
public String getItemStackDisplayName(ItemStack p_77653_1_)
{
if (p_77653_1_.getItemDamage() == 0)
{
return StatCollector.translateToLocal("item.emptyPotion.name").trim();
}
else
{
String s = "";
if (isSplash(p_77653_1_.getItemDamage()))
{
s = StatCollector.translateToLocal("potion.prefix.grenade").trim() + " ";
}
List list = Items.potionitem.getEffects(p_77653_1_);
String s1;
if (list != null && !list.isEmpty())
{
s1 = ((PotionEffect)list.get(0)).getEffectName();
s1 = s1 + ".postfix";
return s + StatCollector.translateToLocal(s1).trim();
}
else
{
s1 = PotionHelper.func_77905_c(p_77653_1_.getItemDamage());
return StatCollector.translateToLocal(s1).trim() + " " + super.getItemStackDisplayName(p_77653_1_);
}
}
}
示例4: getItemStackDisplayName
import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
public String getItemStackDisplayName(ItemStack par1ItemStack)
{
if (par1ItemStack.getItemDamage() == 0)
{
return StatCollector.translateToLocal("item.emptyPotion.name").trim();
}
else
{
String var2 = "";
if (isSplash(par1ItemStack.getItemDamage()))
{
var2 = StatCollector.translateToLocal("potion.prefix.grenade").trim() + " ";
}
List var3 = Items.potionitem.getEffects(par1ItemStack);
String var4;
if (var3 != null && !var3.isEmpty())
{
var4 = ((PotionEffect)var3.get(0)).getEffectName();
var4 = var4 + ".postfix";
return var2 + StatCollector.translateToLocal(var4).trim();
}
else
{
var4 = PotionHelper.func_77905_c(par1ItemStack.getItemDamage());
return StatCollector.translateToLocal(var4).trim() + " " + super.getItemStackDisplayName(par1ItemStack);
}
}
}
示例5: getItemDisplayName
import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
public String getItemDisplayName(ItemStack par1ItemStack)
{
if (par1ItemStack.getItemDamage() == 0)
{
return StatCollector.translateToLocal("item.emptyPotion.name").trim();
}
else
{
String s = "";
if (isSplash(par1ItemStack.getItemDamage()))
{
s = StatCollector.translateToLocal("potion.prefix.grenade").trim() + " ";
}
List list = Item.potion.getEffects(par1ItemStack);
String s1;
if (list != null && !list.isEmpty())
{
s1 = ((PotionEffect)list.get(0)).getEffectName();
s1 = s1 + ".postfix";
return s + StatCollector.translateToLocal(s1).trim();
}
else
{
s1 = PotionHelper.func_77905_c(par1ItemStack.getItemDamage());
return StatCollector.translateToLocal(s1).trim() + " " + super.getItemDisplayName(par1ItemStack);
}
}
}