This repository was archived by the owner on Feb 27, 2024. It is now read-only.
Generalize recipes and implement them#1188
Closed
Limeth wants to merge 3 commits intoSpongePowered:bleedingfrom
Closed
Generalize recipes and implement them#1188Limeth wants to merge 3 commits intoSpongePowered:bleedingfrom
Limeth wants to merge 3 commits intoSpongePowered:bleedingfrom
Conversation
This was referenced Jan 14, 2017
23068e7 to
a9145a0
Compare
a9145a0 to
75c3f0b
Compare
Member
|
Closing as this has been implemented. Thanks again @Limeth for your work on this, it was much appreciated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SpongeAPI|SpongeCommon|SpongeForge
This is a WIP continuation of kashike's PR, with his consent.
It aims to generalize how recipes are registered and handled. Instead of checking the equality of the ingredients, it works by testing ingredient predicates. It also aims to let the user implement the recipe interfaces by themselves, making it, for example, possible to transfer NBT data from the ingredients to the result.
In this PR,
ItemStackSnapshots are used extensively. This is to prevent the user from modifying the originalItemStack. I could instead provide anItemStack#copy, but that doesn't make it visually obvious the original item won't change.