Skip to content

Readd KubeJS GT registry event#4826

Open
screret wants to merge 20 commits into
GregTechCEu:1.21from
screret:sc/readd-kubejs-gt-registry-event
Open

Readd KubeJS GT registry event#4826
screret wants to merge 20 commits into
GregTechCEu:1.21from
screret:sc/readd-kubejs-gt-registry-event

Conversation

@screret
Copy link
Copy Markdown
Contributor

@screret screret commented May 11, 2026

What

Adds back GTCEuStartupEvents.registry.

Implementation Details

A plain copy of the existing KubeJS registry event with KubeResourceLocation switched out for GTResourceLocation so it defaults to the GT namespace unless otherwise specified.
The registry event handler class, which is also copied from KubeJS, also contains some additional handing for our special wrapper builders.

Outcome

@Ghostipedia can be happy again

How Was This Tested

The script I used for testing
Implcit GT namespace test
Implcit KubeJS namespace test
Explicit namespace test
Explicit namespace test 2

Potential Compatibility Issues

GTRecipeTypes.register(String, String, RecipeType...) is now protected, as it forced addons to either register their recipe types to the GT namespace implicitly or copy the function. Use the new register(ResourceLocation, String, RecipeType...) method instead.

@screret screret requested a review from a team as a code owner May 11, 2026 06:15
@github-actions github-actions Bot added the 1.21 label May 11, 2026
Copy link
Copy Markdown
Member

@htmlcsjs htmlcsjs left a comment

Choose a reason for hiding this comment

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

very cursory skim of the code, just some things that looked off to me. Further testing is needed but idk how much is warranted here vs full scale integration tests when 1.21 is much closer to releasing

Comment thread gradle/scripts/moddevgradle.gradle Outdated
Comment thread gradle/scripts/moddevgradle.gradle Outdated
Comment thread gradle/scripts/moddevgradle.gradle Outdated
Comment thread gradle/scripts/resources.gradle Outdated
Comment thread dependencies.gradle
@gustovafing gustovafing added ignore changelog PR should not be added to the changelog. Release: API - X.0.0 Major Breaking Refactors that MUST be in a API-Breaking Release labels May 11, 2026
Copy link
Copy Markdown
Member

@gustovafing gustovafing left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.21 ignore changelog PR should not be added to the changelog. Release: API - X.0.0 Major Breaking Refactors that MUST be in a API-Breaking Release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants