MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Allow dynamic selectors to choose the class to perform member lookups in

Open Bawnorton opened this issue 1 year ago • 0 comments

Motivation

MixinSquared's @TargetHandler is a dynamic selector which targets merged handlers, the accepted references are the name of the mixin and the original name of the handler. The method targeting is the same as @At.method but the members are declared in the mixin class specified by the mixin attribute, thus, when looking up members for a @TargetHandler selector, the class specified in mixin would be the one to lookup. Mcdev's member lookups work off the target class specified in the @Mixin annotation, thus, this change is needed to allow the lookup to occur in a different class.

This pr also fixes namespace lookup as you do not have to declare the namespace for a dynamic selector in the annotation and can instead declare it at registration.

See #2287

Bawnorton avatar May 07 '24 17:05 Bawnorton