Skip to content

Incompaitible mixin of MouseHandler #10

@Yefancy

Description

@Yefancy

https://github.com/ReplayMod/jGui/blob/master/src/main/java/de/johni0702/minecraft/gui/versions/mixin/MixinMouseListener.java#L21-L22

@Mixin(Mouse.class)
public abstract class MixinMouseListener {
    @Accessor // Note: for some reason Mixin doesn't include this in the refmap json if it's just a @Shadow field
    abstract int getActiveButton();
}

this is incompatible with accessors from other mods. Because this access permission is only for the protected method.
if any other mixin attempts to do the same like

@Mixin(Mouse.class)
public interface MouseHandlerAccessor {
    @Accessor int getActiveButton();
}

they will throw an exception when accessing it (even code impl here is recommned from mixin doc)

I notice that you said you are not allowed to use @Shadow here you. but you'd better use your own method instead, if you want to keep it protected.

@Mixin(Mouse.class)
public abstract class MixinMouseListener {
    @Accessor( "activeButton")
    abstract int jgui$getActiveButton();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions