-1

I'm trying to make some scoreboard commands in Minecraft. Now, I want players to eat food whenever they want (to acquire abilities). How? I don't seem to know how to do that. So how am I able to make players eat whenever they want? Or how can I apply instant hunger to anyone so they can then eat? Any help appreciated, thanks!

+I don't want the hunger effect, as that decreases food health bit by bit.

3
  • 3
    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
    – Frank
    May 2, 2016 at 1:27
  • Just give everyone the hunger effect! May 2, 2016 at 2:23
  • @Alex He explicitly says he doesn't want that. Jun 12, 2016 at 17:48

2 Answers 2

6

The food items have hardcoded value, if they can be eaten even with full bellys. Without mods you cannot change this.

However, You can use two ways to bypass it.

As you mentioned, but did not tried, you can add them hunger effect:

/effect <player> <effect> [seconds] [amplifier]
/effect @p minecraft:hunger 5 50

Mentioned value is in code stated as boolean alwaysEdible. If true, you can eat that food even when you're full.

The only food with this value as true in Vanilla MC is Golden Apple.


Resumé: So if you want to feed them with custom food that will add them custom thingies, you can:

  • Make a mod and your own food with alwaysEdible = true
  • Use golden apples
  • Use potions instead
  • Give them Hunger so they can eat
-2

You cannot do this directly like the other person said, but golden apples and any potion can be eaten/drank at full hunger.

You can set up a resource pack to make the food look different.

4

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .