当前位置: 首页>>代码示例>>Java>>正文


Java PotionHelper.func_77905_c方法代码示例

本文整理汇总了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);
		}
	}
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:21,代码来源:LingeringPotion.java

示例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_);
      }
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:22,代码来源:ItemPotion.java

示例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_);
        }
    }
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:32,代码来源:itemPotion.java

示例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);
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:32,代码来源:ItemPotion.java

示例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);
        }
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:32,代码来源:ItemPotion.java


注:本文中的net.minecraft.potion.PotionHelper.func_77905_c方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。