Requiem icon indicating copy to clipboard operation
Requiem copied to clipboard

Food stats for mobs do not update when not being possessed

Open James103 opened this issue 3 years ago • 3 comments

Currently, when you are not possessing a mob, none of its food stats update. This means that, without someone possessing a given mob or commands acting on the data of that mob,

  • [ ] 1) The mob does not lose hunger or saturation from too much exhaustion.
  • [ ] 2) The mob does not gain exhaustion from any natural source.
  • [ ] 3) The mob does not take starvation damage.

(2) is most likely intentional in order to avoid breaking existing contraptions that use 'human' mobs (e.g. villager trading halls). I'm not sure if (1) and (3) are intentional.

You can exploit (3) by letting yourself hit 0 hunger, then ending possession right before the mob would die of starvation damage. You can also exploit (1) by, for example, getting a high level Hunger effect and then ending possession before the effect ends.

Modlist (MC 1.16.5):

Mods:
  [✔️] fabric-api-0.29.3+1.16
  [✔️] modmenu-1.14.13+build.19
  [❌] requiem-1.4.4.jar (disabled)
  [❌] requiem-1.5.0.jar (disabled)
  [❌] requiem-1.6.2.jar (disabled)
  [❌] requiem-1.7.0.jar (disabled)
  [✔️] requiem-1.7.6
  [❌] requiem-pandemonium-1.4.4.jar (disabled)
  [❌] requiem-pandemonium-1.5.0.jar (disabled)
  [❌] requiem-pandemonium-1.6.2.jar (disabled)
  [❌] requiem-pandemonium-1.7.0.jar (disabled)
  [✔️] requiem-pandemonium-1.7.6

James103 avatar May 15 '21 03:05 James103

Not sure what to do with that info. As long as mobs do not tick hunger it's exploitable as players could leave at half a hunger bar left; but as you noted making mobs tick hunger would create more problems than it would solve.

Pyrofab avatar May 18 '21 21:05 Pyrofab

There could be a (game rule or config setting) that lets previously-possessed mobs tick hunger in certain cases, such as the following:

  • Mobs at 0 hunger take starvation damage over time even when not being possessed.
  • Mobs previously possessed that are at 18 hunger or more regenerate health over time (at the cost of food).
  • Mobs that have the Hunger effect always tick their hunger for the duration of the effect (this for example allows you to cause villagers to starve to death while being a Husk).
  • Mobs at 6 hunger or below accumulate exhaustion normally. If you want the mob to survive indefinitely, make sure to leave it at 7 hunger or more (this minimum value to be considered "well-fed" could also be configured through a gamerule).

Note that this would only affect mobs that have been previously possessed. Any mobs that have never been possessed before will never tick their hunger unless they have the Hunger effect.

James103 avatar Jun 14 '21 03:06 James103

Interesting take, can't promise it will be implemented soon though.

Pyrofab avatar Jun 14 '21 23:06 Pyrofab