gt: 		if (actual_weight <= 0)
context: package v0id.exp.item;
  
  import net.minecraft.client.resources.I18n;
  import net.minecraft.client.util.ITooltipFlag;
  import net.minecraft.creativetab.CreativeTabs;
  import net.minecraft.entity.Entity;
  import net.minecraft.entity.EntityLivingBase;
  import net.minecraft.entity.player.EntityPlayer;
  import net.minecraft.item.ItemStack;
  import net.minecraft.nbt.NBTTagCompound;
  import net.minecraft.nbt.NBTTagLong;
  import net.minecraft.tileentity.TileEntity;
  import net.minecraft.util.ActionResult;
  import net.minecraft.util.EnumActionResult;
  import net.minecraft.util.EnumHand;
  import net.minecraft.util.NonNullList;
  import net.minecraft.util.math.BlockPos;
  import net.minecraft.util.math.MathHelper;
  import net.minecraft.world.World;
  import net.minecraftforge.common.util.Constants.NBT;
  import net.minecraftforge.fml.common.Loader;
  import org.apache.commons.lang3.tuple.Pair;
  import v0id.api.exp.data.ExPCreativeTabs;
  import v0id.api.exp.data.ExPMisc;
  import v0id.api.exp.data.ExPRegistryNames;
  import v0id.api.exp.entity.EnumGender;
  import v0id.api.exp.inventory.IWeightProvider;
  import v0id.api.exp.item.IContainerTickable;
  import v0id.api.exp.item.food.FoodEntry;
  import v0id.api.exp.item.food.IExPFood;
  import v0id.api.exp.player.EnumFoodGroup;
  import v0id.api.exp.player.IExPPlayer;
  import v0id.api.exp.tile.ICustomRotHandler;
  import v0id.api.exp.tile.crop.EnumCrop;
  import v0id.api.exp.world.Calendar;
  import v0id.api.exp.world.IExPWorld;
  import v0id.exp.entity.impl.Chicken;
  import v0id.exp.tile.TileNestingBox;
  import v0id.exp.util.Helpers;
  
  import java.lang.reflect.Method;
  import java.text.DecimalFormat;
  import java.util.EnumMap;
  import java.util.List;
  
  public class ItemFood extends net.minecraft.item.ItemFood implements IExPFood, IContainerTickable, IWeightProvider
  {
  	private static Method nutritionCompat_eatFood;
  	public ItemFood()
  	{
  		super(0, false);
          this.setHasSubtypes(true);
          this.setRegistryName(ExPRegistryNames.asLocation(ExPRegistryNames.itemFood));
          this.setMaxStackSize(1);
          this.setUnlocalizedName(this.getRegistryName().toString().replace(':', '.'));
          this.setCreativeTab(ExPCreativeTabs.tabFood);
  		if (Loader.isModLoaded("nutrition"))
          {
              try
              {
                  nutritionCompat_eatFood = Class.forName("v0id.exp.compat.NutritionCompat").getMethod("eatFood", EntityPlayer.class, FoodEntry.class, float.class);
              }
              catch (Exception e)
              {
                  ExPMisc.modLogger.error("ExP was unable to initialize Nutrition compatibility!", e);
              }
          }
  	}
  	
  	@Override
  	public String getUnlocalizedName(ItemStack stack)
  	{
  		return super.getUnlocalizedName() + '.' + this.getEntry(stack).getUnlocalizedName();
  	}
  
  	@Override
  	public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag advanced)
  	{
  		super.addInformation(stack, world, tooltip, advanced);
  		byte presType = this.getPreservationType(stack);
  		if (presType == 1)
          {
              tooltip.add(I18n.format("exp.txt.pickled"));
          }
  
  		if (presType == 2)
  		{
  			tooltip.add(I18n.format("exp.txt.wellCooked"));
  		}
  
  		DecimalFormat df = new DecimalFormat("#.#");
  		DecimalFormat df1 = new DecimalFormat("#,###");
  		tooltip.add(I18n.format("exp.txt.item.desc.rot", df.format((this.getTotalRot(stack) / this.getEntry(stack).getBaseHealth()) * 100)));
  	    if (stack.hasTagCompound() && stack.getTagCompound().getBoolean("fertilized"))
          {
              tooltip.add(I18n.format("exp.txt.fertilized"));
          }
  	}
  
  	@Override
  	public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems)
  	{
          if (tab != this.getCreativeTab())
          {
              return;
          }
  
  		for (int i = 0; i < FoodEntry.allEntries.size(); ++i)
  		{
  		    ItemStack is = new ItemStack(this, 1, i);
  		    this.setTotalWeight(is, 10000);
  		    this.setTotalRot(is, 0.1F);
  			subItems.add(is);
  		}
  	}
  
  	@Override
  	public float getCalories(ItemStack stack)
  	{
  		return this.getEntry(stack).getCaloriesRestored() * (this.getTotalWeight(stack) / 100);
  	}
  
  	@Override
  	public double getDurabilityForDisplay(ItemStack stack)
  	{
  		return this.getTotalRot(stack) / this.getEntry(stack).getBaseHealth();
  	}
  	
  	@Override
  	public boolean showDurabilityBar(ItemStack stack)
      {
          return true;
      }
  
  	@Override
  	public EnumMap<EnumFoodGroup, Float> getFoodGroup(ItemStack stack)
  	{
  		EnumMap<EnumFoodGroup, Float> nutMap = new EnumMap<>(EnumFoodGroup.class);
  		float weightMul = this.getTotalWeight(stack) / 100;
  		this.getEntry(stack).getNutrientData().forEach((EnumFoodGroup n, Float f) -> nutMap.put(n, f * weightMul));
  		return nutMap;
  	}
  
  	@Override
  	public boolean skipHandlers(ItemStack stack)
  	{
  		return true;
  	}
  	
  	@Override
  	public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected)
  	{
  		super.onUpdate(stack, worldIn, entityIn, itemSlot, isSelected);
  		if (!stack.hasTagCompound() || !stack.getTagCompound().hasKey("exp.foodData"))
  		{
  			this.initDefaultNBT(stack);
  		}
  		
  		if (worldIn.getTotalWorldTime() % 500 == 0 && entityIn != null)
  		{
  			this.checkRot(stack, worldIn, entityIn.getPosition(), 1);
  		}
  	}
  	
  	@Override
  	public int getMaxItemUseDuration(ItemStack stack)
  	{
  		return 10;
  	}
  
  	@Override
  	public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn)
  	{
  		return this.canEat(playerIn, playerIn.getHeldItem(handIn)) ? super.onItemRightClick(worldIn, playerIn, handIn) : new ActionResult<>(EnumActionResult.FAIL, playerIn.getHeldItem(handIn));
  	}
  
  	@Override
  	public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving)
  	{
  		if (entityLiving instanceof EntityPlayer)
  		{
  			this.doEat((EntityPlayer) entityLiving, stack);
  		}
  		
  		return stack;
  	}
  
  	public void initDefaultNBT(ItemStack is)
  	{
  		NBTTagCompound foodTag = new NBTTagCompound();
  		foodTag.setFloat("weight", this.getEntry(is).getMaxWeight());
  		foodTag.setFloat("rot", 0.1F);
  		foodTag.setByte("preservationType", (byte)0);
  		is.setTagCompound(is.hasTagCompound() ? is.getTagCompound() : new NBTTagCompound());
  		is.getTagCompound().setTag("exp.foodData", foodTag);
  	}
  	
  	public boolean canEat(EntityPlayer player, ItemStack is)
  	{
  		IExPPlayer p = IExPPlayer.of(player);
  		return p.getCalories() <= 1980;
  	}
  	
  	public void doEat(EntityPlayer player, ItemStack is)
  	{
  		IExPPlayer p = IExPPlayer.of(player);
  		float missingCalories = 2000 - p.getCalories();
  		FoodEntry entry = this.getEntry(is);
  		float weight = this.getTotalWeight(is);
  		
  		// Player will not eat rotten food.
  		float actual_weight = weight * (1 - (this.getTotalRot(is) / entry.getBaseHealth()));
  		
  		// All that is left is rot.
  