public static ItemStack createTag(ItemStack is, float weight) { NBTTagCompound nbt = is.getTagCompound(); if (nbt == null) nbt = new NBTTagCompound(); nbt.setFloat("foodWeight", weight); nbt.setFloat("foodDecay", 0); nbt.setInteger("decayTimer", (int) TFC_Time.getTotalHours() + 1); is.setTagCompound(nbt); return is; }