This commit is contained in:
John Yorke committed 2020-10-26 20:43:15 -03:00
1 parent cbb61ebcbe
commit 82de9e1aa0
74 files changed
+3485 -3415

No files matched your search

@@ -12,25 +12,25 @@ import taintedmagic.common.TaintedMagic;
public class ItemNightshadeBerries extends ItemFood
{
public ItemNightshadeBerries (int i, float j, boolean k)
{
super(i, j, k);
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
this.setUnlocalizedName("ItemNightshadeBerries");
this.setTextureName("taintedmagic:ItemNightshadeBerries");
this.setAlwaysEdible();
}
public ItemNightshadeBerries (int healAmount, float saturation, boolean b)
{
super(healAmount, saturation, b);
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
this.setUnlocalizedName("ItemNightshadeBerries");
this.setTextureName("taintedmagic:ItemNightshadeBerries");
this.setAlwaysEdible();
}
@SideOnly (Side.CLIENT)
public EnumRarity getRarity (ItemStack s)
{
return EnumRarity.uncommon;
}
@SideOnly (Side.CLIENT)
public EnumRarity getRarity (ItemStack stack)
{
return EnumRarity.uncommon;
}
@Override
protected void onFoodEaten (ItemStack s, World w, EntityPlayer p)
{
super.onFoodEaten(s, w, p);
if (!w.isRemote) p.attackEntityFrom(new DamageSource("nightshade"), Float.MAX_VALUE);
}
@Override
protected void onFoodEaten (ItemStack stack, World world, EntityPlayer player)
{
super.onFoodEaten(stack, world, player);
if (!world.isRemote) player.attackEntityFrom(new DamageSource("nightshade"), Short.MAX_VALUE);
}
}