Werewolves - Become a Beast!

Werewolves - Become a Beast!

2M Downloads

[Feature] Automatically determine if an item is a meat item

Nathan22211 opened this issue ยท 5 comments

commented

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)

commented

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 or forge:cookedmeats item tag
  • i check if the item's name is in the customMeatItems or customRawMeatItems 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.

commented

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.

commented

You could check how the origins(forge) mod does this, because it even detects modded items correctly

commented

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.

commented

I was curious how they did it, so I checked; it looks like Minecraft supports checking ingredients with net.minecraft.world.item.crafting.Ingredient;!