[Mod Interaction] [Origins] Dietary restrictions as dictated by one's chosen origin are bypassed by the autofeeding backpack upgrade
Not-February opened this issue ยท 2 comments
Describe the bug
After #216 it occurred to me to test the "conditionally edible" factor of food items with Origins as well, and can confirm it has the same kind of potentially exploitative behavior.
If you choose an origin that has dietary restrictions in some way, these can be completely bypassed by eating the problematic items directly from your backpack with a feeding upgrade.
To Reproduce
Steps to reproduce the behavior:
- Choose an origin with dietary restriction like arachnid or avian while dietary restrictions are enabled through Origins' server config
- Equip a backpack with an autofeeding upgrade
- Put a food item you normally cannot eat(meat for avians, anything that ISN'T meat for arachnids; I tested with raw chicken) into the backpack
- Have your backpack feed you the item when you get hungry.
- Try to eat the same item while hungry manually to double check that you are not intended to eat the item
Expected behavior
When dietary restrictions are enabled in Origins, it becomes impossible to 'use' a food item that is tagged(or not tagged with under some circumstances) with a specific thing; by default, Origins tags vanilla meat items with origins:meat
and uses this tag to check whether a player is allowed to eat the given item or not. Anything tagged with origins:ignore_diet
can also be eaten by any origin regardless of other dietary restrictions.
I would expect that players are not be able to completely bypass this system by using a backpack upgrade.
Versions
Minecraft 1.16.5
Forge 36.2.2
Architectury API(Forge) 1.20.29
Caelus API (Forge) 2.1.3.0
Cloth Config API (Forge) 4.11.26
Origins (Forge) 0.7.3.9
Sophisticated Backpacks 3.2.4.316
And just added a bit of additional code to pass correct stack so that Origins can check it as well for their logic