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