Werewolves
Werewolves copied to clipboard
[Feature] Automatically determine if an item is a meat item
What would you like to have changed or added to Werewolves
be able to eat foods that have meat in them, (typically ones with a mob drop in them, as I think that's how you detect if a food is meat)
Does this make the mod experience more balanced?
I'm not entirely sure if this would or not, I tried to make a PHC boiled egg and eat it and was unable to
Can you provide additional resources (etc. textures or models)
Atm there are three ways i detect if the food item is meat:
- a mod author marks the items as meat
- i check if the item is in the
forge:rawmeats
orforge:cookedmeats
item tag - i check if the item's name is in the
customMeatItems
orcustomRawMeatItems
config lists in werewolves server config
While the first way is always final the item tag can be changed with a datapack. Obviously the third way is the easiest to add an item.
The idea to allow to eat meat containing food could be an idea to implement, but the problems that would face are great. As i would need to search for the recipe of that item to determine the meat part of the item which is too complex for the moment.
And for now there are other ways you can add the item as editable.
I leave this open as i might rework the system and then i could include such an idea.
You could check how the origins(forge) mod does this, because it even detects modded items correctly
do they detect that a items is crafted with meat items or only that a foot item is meat?
Food has a isMeat
property that Werewolves uses. But if the food is a Hamburger it will not have this property although it contains meat.
I was curious how they did it, so I checked; it looks like Minecraft supports checking ingredients with net.minecraft.world.item.crafting.Ingredient;
!