Werewolves icon indicating copy to clipboard operation
Werewolves copied to clipboard

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

Open Nathan22211 opened this issue 3 years ago • 5 comments

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)

Nathan22211 avatar Aug 13 '21 20:08 Nathan22211

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.

Cheaterpaul avatar Sep 22 '21 12:09 Cheaterpaul

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.

Cheaterpaul avatar Sep 22 '21 12:09 Cheaterpaul

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

KubanczykT avatar Apr 23 '22 19:04 KubanczykT

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.

Cheaterpaul avatar Apr 23 '22 23:04 Cheaterpaul

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

MarioSMB avatar Dec 16 '22 01:12 MarioSMB