Make public some casting environment methods#907
Conversation
vgskye
left a comment
There was a problem hiding this comment.
I mean, it's probably possible to use ugly reflection to use these methods, so it's not completely impossible, but yeah LGTM
|
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. |
107cf95 to
7202ed7
Compare
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) |
Robotgiggle
left a comment
There was a problem hiding this comment.
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.
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.