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

allow multiple build actions per recipemap #2278

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Conversation

TechLord22
Copy link
Member

@TechLord22 TechLord22 commented Dec 10, 2023

What

Allows multiple build actions per RecipeMap. This prevents addons having to copy paste the default ones and add to them. Also prevents addons overwriting each other.

Requires build actions to have an associated ResourceLocation to denote them. Also allows removal via this location.

Potential Compatibility Issues

Is not backwards compatible. Build actions now have a required namespace field, which cannot be inferred on our end for backwards-compatibility.

@TechLord22 TechLord22 requested a review from a team as a code owner December 10, 2023 04:33
@TechLord22 TechLord22 added the type: feature New feature or request label Dec 10, 2023
@TechLord22 TechLord22 added this to the 2.9 milestone Dec 12, 2023
@@ -197,7 +197,8 @@ public final class RecipeMaps {
@ZenProperty
public static final RecipeMap<AssemblyLineRecipeBuilder> ASSEMBLY_LINE_RECIPES = new RecipeMapAssemblyLine<>(
"assembly_line", new AssemblyLineRecipeBuilder(), AssemblyLineUI::new)
.onRecipeBuild(AssemblyLineManager::createDefaultResearchRecipe);
.onRecipeBuild(gregtechId("default_research_recipe"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this one use onRecipeBuild instead of onBuild?

Copy link
Member Author

Choose a reason for hiding this comment

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

This RecipeMap does not utilize RecipeMapBuilder, and therefore must call RecipeMap#onRecipeBuild instead.

@TechLord22 TechLord22 merged commit edbdaf4 into master Mar 28, 2024
3 checks passed
@TechLord22 TechLord22 deleted the tc-onbuild-list branch March 28, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants