Compatibility
Minecraft: Java Edition
Platforms
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
This is a mod that allows all existing items to be edible, and it has been open-sourced on GitHub.
After installing this mod, all existing items will become edible by players. By default, they will restore the same amount of saturation and hunger value as an apple. If you are not satisfied with just making items edible, you can also set the saturation and hunger value for specific items through the configuration file, as well as whether they can be eaten continuously. Additionally, you can configure commands to be executed after consuming specific items. If the configured item is originally edible, the configuration file will override the effects of consuming the original item.
In addition, you can configure items that are excluded from being edible by adding their IDs to the "excluded" section in the configuration file. Below are the default configuration file and an example configuration file for this mod:
{
"excluded": []
}
{
"minecraft:apple": {
"saturation": 10.0,
"nutrition": 18,
"commands": [
"say This is a test message."
]
},
"minecraft:stone_axe": {
"saturation": -10.0,
"nutrition": 0,
"always": true,
"commands": [
"me ?",
"kill @p",
"execute at @p as @p run summon minecraft:lightning_bolt ~ ~ ~"
]
},
"excluded": [
"minecraft:wooden_shovel"
]
}
Note: The executor of the commands is the game server, not the player who consumes the specified item. However, the execution location and display name will still be the player's location and name.