How much you put in sets the price
You are not enchanting an item, you are enchanting a batch, and the batch size is the commitment. Roughly: 1–16 items asks for 1–8 levels, 16–32 asks for 8–16, 32–48 asks for 16–24, and 48–64 asks for 24–30. It is measured as a share of a full stack rather than a raw count, so an item that only stacks to one (a bowl of rabbit stew, a cake, a honey bottle) counts as everything you could possibly have committed and gets the full ladder.
Tip: No randomness anywhere: the number the table shows is a straight function of the stack and the room.
Bookshelves still do what bookshelves do
The stack sets a ceiling; the bookshelves decide how much of that ceiling you can actually reach, from 15% at none to 100% at fifteen. So the same full stack reads 1 / 3 / 5 in a bare room and 10 / 20 / 30 in a full library. The two axes multiply, which means a bare table is nearly useless for food in exactly the way it is nearly useless for a pickaxe.
Tip: 15% is lifted off vanilla's own tool formula, so a bookshelf means the same to food as it does to a sword.
What you actually pay is tiny
Row one costs one lapis and one level, row three costs three of each, identical to enchanting a tool. The big number is a requirement, not a bill. That is generous on purpose: the real cost is getting to level 30 and holding sixty-four loaves, and it means the mod never makes you choose between enchanting your food and enchanting your gear.
Raw and cooked are two different halves
Food splits the way gear splits into tools and armour. Cooked food gets the nourishment and after-dinner enchantments: Hearty, Rich, Sated, Restorative, Sugar Rush, Battle Rations, Second Helping, Bottomless, Banquet. Raw food gets the growing-and-animals half, which is Homegrown, Beastfeast, On The Go, Big Bite, Potluck, Cornucopia. Three go on anything at all: Gulp, Doggy Bag and Everlasting.
Tip: Raw beef will never be offered Hearty, and cooked beef will never be offered Beastfeast.
Better food rolls better
Vanilla's reason to enchant gold is that gold rolls past its level requirement more often. Food uses the same machinery: rotten flesh, spider eyes, poisonous potatoes, pufferfish and dried kelp roll worst; ordinary food is average; pies, cakes, stews, honey bottles and golden carrots roll better; golden apples, enchanted golden apples and chorus fruit roll best. A full stack of something precious can reach outcomes a full stack of bread cannot.
Tip: The very best results in the mod need a full stack of something already worth eating.
Enchanting rewrites the food itself
Anything that can be expressed as a property of the food (how filling it is, how much saturation it gives, how long it takes to eat, whether you can eat it on a full bar) is written directly onto the item rather than intercepted when you eat. That is why the tooltip can show honest before and after numbers, why it works on modded food the mod has never heard of, and why it survives being thrown on the ground, stored in a chest or moved by a hopper.
Tip: The untouched original is kept on the stack, so the numbers can be recomputed exactly if the balance changes.
Treasure and curses never appear at the table
Everlasting and Cornucopia are treasure: the table will not offer them at any bookshelf count, and a Master-level Butcher's book trade is their reliable source. The two curses are loot and cursed trades only, on the grounds that a table is a place you choose to go and a curse you chose is not a curse. Everything else is merged into vanilla's random-loot pool, so enchanted food books turn up in ordinary chest loot with no extra code.
Tip: Everlasting is also gated to a curated list of staples. No golden apples, no chorus fruit, no suspicious stew.
It is a base other mods build on
The batch-enchanting machinery (the front-door changes, the widened input slot, the commitment ladder, the anvil pricing) lives in a public package other mods register with in one line. Bottle Episode declares Flavor Text a required dependency and uses exactly that, and Flavor Text's own food goes through the same path with no special treatment. Adding a new food enchantment needs no Java at all: the mod publishes its effect vocabulary so a datapack can ship a complete, level-scaling enchantment in one file.