Thirst/Hunger for mobs

Started by neur01 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thirst/Hunger for mobs

Hey everyone! I want a mob to have a basic thirst bar/need, and idk how to do it. Basically, as the thirst bar drops to a certain level, the mob would find a water source and for the sake of simplicity for now, would have to get inside the water source to refill the thirst bar. If it cannot find water source and the bar drops to a lower level, the mob would start taking damage.

One idea i had was to implement the bar in stages. In the first stage the mob would wait for a certain amount of time, and then it would switch to the second stage in which the mob would have to find water, and get inside it. If it cannot find water then the mob would switch to a third stage, in which it would start taking damage