Custom Food with Effects
Create custom food items with nutrition, saturation, and special effects using Minecraft 1.21.1+ food components.
Item Type: Food Plugins: Nexo, CraftEngine Min MC Version: 1.21.1
Nexo
golden_apple_pie:
itemname: "<gradient:#f1c40f:#e67e22>Golden Apple Pie"
material: PAPER
Pack:
generate_model: true
Components:
food:
nutrition: 8
saturation: 12.8
can_always_eat: false
eat_seconds: 1.6
effects:
- type: regeneration
duration: 200
amplifier: 1
probability: 1.0
- type: absorption
duration: 400
amplifier: 0
probability: 1.0
consumable:
consume_seconds: 1.6
animation: eat
sound: entity.player.burp
has_consume_particles: trueCraftEngine
golden_apple_pie:
item-name: "<gradient:#f1c40f:#e67e22>Golden Apple Pie"
data:
material: PAPER
generate-model: true
components:
food:
nutrition: 8
saturation: 12.8
can-always-eat: false
eat-seconds: 1.6
effects:
- type: regeneration
duration: 200
amplifier: 1
probability: 1.0
- type: absorption
duration: 400
amplifier: 0
probability: 1.0
consumable:
consume-seconds: 1.6
animation: eat
sound: entity.player.burp
has-consume-particles: trueConfiguration Reference
Food Component
| Property | Type | Description | Default |
|---|---|---|---|
nutrition | int | Hunger points restored (1 = half drumstick) | 2 |
saturation | float | Saturation modifier | 2.0 |
can_always_eat | bool | If true, can eat even when full | false |
eat_seconds | float | Time to consume in seconds | 1.6 |
Effects
| Property | Type | Description |
|---|---|---|
type | string | Potion effect type (e.g., regeneration, speed, absorption) |
duration | int | Duration in ticks (20 ticks = 1 second) |
amplifier | int | Effect level (0 = I, 1 = II, etc.) |
probability | float | Chance to apply (0.0 - 1.0) |
Common Potion Effect Types
speed, slowness, haste, mining_fatigue, strength, instant_health, instant_damage, jump_boost, nausea, regeneration, resistance, fire_resistance, water_breathing, invisibility, blindness, night_vision, hunger, weakness, poison, wither, health_boost, absorption, saturation, luck, unluck
Notes
- Nutrition of 8 is equivalent to a steak. Adjust based on how rare the food should be
- Duration is in ticks (20 ticks = 1 second). 200 ticks = 10 seconds of Regeneration II
- The
consumablecomponent (1.21.2+) adds eating animation and sound customization - For simpler food (no effects), you can use the Simple Generator Food form instead of Developer Mode