How to create a custom command in Minecraft Custom Foods?

Da
1

I would like to create custom foods in Minecraft with a command, e.g. A golden apple that gives a level 10 speed, level 10 bounce and level 20 extra energy when you eat it. I found only custom potions and custom items on the internet. For the items, the effects only occur when I hold them, but not when I eat them. Write the Command, if you know that.

Me

Mmm you can attribute that you have the effects when you hold it in your hand. http://mapmaking.fr/give/

If you only want the effects when you're at it, you'll need to create a scoreboard, which will check if you eat a Golden Apple and then distribute the effects