Drain hunger slightly faster when doing normal hunger-draining things.

Started by TamTroll on

Topic category: Help with modding (Java Edition)

Last seen on 13:43, 23. Feb 2022
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Drain hunger slightly faster when doing normal hunger-draining things.

Just a shot in the dark here, is there any simple way to have a player's drain slightly faster then normal when they're doing the ususal hunger draining things (walking, running, taking damage, etc) but not when the player is standing perfectly still?

 

This is a procedure that's going to be applied to an item when equiped, so a new game rule shouldn't be needed. i just can't think of any way to do this without going through a lot of "If target entity X/Y/Z location = +1/-1 increase exhaustion by 0.0001" or the like. which wouldn't help if i was like, falling or being moved by pistons or something, as i think i'd still be draining hunger in that case.

Last seen on 04:59, 25. Apr 2024
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did this same thing using…
Sun, 12/26/2021 - 19:07

I did this same thing using only the "Set food value" with a randomizer called every few seconds, and set a condition while if "Food value < 20" and "Is player sprinting", then it executes the rest. I don't know how to do it without this, it works fine for me but it would be cool to have something like a "Player exhaustion increases" Global trigger or smthing like that.

Last seen on 13:43, 23. Feb 2022
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, i'll try out your…
Fri, 01/07/2022 - 19:55

Yeah, i'll try out your method and see how well it works for me.

 

Backup plan is to try out the Nutrition mod, where you need a set amount of protien, grain, vegetables, etc. Maybe it'll have something like i'm looking for, or i could set my nutrition requirements to be higher then normal.