Skip to content
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
Limeth:feature/recipe-ii
Closed

Generalize recipes and implement them#1188
Limeth wants to merge 3 commits intoSpongePowered:bleedingfrom
Limeth:feature/recipe-ii

Conversation

@Limeth
Copy link
Copy Markdown
Contributor

@Limeth Limeth commented Jan 14, 2017

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 original ItemStack. I could instead provide an ItemStack#copy, but that doesn't make it visually obvious the original item won't change.

@Limeth Limeth changed the title [WIP] Generalize recipes and implement them Generalize recipes and implement them Jan 19, 2017
@Limeth Limeth force-pushed the feature/recipe-ii branch from 23068e7 to a9145a0 Compare February 7, 2017 21:17
@Limeth Limeth force-pushed the feature/recipe-ii branch from a9145a0 to 75c3f0b Compare February 8, 2017 14:34
@Zidane
Copy link
Copy Markdown
Member

Zidane commented Aug 14, 2017

Closing as this has been implemented. Thanks again @Limeth for your work on this, it was much appreciated.

@Zidane Zidane closed this Aug 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants