Skip to content

Make public some casting environment methods#907

Merged
Robotgiggle merged 1 commit into
FallingColors:mainfrom
miyucomics:open-protected-fields
May 10, 2026
Merged

Make public some casting environment methods#907
Robotgiggle merged 1 commit into
FallingColors:mainfrom
miyucomics:open-protected-fields

Conversation

@miyucomics
Copy link
Copy Markdown
Contributor

I can think of at least a few cases in addons where a person would want to perform their own search of what a casting environment has to offer. Features in base generally shouldn't be done just for addons but I don't see why these very useful methods should be protected and it's currently impossible to access them with usual techniques like invokers because one of the parameters is also a protected enum. Access wideners also don't work because those exclusively only work for base Minecraft classes, not other mods.

Copy link
Copy Markdown
Member

@vgskye vgskye left a comment

Choose a reason for hiding this comment

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

I mean, it's probably possible to use ugly reflection to use these methods, so it's not completely impossible, but yeah LGTM

@object-Object
Copy link
Copy Markdown
Member

hmm, should we count this as a breaking change? it seems like it won't affect existing mod builds, but I think any addon that implements these methods would get a compilation error after this change.

@object-Object object-Object force-pushed the main branch 4 times, most recently from 107cf95 to 7202ed7 Compare November 22, 2025 22:04
@poolcritter
Copy link
Copy Markdown

hmm, should we count this as a breaking change? it seems like it won't affect existing mod builds, but I think any addon that implements these methods would get a compilation error after this change.

assuming they didn't publish it, they'd have a compile error + linkage error at runtime. this can be fixed ahead-of-time by publishing the methods (conveniently I already do so)

Copy link
Copy Markdown
Member

@Robotgiggle Robotgiggle left a comment

Choose a reason for hiding this comment

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

As long as existing builds work alongside this I think it's fine - compilation errors when building an addon can pretty easily be fixed since you likely have the code open to build it anyway.

@Robotgiggle Robotgiggle added this pull request to the merge queue May 10, 2026
Merged via the queue into FallingColors:main with commit 6d80e8d May 10, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from 📋 Backlog to ✅ Done in Hex Casting May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

5 participants