Closed akaJuliaan closed 4 years ago
If you turn the refmap remapping off for an injection into a method that will be obfuscated (which Minecraft#getSession
is such a method) it will do this. There is no need for remap = false
.
When I turn it off, ih got this Error on compiling: `> Task :compileJava Potential refmap conflict. Duplicate refmap name mixins.jtools.refmap.json specified for sourceSet main, already defined for sourceSet main Note: SpongePowered MIXIN Annotation Processor Version=0.7.10 Note: ObfuscationServiceMCP supports type: "searge" Note: ObfuscationServiceMCP supports type: "notch" Note: Loading searge mappings from C:\Users\Julian.gradle\caches\minecraft\de\oceanlabs\mcp\mcp_stable\22\srgs\mcp-srg.srg Note: Loading notch mappings from C:\Users\Julian.gradle\caches\minecraft\de\oceanlabs\mcp\mcp_stable\22\srgs\mcp-notch.srg C:\Users\Julian\Documents\JTools-SRC\build\sources\main\java\me\julian\jtools\injection\mixins\MixinMinecraft.java:87: warning: Cannot find target method for @Inject in net.minecraft.client.Minecraft @Inject(method = {"getSession()Lnet/minecraft/client/util/Session;"}, at = {@At("HEAD")}, cancellable = true) ^ C:\Users\Julian\Documents\JTools-SRC\build\sources\main\java\me\julian\jtools\injection\mixins\MixinMinecraft.java:87: error: No obfuscation mapping for @Inject target getSession @Inject(method = {"getSession()Lnet/minecraft/client/util/Session;"}, at = {@At("HEAD")}, cancellable = true) ^ Note: Writing refmap to C:\Users\Julian\Documents\JTools-SRC\build\tmp\compileJava\compileJava-refmap.json C:\Users\Julian\Documents\JTools-SRC\build\sources\main\java\me\julian\jtools\injection\mixins\MixinGuiButton.java:63: warning: @Overwrite is missing javadoc comment public void drawButton(Minecraft mc, int mouseX, int mouseY) { ^ C:\Users\Julian\Documents\JTools-SRC\build\sources\main\java\me\julian\jtools\injection\mixins\MixinGuiConnecting.java:73: warning: @Overwrite is missing an @reason tag private void connect(final String ip, final int port) { ^ C:\Users\Julian\Documents\JTools-SRC\build\sources\main\java\me\julian\jtools\injection\mixins\MixinGuiConnecting.java:117: warning: @Overwrite is missing an @reason tag public void drawScreen(int mouseX, int mouseY, float partialTicks) { ^ C:\Users\Julian\Documents\JTools-SRC\build\sources\main\java\me\julian\jtools\injection\mixins\MixinGuiSlot.java:86: warning: @Overwrite is missing javadoc comment public void drawScreen(int mouseXIn, int mouseYIn, float p_1481283) { ^ C:\Users\Julian\Documents\JTools-SRC\build\sources\main\java\me\julian\jtools\injection\mixins\MixinGuiSlot.java:168: warning: @Overwrite is missing javadoc comment protected int getScrollBarX() { ^ Note: Writing refmap to C:\Users\Julian\Documents\JTools-SRC\build\tmp\compileJava\compileJava-refmap.json Note: Writing searge output SRGs to C:\Users\Julian\Documents\JTools-SRC\build\tmp\compileJava\mcp-srg.srg Note: Writing notch output SRGs to C:\Users\Julian\Documents\JTools-SRC\build\tmp\compileJava\mcp-notch.srg Note: Writing refmap to C:\Users\Julian\Documents\JTools-SRC\build\tmp\compileJava\compileJava-refmap.json Note: Writing refmap to C:\Users\Julian\Documents\JTools-SRC\build\tmp\compileJava\compileJava-refmap.json Note: Writing searge output SRGs to C:\Users\Julian\Documents\JTools-SRC\build\tmp\compileJava\mcp-srg.srg Note: Writing notch output SRGs to C:\Users\Julian\Documents\JTools-SRC\build\tmp\compileJava\mcp-notch.srg 1 error 6 warnings
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':compileJava'.
Compilation failed; see the compiler error output for details.
Try: Run with --info or --debug option to get more log output.
Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details. at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:51) at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37) at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35) at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25) at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:204) at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:189) at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:121) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:179) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:135) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:122) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) ... 28 more
Get more help at https://help.gradle.org
BUILD FAILED in 27s 7 actionable tasks: 5 executed, 2 up-to-date`
I fixed it myself
Error in MinecraftLog:
Mixin apply failed mixins.jtools.json:MixinMinecraft -> net.minecraft.client.Minecraft: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException @Inject annotation on handler$getSession$zze000 could not find any targets matching 'getSession' in the target class net.minecraft.client.Minecraft. Using refmap mixins.jtools.refmap.json org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: @Inject annotation on handler$getSession$zze000 could not find any targets matching 'getSession' in the target class net.minecraft.client.Minecraft. Using refmap mixins.jtools.refmap.json at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.findMethods(InjectionInfo.java:421) at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.readAnnotation(InjectionInfo.java:172) at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:159) at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:151) at org.spongepowered.asm.mixin.injection.struct.CallbackInjectionInfo.<init>(CallbackInjectionInfo.java:44) at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parse(InjectionInfo.java:472) at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1180) at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:900) at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:304) at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:267) at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:353) at org.spongepowered.asm.mixin.transformer.MixinTransformer.apply(MixinTransformer.java:724) at org.spongepowered.asm.mixin.transformer.MixinTransformer.applyMixins(MixinTransformer.java:703) at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:509) at org.spongepowered.asm.mixin.transformer.Proxy.transform(Proxy.java:72) at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at net.minecraft.client.main.Main.main(SourceFile:41) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
SRC:
` @Inject(method = {"getSession()Lnet/minecraft/client/util/Session;"}, at = {@At("HEAD")}, cancellable = true, remap = false) private void getSession(CallbackInfoReturnable cir)
{
In Eclipse all work fine