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

AccessTransformer can narrow access in dev #11

Closed
FiniteReality opened this issue May 19, 2024 · 2 comments · Fixed by #21
Closed

AccessTransformer can narrow access in dev #11

FiniteReality opened this issue May 19, 2024 · 2 comments · Fixed by #21
Labels
bug Something isn't working

Comments

@FiniteReality
Copy link
Member

I was copy+pasting a few lines and accidentally had this in my AT file:

protected net.minecraft.client.renderer.entity.EntityRenderDispatcher options

This file is public by default, since it's used in DebugRenderer:

if (camera.isInitialized() && minecraft.getEntityRenderDispatcher().options != null) {

However, AccessTransformer seems to have made this protected, which causes Neoform to fail:

/home/dev/Development/Gander/rendering/build/neoForm/neoFormJoined1.20.6-20240429.153634/steps/unzipSources/unpacked/net/minecraft/client/renderer/debug/DebugRenderer.java:249: error: options has protected access in EntityRenderDispatcher
        if (camera.isInitialized() && minecraft.getEntityRenderDispatcher().options != null) {
                                                                           ^
@lukebemish
Copy link
Contributor

NG should use JST for ATs now, as I understand it -- meaning this is likely a flaw on the logic on the JST end, which does not seem to take into account the existing modifier: https://github.com/neoforged/JavaSourceTransformer/blob/main/accesstransformers/src/main/java/net/neoforged/jst/accesstransformers/ApplyATsVisitor.java#L124-L139

@Matyrobbrt
Copy link
Member

Matyrobbrt commented May 19, 2024

This is indeed a JST issue, as it currently doesn't exactly have error reporting.

@Matyrobbrt Matyrobbrt transferred this issue from neoforged/AccessTransformers May 19, 2024
@sciwhiz12 sciwhiz12 added the bug Something isn't working label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants