Skip to content

Fix ambiguous methods in KubeJS interop#4525

Merged
jurrejelle merged 9 commits intoGregTechCEu:1.20.1from
screret:sc/fix-ambigious-kjs-methods
Feb 8, 2026
Merged

Fix ambiguous methods in KubeJS interop#4525
jurrejelle merged 9 commits intoGregTechCEu:1.20.1from
screret:sc/fix-ambigious-kjs-methods

Conversation

@screret
Copy link
Contributor

@screret screret commented Jan 31, 2026

What

This PR fixes all of the Rhino ambiguous method errors that I know of. Most of them were caused by overloaded methods, though some were from arguments 1.20 KubeJS doesn't have type wrappers for.

Implementation Details

Multiple methods were entirely hidden from KJS and replaced with one that accepts parameters KubeJS can parse properly.
Others, namely GTOreDefinition#veinGenerator, was annotated with @RemapForJS to rename it so as to not conflict with a lombok-generated getter.

Outcome

Less annoying to debug method conflicts in KubeJS.

How Was This Tested

Ran tests, tests ran. Also tested a simple KJS script that used the relevant methods, which worked.

Additional Information

The JVM ignores unknown annotations, so not having KubeJS/Rhino installed won't cause any errors.

Potential Compatibility Issues

Anyone using BedrockFluidDefinition.Builder#dimensions(String...) or BedrockOreDefinition.Builder#dimensions(String...) will have to fix their code, but they shouldn't have been using that method anyway as it's always been intended for KubeJS use only.

@screret screret requested a review from a team as a code owner January 31, 2026 13:37
@screret
Copy link
Contributor Author

screret commented Jan 31, 2026

update: reverted the OreVeinUtil optimization for now

@YoungOnionMC
Copy link
Member

shouldn't this target 8.0 instead?

@jurrejelle jurrejelle merged commit 30fce02 into GregTechCEu:1.20.1 Feb 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants