Shoulder Surfing Reloaded

Shoulder Surfing Reloaded

2M Downloads

Cannot compile project

pierluigizagaria opened this issue ยท 10 comments

commented

I've updated the maven link for Sponge
https://repo.spongepowered.org/maven
But then I got this error
Circular dependency between the following tasks: :apiClasses \--- :compileApiJava \--- :apiClasses (*)

commented

Should be fixed with the latest commit. Please close the issue if its fixed.

commented

Sorry but nothing changes. How could I help you helping me?

commented

I just tested compiling on a different machine and it worked just fine. Run the following commands and send me the log;
git clone https://github.com/Exopandora/ShoulderSurfing.git
cd ShoulderSurfing
java -version
gradlew build

commented

Here it is

D:\Desktop\VisualStudioCode\java>git clone https://github.com/Exopandora/ShoulderSurfing.git
Cloning into 'ShoulderSurfing'...
remote: Enumerating objects: 822, done.
remote: Counting objects: 100% (822/822), done.
remote: Compressing objects: 100% (348/348), done.
Receiving objects:  94% (2031/2160)sed 756 (delta 257), pack-reused 1338                    92% (1988/2160)
Receiving objects: 100% (2160/2160), 499.77 KiB | 1.80 MiB/s, done.
Resolving deltas: 100% (829/829), done.

D:\Desktop\VisualStudioCode\java>cd ShoulderSurfing

D:\Desktop\VisualStudioCode\java\ShoulderSurfing>java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.282-b08, mixed mode)

D:\Desktop\VisualStudioCode\java\ShoulderSurfing>gradlew build
Starting a Gradle Daemon, 3 stopped Daemons could not be reused, use --status for details

> Configure project :
WARNING: This project is configured to use the official obfuscation mappings provided by Mojang. These mapping fall under their associated license, you should be fully aware of this license. For the latest license text, refer below, or the reference copy here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md, You can hide this warning by running the `hideOfficialWarningUntilChanged` task
WARNING: (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here.  Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula.

Directory 'C:\Program Files\Java\jdk-12.0.2' (Windows Registry) used for java installations does not exist

> Task :compileApiJava
[17:50:59] [main/INFO]: Writing debug log file accesstransform.log
[17:50:59] [main/INFO]: Access Transformer processor running version 1.0.5+4+02b7b69
[17:50:59] [main/INFO]: Command line arguments [--inJar, D:\Desktop\VisualStudioCode\java\ShoulderSurfing\build\fg_cache\net\minecraftforge\forge\1.16.5-36.1.0\forge-1.16.5-36.1.0-injected.jar, --outJar, D:\Desktop\VisualStudioCode\java\ShoulderSurfing\build\fg_cache\net\minecraftforge\forge\1.16.5-36.1.0_mapped_official_1.16.5\forge-1.16.5-36.1.0_mapped_official_1.16.5.jar, --logFile, accesstransform.log, --atFile, D:\Desktop\VisualStudioCode\java\ShoulderSurfing\src\main\resources\META-INF\accesstransformer.cfg, --atFile, D:\Desktop\VisualStudioCode\java\ShoulderSurfing\build\_atJar_5\parent_at.cfg]
[17:50:59] [main/INFO]: Reading from D:\Desktop\VisualStudioCode\java\ShoulderSurfing\build\fg_cache\net\minecraftforge\forge\1.16.5-36.1.0\forge-1.16.5-36.1.0-injected.jar
[17:50:59] [main/INFO]: Writing to D:\Desktop\VisualStudioCode\java\ShoulderSurfing\build\fg_cache\net\minecraftforge\forge\1.16.5-36.1.0_mapped_official_1.16.5\forge-1.16.5-36.1.0_mapped_official_1.16.5.jar
[17:50:59] [main/INFO]: Transformer file D:\Desktop\VisualStudioCode\java\ShoulderSurfing\src\main\resources\META-INF\accesstransformer.cfg
[17:50:59] [main/INFO]: Transformer file D:\Desktop\VisualStudioCode\java\ShoulderSurfing\build\_atJar_5\parent_at.cfg
[17:50:59] [main/WARN]: Found existing output jar D:\Desktop\VisualStudioCode\java\ShoulderSurfing\build\fg_cache\net\minecraftforge\forge\1.16.5-36.1.0_mapped_official_1.16.5\forge-1.16.5-36.1.0_mapped_official_1.16.5.jar, overwriting
[17:51:03] [main/INFO]: JAR transformation complete D:\Desktop\VisualStudioCode\java\ShoulderSurfing\build\fg_cache\net\minecraftforge\forge\1.16.5-36.1.0_mapped_official_1.16.5\forge-1.16.5-36.1.0_mapped_official_1.16.5.jar
Creating SRG -> MCP TSRG

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 44s
9 actionable tasks: 9 executed

Here the minecraft crash

Mixin apply failed shouldersurfing.mixins.json:MixinIngameGui -> net.minecraft.client.gui.IngameGui: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException Critical injection failure: @Redirect annotation on doRenderCrosshair could not find any targets matching 'renderCrosshair' in net.minecraft.client.gui.IngameGui. No refMap loaded. [PREINJECT Applicator Phase -> shouldersurfing.mixins.json:MixinIngameGui -> Prepare Injections ->  -> redirect$zzf000$doRenderCrosshair(Lnet/minecraft/client/settings/PointOfView;)Z -> Parse]
org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @Redirect annotation on doRenderCrosshair could not find any targets matching 'renderCrosshair' in net.minecraft.client.gui.IngameGui. No refMap loaded. [PREINJECT Applicator Phase -> shouldersurfing.mixins.json:MixinIngameGui -> Prepare Injections ->  -> redirect$zzf000$doRenderCrosshair(Lnet/minecraft/client/settings/PointOfView;)Z -> Parse]
	at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.findMethods(InjectionInfo.java:572) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.readAnnotation(InjectionInfo.java:288) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:275) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:267) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.injection.struct.RedirectInjectionInfo.<init>(RedirectInjectionInfo.java:44) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_282] {}
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_282] {}
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_282] {}
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_282] {}
	at org.spongepowered.asm.mixin.injection.struct.InjectionInfo$InjectorEntry.create(InjectionInfo.java:140) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parse(InjectionInfo.java:624) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1247) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1033) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:388) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:223) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.mixin.transformer.MixinTransformationHandler.processClass(MixinTransformationHandler.java:121) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at org.spongepowered.asm.launch.MixinLaunchPlugin.processClass(MixinLaunchPlugin.java:131) ~[mixin-0.8.2.jar:0.8.2+unknown-b0.git-unknown] {}
	at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) ~[modlauncher-8.0.9.jar:8.0.9+86+master.3cf110c] {}
	at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) ~[modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.9.jar:?] {re:classloading}
	at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.9.jar:?] {re:classloading}
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_282] {}
	at java.lang.Class.getDeclaredFields0(Native Method) ~[?:1.8.0_282] {}
	at java.lang.Class.privateGetDeclaredFields(Class.java:2583) ~[?:1.8.0_282] {}
	at java.lang.Class.getDeclaredFields(Class.java:1916) ~[?:1.8.0_282] {}
	at net.optifine.reflect.FieldLocatorTypes.<init>(FieldLocatorTypes.java:25) ~[?:?] {re:classloading}
	at net.optifine.reflect.Reflector.<clinit>(Reflector.java:501) ~[?:?] {re:classloading}
	at net.minecraft.crash.CrashReport.func_71504_g(CrashReport.java:101) ~[?:?] {re:classloading,xf:OptiFine:default}
	at net.minecraft.crash.CrashReport.<init>(CrashReport.java:54) ~[?:?] {re:classloading,xf:OptiFine:default}
	at net.minecraft.crash.CrashReport.func_230188_h_(CrashReport.java:425) ~[?:?] {re:classloading,xf:OptiFine:default}
	at net.minecraft.client.main.Main.main(Main.java:122) ~[minecraft-1.16.5-client.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_282] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_282] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_282] {}
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_282] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.1.0-launcher.jar:36.1] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {}
	at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:50) [ForgeWrapper-1.4.2.jar:?] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_282] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_282] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_282] {}
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_282] {}
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?] {}
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?] {}
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] {}
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?] {}
commented

Well that runtime error is due to switching to official mappings from my last commit

commented

So what should I do?

commented

Now it compiles but minecraft crashes because it cannot find shouldersurfing.refmap.json

commented

The file should be autogenerated when compiling. Make sure you do not have any spaces in your project path.

commented

Either wait until i find a solution or do the following:

  1. Clone this repo again (latest commit)
  2. Change line 57 in build.gradle from
    mappings channel: 'official', version: '1.16.5' to
    mappings channel: 'snapshot', version: '20201028-1.16.3'
  3. Delete the src folder
  4. Copy the src from this repo
  5. Run gradlew build
commented

This turns out to be an issue with mixingradle. It currently does not seem to work on gralde 6.8.1 and/or forgegradle 4. Currently the only solution is to use forgegradle 3 (and mcp mappings).