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

Does not recognize method-local classes #2433

Open
FamroFexl opened this issue Jan 22, 2025 · 0 comments
Open

Does not recognize method-local classes #2433

FamroFexl opened this issue Jan 22, 2025 · 0 comments

Comments

@FamroFexl
Copy link

FamroFexl commented Jan 22, 2025

Minecraft Development for IntelliJ plugin version

2024.2-1.8.2

IntelliJ version

2024.2.3

Operating System

Windows

Target platform

Fabric

Description of the bug

I recently had a method I was trying to modify. It sat inside a method-local class which was inside a regular class constructor. For further information, I'll include the class flow below.

public final class RandomState {
    private RandomState(...) {
        class NoiseWiringHelper implements DensityFunction.Visitor {
            @Override
            public DensityFunction.NoiseHolder visitNoise(DensityFunction.NoiseHolder noiseHolder) {} <<< Target method
        }
    }
}

When I attempted to mixin the method-local class, MCDev did recognize the method-local class NoiseWiringHelper as RandomState$1NoiseWiringHelper. However, when I went to write a inject, none of the suggestions/autofill ever appeared, meaning it wouldn't give me visitNoise as an option.

I believe this is a limitation of MCDev. While it can suggest methods in regular and nested classes, it is unable to do so in method-local classes.

@FamroFexl FamroFexl changed the title Plugin does not recognize anonymous classes Does not recognize method local classes Jan 22, 2025
@FamroFexl FamroFexl changed the title Does not recognize method local classes Does not recognize method-local classes Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant