User: rednesto Date: 28 Sep 24 19:02 Revision: db1124f82ab28b82d1c715ebdd41c1846622d0aa Summary: Fix #2308 Mixin Inject signature fix adds last parameter as first local TeamCity URL: https://ci.mcdev.io/viewModification.html?tab=vcsModificationFiles&modId=9726&personal=false Index: src/main/kotlin/platform/mixin/handlers/InjectAnnotationHandler.kt =================================================================== --- src/main/kotlin/platform/mixin/handlers/InjectAnnotationHandler.kt (revision dcf7e995ca01890d8a4d31b9c4d6a78e66ccdd92) +++ src/main/kotlin/platform/mixin/handlers/InjectAnnotationHandler.kt (revision db1124f82ab28b82d1c715ebdd41c1846622d0aa) @@ -87,11 +87,11 @@ val resolvedInsns = resolveInstructions(annotation, targetClass, targetMethod).ifEmpty { return@let } for (insn in resolvedInsns) { val locals = LocalVariables.getLocals(module, targetClass, targetMethod, insn.insn) + ?.filterNotNull() ?.drop( Type.getArgumentTypes(targetMethod.desc).size + if (targetMethod.hasAccess(Opcodes.ACC_STATIC)) 0 else 1, ) - ?.filterNotNull() ?.filter { it.desc != null } ?: continue if (commonLocalsPrefix == null) {