Giter Club home page Giter Club logo

Comments (5)

Cheaterpaul avatar Cheaterpaul commented on July 24, 2024

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.

from werewolves.

Cheaterpaul avatar Cheaterpaul commented on July 24, 2024

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.

from werewolves.

KubanczykT avatar KubanczykT commented on July 24, 2024

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

from werewolves.

Cheaterpaul avatar Cheaterpaul commented on July 24, 2024

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.

from werewolves.

MarioSMB avatar MarioSMB commented on July 24, 2024

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

from werewolves.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.