2013-07-26 21:18:53 -07:00
|
|
|
package tconstruct.items;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
2013-12-11 23:47:07 -05:00
|
|
|
import net.minecraft.potion.Potion;
|
|
|
|
|
import net.minecraft.potion.PotionEffect;
|
2013-11-25 14:08:18 -05:00
|
|
|
import net.minecraft.util.StatCollector;
|
2013-12-11 23:47:07 -05:00
|
|
|
import net.minecraft.world.World;
|
2013-07-26 21:18:53 -07:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
|
|
public class StrangeFood extends SpecialFood
|
|
|
|
|
{
|
2013-12-31 15:30:34 -05:00
|
|
|
public StrangeFood()
|
2013-07-26 21:18:53 -07:00
|
|
|
{
|
2013-12-31 15:30:34 -05:00
|
|
|
super(new int[] { 2, 2 }, new float[] { 1f, 1f }, new String[] { "edibleslime", "edibleblood" }, new String[] { "food/edibleslime", "food/edibleblood" });
|
2013-12-11 23:47:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void onFoodEaten (ItemStack stack, World world, EntityPlayer player)
|
|
|
|
|
{
|
|
|
|
|
if (stack.getItemDamage() == 1)
|
|
|
|
|
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 20*15, 0));
|
2013-07-26 21:18:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
|
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
|
|
|
|
{
|
2013-12-11 23:47:07 -05:00
|
|
|
int type = stack.getItemDamage();
|
|
|
|
|
switch (type)
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood1.tooltip"));
|
|
|
|
|
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood2.tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood3.tooltip"));
|
|
|
|
|
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood4.tooltip"));
|
|
|
|
|
break;
|
|
|
|
|
}
|
2013-07-26 21:18:53 -07:00
|
|
|
}
|
|
|
|
|
}
|