Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

Is there any way that I can use the testfor command to constantly fill up the hunger bar? Is so, please leave the command below.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The best and easiest way to do this would be to give all players the saturation effect constantly, instead of trying to do it only when a player is hungry.

/effect @a 23 1000000 1 1

Which gives all players Saturation I for 1000000 seconds, and hides the particles given off by the effect. The advantage to setting the time to such a large number is so that the effect remaining time displays as xx:xx to indicate to the player that the saturation effect is permanent, and that they don't need to worry about food.

Run this command on a clock input of some sort and hide command block output with /gamerule commandBlockOutput false and you're all set.

share|improve this answer
    
what does the saturation effect do? –  DatEpicCoderGuyWhoPrograms Apr 19 at 20:21
    
@user3487713 The saturation effect fills the player's hunger bar by 1 per tick. It essentially ensures that a player can't get hungry. –  Unionhawk Apr 19 at 20:29
    
I see now.... Thanks! –  DatEpicCoderGuyWhoPrograms Apr 19 at 20:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.