Jump to content

Make recipe require not rotten ingredient?


dangalong

Recommended Posts

How can I make a custom recipe detect if a required food ingredient is rotten before using it, and if so then not allow the desired result to be created? I'm guessing this has to be done in lua? Or can it be done at all? If so, can someone post an example of simple code that would be needed to make X recipe check for freshness on Y item, and if Y is not rotten then Z item is given, and if Y is rotten then Z item is not given to player? So that only fresh or halfway fresh items can be used by the recipe, is what I'm aiming for. Either that or just eliminate the context option to perform the recipe altogether if the required ingredient in player inventory is fully rotten? I don't know which would be easier. Help would be appreciated, I've been looking at other food mods to get ideas, and have yet to find one where this sort of thing was done.

Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...