Compatibility
Minecraft: Java Edition
1.21.5–1.21.6
Platforms
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Creators
Details
Licensed CC0-1.0
Published 5 days ago
Updated last week
Yummy Steak
Sprinkle steak with stardust for a filling meal.
Content
- Craft Filling Steak with 8 Steak and 1 Nether Star (center), which applies the saturation effect for an hour when eaten.
- Adds level 30 enchantment Yummy to never run out of steak (can only be applied on the Filling Steak).
Technical Concept
Besides the gameplay functionality the goal was to provide these custom features without using the global tick function to check for changes in the player's inventory.
- saturation effect is applied via
consumable
data component (added in MC 1.21.2) - not consuming the item is handled via the
use_remainder
data component (added in MC 1.21.2) - as use_remainder would need a recursive definition to be infinitly reuseable, a dummy-item is used, which then is swapped out for the actual food item
- instead of constantly checking whether a dummy item exists and is in need of replacement, the enchantment effect component
minecraft:tick
with the entity effectrun_function
(added in MC 1.21) is used to change the dummy item (only executed for one tick, when the item is first held, so more resource efficient).