diff --git a/src/main/java/de/oceanlabs/mcp/mcinjector/adaptors/ApplyMap.java b/src/main/java/de/oceanlabs/mcp/mcinjector/adaptors/ApplyMap.java index c369549..7ec89f2 100644 --- a/src/main/java/de/oceanlabs/mcp/mcinjector/adaptors/ApplyMap.java +++ b/src/main/java/de/oceanlabs/mcp/mcinjector/adaptors/ApplyMap.java @@ -197,7 +197,11 @@ else if (tmp.getType() != AbstractInsnNode.LABEL) } private boolean isSynthetic(MethodNode mn){ - if ((mn.access & Opcodes.ACC_SYNTHETIC) != 0) return true; + if ((mn.access & Opcodes.ACC_SYNTHETIC) != 0) { + //de-lambdaified methods may be synthetic but actually appear in sourcecode so their args still get renamed + //such methods are private and start with lambda$ + return (mn.access & Opcodes.ACC_PRIVATE) == 0 || !mn.name.startsWith("lambda$"); + } //check for special case pursuant to JLS 13.1.7 //which specifies that are the one and only proper methods that may be generated and not be marked synthetic