Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking Change: New API #673

Closed
3 of 6 tasks
BlayTheNinth opened this issue Dec 6, 2023 · 2 comments
Closed
3 of 6 tasks

Breaking Change: New API #673

BlayTheNinth opened this issue Dec 6, 2023 · 2 comments
Assignees
Labels
breaking change This issue requires a breaking change to the API or ingame behavior enhancement New features or improvements to existing features pending release This issue is fixed and will be released in the next version

Comments

@BlayTheNinth
Copy link
Member

BlayTheNinth commented Dec 6, 2023

The existing API for Cooking for Blockheads has not aged well. While originally completely based on slots, it has undergone one non-breaking refactor since that allowed it to work better for non-inventory item providers like the sink or ice unit.

However, the overall design and implementations still make it essentially impossible to interact with an item provider without relying on some form of slots, and has grown to be needlessly complex. This resulted in hard to debug issues with kitchen falsely reporting missing ingredients, as well as an inability to support Fabric's ItemStorage providers, limiting extensibility.

To solve this, a new API is being planned that will massively simplify the current code, while also allowing for much greater compatibility. This new API is already being implemented and tested in the unreleased spinoff mod Crafting for Blockheads and the relevant classes can be found here:

Some things not covered by this new design yet:

@BlayTheNinth BlayTheNinth added the enhancement New features or improvements to existing features label Dec 6, 2023
@BlayTheNinth BlayTheNinth self-assigned this Dec 6, 2023
@BlayTheNinth BlayTheNinth pinned this issue Dec 6, 2023
@BlayTheNinth BlayTheNinth added the breaking change This issue requires a breaking change to the API or ingame behavior label Dec 6, 2023
@BlayTheNinth BlayTheNinth moved this to 🎯 Ready for Development in Issues Dec 6, 2023
@BlayTheNinth BlayTheNinth moved this from 🎯 Ready for Development to 📝 Planning in Issues Dec 10, 2023
@BlayTheNinth BlayTheNinth moved this from 📝 Planning to 🌟 Next Items in Issues Jan 2, 2024
@BlayTheNinth BlayTheNinth moved this from 🌟 Next Items to 🔥 In progress in Issues Jan 3, 2024
@BlayTheNinth BlayTheNinth moved this from 🔥 In progress to 🌟 Next Items in Issues Jan 3, 2024
@BlayTheNinth BlayTheNinth moved this from 🌟 Next Items to 🔥 In progress in Issues Jan 7, 2024
@BlayTheNinth BlayTheNinth added the pending release This issue is fixed and will be released in the next version label Jan 9, 2024
@BlayTheNinth BlayTheNinth moved this from 🔥 In progress to 🚀 Pending Release in Issues Jan 9, 2024
@github-project-automation github-project-automation bot moved this from 🚀 Pending Release to 🎉 Done in Issues Feb 26, 2024
@evashort
Copy link

evashort commented Apr 7, 2024

Am I right that this API change allows other mods to add new recipe types by calling CookingForBlockheadsAPI.registerKitchenRecipeHandler() and attaching ForgeCookingForBlockheads.KITCHEN_ITEM_PROCESSOR_CAPABILITY to the desired BlockEntity objects, whereas previously there was no way for other mods to make the Cooking Table menu show recipes not of type RecipeType.CRAFTING or RecipeType.SMELTING?

@BlayTheNinth
Copy link
Member Author

registerKitchenRecipeHandler allows custom recipe class implementations to be supported, but Cooking for Blockheads still only loads CRAFTING and SMELTING.

The goal of KitchenItemProcessor is to potentially allow support for other kitchen devices/machines, but it is fairly limited for now (i.e. it's fire-and-forget the same way the oven works).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This issue requires a breaking change to the API or ingame behavior enhancement New features or improvements to existing features pending release This issue is fixed and will be released in the next version
Projects
Archived in project
Development

No branches or pull requests

2 participants