Skip to content

Mixin parameter autocomplete fails for vararg methods #763

@UpcraftLP

Description

@UpcraftLP
  • Minecraft Development for IntelliJ plugin version: 2020.2-1.5.0
  • IntelliJ version: 2020.2 (Ultimate Edition)
  • Operating System: Windows 10 Insider Preview
  • Target platform: Fabric/Mixin

While updating my mod from MC1.16.1 to 1.16.2-rc1 I came across a small bug when letting mixin autocomplete method signatures:

target method:

public ResourcePackManager(ResourcePackProfile.Factory factory, ResourcePackProvider... resourcePackProviders) {
	// ...
}

when creating the following mixin method:

@Inject(method = "<init>(Lnet/minecraft/resource/ResourcePackProfile$Factory;[Lnet/minecraft/resource/ResourcePackProvider;)V", at = @At("RETURN"))
    public void construct() {}

the autocompletion simply copies the vararg declaration, resulting in an invalid method signature (due to the CallbackInfo parameter being after a vararg parameter).

@Inject(method = "<init>(Lnet/minecraft/resource/ResourcePackProfile$Factory;[Lnet/minecraft/resource/ResourcePackProvider;)V", at = @At("RETURN"))
    public void construct(ResourcePackProfile.Factory factory, ResourcePackProvider... resourcePackProviders, CallbackInfo ci) {}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions