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

Crafting Component Refactor #2652

Merged
merged 5 commits into from
Jan 4, 2025
Merged

Crafting Component Refactor #2652

merged 5 commits into from
Jan 4, 2025

Conversation

YoungOnionMC
Copy link
Member

@YoungOnionMC YoungOnionMC commented Dec 26, 2024

What

Refactor of the CraftingComponent class for better usability in addons and kube

Implementation Details

Fixed CraftingComponents to only allow TagKey<Item>s, ItemStacks or MaterialEntries for each entry in the tier list, capped the list to GTValues.V.length and forced fallbacks when making a new crafting component(wasn't strictly needed beforehand)
Also reworked and added more helper methods for KubeJS to edit and make more crafting components/fallbacks/entries in a clearer manner.

Outcome

Adding or modifying recipe components should be simpler now

Potential Compatibility Issues

Kube scripts will have to update is they use or make crafting components for recipes, class path changing as well occurred.

@YoungOnionMC YoungOnionMC added the type: refactor Suggestion to refactor a section of code label Dec 29, 2024
@YoungOnionMC YoungOnionMC marked this pull request as ready for review December 29, 2024 23:22
@YoungOnionMC YoungOnionMC requested a review from a team as a code owner December 29, 2024 23:22
@screret screret merged commit 8aaf410 into 1.20.1 Jan 4, 2025
2 checks passed
@screret screret deleted the yo/crafting-component-refactor branch January 4, 2025 09:45
krossgg added a commit that referenced this pull request Jan 10, 2025
krossgg pushed a commit that referenced this pull request Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants