Food is one of the easiest ways to add something new to survival. A snack that gives a few seconds of Speed, a stew that heals, a cursed berry that poisons you: all of these are just a food item with an effect or two. Here's how we build them in the GodCraft app, and how to pick numbers that feel like Minecraft.
Open the food editor
- In the Workbench tab, open your add-on (or tap + and Create Addon).
- Tap Items, Entities, ..., then Add Object.
- Go to Items > Custom > Custom Food.
Texture and name
Set the Texture (16x16, drawn in Paint 2D or loaded from your gallery or files), type a Name, and check the Identifier. As an example, we'll make "Sugar Rush Cookie", a cookie that gives a short burst of Speed.
A few toggles near the top are worth a look:
- Foil adds the enchanted shimmer. Golden apples use it to look special; save it for rare foods.
- Allow Off Hand lets players hold it in the off-hand slot.
- Stack Size: 64 for snacks, 1 for bowls and stews if you want them to feel like vanilla soups.
Nutrition and saturation
These two numbers decide how good the food is.
- Nutrition is how much of the hunger bar it fills. Each point is half a drumstick, and the full bar is 20. A cookie gives 2, bread gives 5, steak gives 8.
- Saturation Modifier controls how long you stay full before the bar starts dropping again. The options go from poor and low through normal, high and good up to max and supernatural. Cookies are poor, bread is normal, steak is good, and golden apples use supernatural.
Turn on Can Always Eat if the food should be edible with a full hunger bar. Do this for anything that's mainly eaten for its effect, otherwise players can't use it when they need it most.
For our cookie: Nutrition 2, Saturation low, Can Always Eat on.
How long it takes to eat
Under Use Modifiers:
- Use Duration is how many seconds eating takes. The default 1.6 is the normal vanilla eating time. Drop it to around 0.8 for a quick snack, raise it for a big meal.
- Movement Modifier is how fast you walk while eating. 0.35 is the usual slowdown.
- Use Animation picks eating or drinking, which matters if you're making a drink.
Adding effects
- Find the effects section and tap Add.
- Pick one or more effects from the list (Speed, Regeneration, Night Vision, Poison and so on), set a starting duration and level, and confirm.
- Back in the editor, each effect has its own card where you can fine-tune Duration (sec), Level, Chance (0-1) and Hide Particles.
Some notes on each field:
- Level is the level players see: 1 is Speed I, 2 is Speed II.
- Chance is a number between 0 and 1. 1 means always; 0.3 means roughly one bite in three. This is how vanilla rotten flesh gives Hunger only sometimes.
- Hide Particles removes the swirls around the player. Nice for subtle buffs, bad for poisons, because players won't notice what happened.
For the Sugar Rush Cookie we use Speed, level 2, 10 seconds, chance 1. Short and strong feels fun; long and strong makes potions pointless.
You don't need experiments for effects. The app adds a small script to the behavior pack that applies them when the food is eaten, so all that matters is that the behavior pack is active in the world.
Balance ideas that work
- Golden apples are the reference for strong food: 4 nutrition, Regeneration II for 5 seconds and Absorption for 2 minutes. If yours beats that, it should cost more than gold to craft.
- Pair a good effect with a small downside: Strength II but also Nausea, or great nutrition with a 30% chance of Hunger.
- Keep effect durations under a minute unless the recipe is expensive.
Make it craftable
Add a recipe with Add Object > Recipes. A Crafting Recipe (Shapeless works well for food: cookie plus sugar) or a Furnace Recipe if it's something you cook, like a raw and a cooked version of a new meat.
Test and fix
Save the food, save the add-on, then tap Install in Workbench. In a test world with cheats on, use the /give command shown in the food editor. Set your hunger low with a few sprints and jumps, then eat it.
Common problems
- I can't eat it: your hunger bar is full and Can Always Eat is off.
- No effect appears: check that the effect card is there and Chance isn't 0. Also check that the behavior pack is active, not just the resource pack.
- Effect is far too long or short: durations are in seconds, so 600 means ten minutes.