Industrial Revolution

Industrial Revolution

5M Downloads

[BUG] [Mod Interaction] Auto feeder consumes any item with foodstats, even if player can't eat it

CplPibald opened this issue ยท 2 comments

commented

Some mods define food values for items that a player can only eat under certain circumstances. The auto-feeder helmet module ignores these checks when consuming the item.

Example: Lato Origins, defines three origins: Cobblestonian, Iron Golem, and trashling which can eat nonstandard items. The latter, in particular, can eat almost any vanilla item. The mod defines food values for nearly everything, but a player can't eat those items unless they have the right origin. Using the auto feeder, any player will eat these items, even without wanting to.

Steps to Reproduce:
Install indrev with Origins and Lato Origins
Choose "Human" origin
Wear modular helmet with auto-feeder
Run around to lose hunger

** Observed **
As player gets hungry, auto-feeder will consume anything in their hotbar that has a food value defined: Cobblestone, leather armor, a very expensive enchanted netherite sword

** Expected **
Autofeeder only consumes items the player is able to eat

Technical Information:

  • Minecraft: 1.16.5
  • Fabric API: 0.38.2+1.16
  • Industrial Revolution: 1.9.18-BETA
  • Modpack: custom
commented

I don't think this is fixable (at least on my end) since there's no common "canEat" or similar check in Minecraft. I'll keep this open for a while in case someone has a suggestion or in case I missed something, otherwise this won't be fixed.

commented

Maybe making the autofeeder do something similar to Mekanism where you make food paste that you either store in the helmet or similar could work, that way you don't eat food you don't intentionally turn into the paste