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

Recipe Rewrite (API Only) #4093

Closed

Conversation

SchnTgaiSpock
Copy link
Contributor

@SchnTgaiSpock SchnTgaiSpock commented Jan 15, 2024

Description

This PR supersedes #4078

Description from #4078

Hey guys, this is my attempt at the recipe rewrite.

I have written up an ADR that goes over how the new API currently works, but in short:

  • Recipe system sucks
  • Can't translate recipes in the dispenser (like crafting Copper Wire on the top row)
  • Items can only have one* recipe (mostly)
  • Can't have true shapeless recipes

Any feedback on the API or discussion around the new recipe system in general would be greatly appreciated!

Proposed changes

  • Adds a new recipe API which:
    • Allows recipe inputs with multiple options (e.g. Vanilla/Slimefun Copper)
    • Allows true shaped/shapeless recipes (does not replace the old versions)
    • Allows machines and workstations to search recipes more efficiently

Related Issues (if applicable)

N/A

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
  • I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • I added sufficient Unit Tests to cover my code.

@SchnTgaiSpock SchnTgaiSpock requested a review from a team as a code owner January 15, 2024 19:06
@SchnTgaiSpock SchnTgaiSpock changed the title add new recipe api Recipe Rewrite (API Only) Jan 15, 2024
@github-actions github-actions bot added the 🔧 API This Pull Request introduces API changes. label Jan 15, 2024
Copy link
Contributor

Your Pull Request was automatically labelled as: "🔧 API"
Thank you for contributing to this project! ❤️

Copy link
Contributor

@J3fftw1 J3fftw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get unit tests on this?

@SchnTgaiSpock
Copy link
Contributor Author

yup thats my prio rn

@SchnTgaiSpock SchnTgaiSpock mentioned this pull request Jan 15, 2024
7 tasks
Copy link
Contributor

github-actions bot commented Jan 15, 2024

Slimefun preview build

A Slimefun preview build is available for testing!
Commit: 0e8b2632

https://preview-builds.walshy.dev/download/Slimefun/4093/0e8b2632

Note: This is not a supported build and is only here for the purposes of testing.
Do not run this on a live server and do not report bugs anywhere but this PR!

@SchnTgaiSpock
Copy link
Contributor Author

unit tests should be done, if i missed something lmk

@TheBusyBot TheBusyBot added the ⚡ Merge Conflicts This Pull Request has merged conflicts which need to be resolved! label Feb 17, 2024
@JustAHuman-xD
Copy link
Contributor

Might be worth waiting for the item stack component changes before doing much more with this

@TheBusyBot TheBusyBot removed the ⚡ Merge Conflicts This Pull Request has merged conflicts which need to be resolved! label Mar 22, 2024
@SchnTgaiSpock SchnTgaiSpock mentioned this pull request Nov 4, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 API This Pull Request introduces API changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants