teaconmc / SlideShow

Simple slide show projector in Minecraft.
BSD 3-Clause "New" or "Revised" License
39 stars 24 forks source link

[Question] How can I compile it for 1.17.1 ? #17

Closed vvbv closed 1 year ago

vvbv commented 2 years ago

How can I compile it for 1.17.1 ? I downloaded the repository, made the switch to the version 1.17 branch, and tried to build it, but I get the following message.

Additional data: I have no experience with gradle, it doesn't seem to generate any .jar, and I don't know how I can resolve the deprecations shown in the message.

Thanks for the help.

openjdk version "17.0.3" 2022-04-19 OpenJDK Runtime Environment (build 17.0.3+7-Ubuntu-0ubuntu0.20.04.1) OpenJDK 64-Bit Server VM (build 17.0.3+7-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)

To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.1.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 

> 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.
Resolution of the configuration :runtimeClasspathCopy was attempted from a context different than the project context. Have a look at the documentation to understand why this is a problem and how it can be resolved. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. See https://docs.gradle.org/7.1.1/userguide/viewing_debugging_dependencies.html#sub:resolving-unsafe-configuration-resolution-errors for more details.
Resolution of the configuration :minecraftCopy was attempted from a context different than the project context. Have a look at the documentation to understand why this is a problem and how it can be resolved. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. See https://docs.gradle.org/7.1.1/userguide/viewing_debugging_dependencies.html#sub:resolving-unsafe-configuration-resolution-errors for more details.
Resolution of the configuration :runtimeClasspathCopy2 was attempted from a context different than the project context. Have a look at the documentation to understand why this is a problem and how it can be resolved. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. See https://docs.gradle.org/7.1.1/userguide/viewing_debugging_dependencies.html#sub:resolving-unsafe-configuration-resolution-errors for more details.
Resolution of the configuration :minecraftCopy2 was attempted from a context different than the project context. Have a look at the documentation to understand why this is a problem and how it can be resolved. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. See https://docs.gradle.org/7.1.1/userguide/viewing_debugging_dependencies.html#sub:resolving-unsafe-configuration-resolution-errors for more details.
Resolution of the configuration :runtimeClasspathCopy3 was attempted from a context different than the project context. Have a look at the documentation to understand why this is a problem and how it can be resolved. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. See https://docs.gradle.org/7.1.1/userguide/viewing_debugging_dependencies.html#sub:resolving-unsafe-configuration-resolution-errors for more details.
Resolution of the configuration :minecraftCopy3 was attempted from a context different than the project context. Have a look at the documentation to understand why this is a problem and how it can be resolved. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. See https://docs.gradle.org/7.1.1/userguide/viewing_debugging_dependencies.html#sub:resolving-unsafe-configuration-resolution-errors for more details.

> Task :help

Welcome to Gradle 7.1.1.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 7s
1 actionable task: 1 executed
3TUSK commented 1 year ago

The command you are looking for is ./gradlew build if you are on macOS or a Linux distro, or just gradlew build if you are on Windows.

vvbv commented 1 year ago

I was able to compile it with Java 16.0.x updating the 'com.github.johnrengelman.shadow' version to '7.1.2', but now I got a new error Java.lang.ExceptionInInitializerError: null, If you can help me solve it I would appreciate it.

--- System Details ---
    Minecraft Version: 1.17.1
    Minecraft Version ID: 1.17.1
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 16.0.1, Microsoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft

image

---- Minecraft Crash Report ----
// There are four lights!

Time: 21/08/22, 5:18 p. m.
Description: Mod loading error has occurred

java.lang.Exception: Mod Loading has failed
    at net.minecraftforge.fmllegacy.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:69) ~[forge-1.17.1-37.1.1-universal.jar%2397!:?] {re:classloading}
    at net.minecraftforge.fmlclient.ClientModLoader.completeModLoading(ClientModLoader.java:185) ~[forge-1.17.1-37.1.1-universal.jar%2397!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.lambda$new$1(Minecraft.java:555) ~[client-1.17.1-20210706.113038-srg.jar%2393!:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.Util.m_137521_(Util.java:507) ~[client-1.17.1-20210706.113038-srg.jar%2393!:?] {re:classloading,xf:OptiFine:default}
    at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:549) ~[client-1.17.1-20210706.113038-srg.jar%2393!:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.gui.screens.LoadingOverlay.m_6305_(LoadingOverlay.java:196) ~[client-1.17.1-20210706.113038-srg.jar%2393!:?] {re:classloading,xf:OptiFine:default}
    at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:1252) ~[client-1.17.1-20210706.113038-srg.jar%2393!:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
    at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1039) ~[client-1.17.1-20210706.113038-srg.jar%2393!:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:659) ~[client-1.17.1-20210706.113038-srg.jar%2393!:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:186) ~[client-1.17.1-20210706.113038-srg.jar%2393!:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.17.1-37.1.1.jar%2323!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%235!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%235!:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%235!:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%235!:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%235!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%235!:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%235!:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {}

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at java.lang.Class.getDeclaredField(Class.java:2549) ~[?:?] {re:mixin}
-- MOD slide_show --
Details:
    Caused by 0: java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method) ~[?:?] {re:mixin}
        at java.lang.Class.forName(Class.java:466) ~[?:?] {re:mixin}
        at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.lambda$inject$6(AutomaticEventSubscriber.java:75) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
        at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?] {re:mixin}
        at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:62) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
        at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:91) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
        at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:120) ~[fmlcore-1.17.1-37.1.1.jar%2394!:?] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800) ~[?:?] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1792) ~[?:?] {}
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) ~[?:?] {}
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) ~[?:?] {}
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) ~[?:?] {re:computing_frames}
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) ~[?:?] {re:computing_frames}
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?] {}

    Caused by 1: net.minecraftforge.fml.util.ObfuscationReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: pixels
        at net.minecraftforge.fml.util.ObfuscationReflectionHelper.findField(ObfuscationReflectionHelper.java:241) ~[fmlcore-1.17.1-37.1.1.jar%2394!:?] {}
        at org.teacon.slides.renderer.SlideState.<clinit>(SlideState.java:46) ~[SlideShow-0.5.4.jar%2389!:0.5.4] {re:classloading}
        at java.lang.Class.forName0(Native Method) ~[?:?] {re:mixin}
        at java.lang.Class.forName(Class.java:466) ~[?:?] {re:mixin}
        at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.lambda$inject$6(AutomaticEventSubscriber.java:75) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
        at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?] {re:mixin}
        at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:62) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
        at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:91) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
        at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:120) ~[fmlcore-1.17.1-37.1.1.jar%2394!:?] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800) ~[?:?] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1792) ~[?:?] {}
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) ~[?:?] {}
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) ~[?:?] {}
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) ~[?:?] {re:computing_frames}
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) ~[?:?] {re:computing_frames}
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?] {}

    Mod File: SlideShow-0.5.4.jar
    Failure message: Slide Show (slide_show) has failed to load correctly
        java.lang.ExceptionInInitializerError: null
    Mod Version: 0.5.4
    Mod Issue URL: NOT PROVIDED
    Exception message: java.lang.NoSuchFieldException: pixels
Stacktrace:
    at java.lang.Class.getDeclaredField(Class.java:2549) ~[?:?] {re:mixin}
    at net.minecraftforge.fml.util.ObfuscationReflectionHelper.findField(ObfuscationReflectionHelper.java:235) ~[fmlcore-1.17.1-37.1.1.jar%2394!:?] {}
    at org.teacon.slides.renderer.SlideState.<clinit>(SlideState.java:46) ~[SlideShow-0.5.4.jar%2389!:0.5.4] {re:classloading}
    at java.lang.Class.forName0(Native Method) ~[?:?] {re:mixin}
    at java.lang.Class.forName(Class.java:466) ~[?:?] {re:mixin}
    at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.lambda$inject$6(AutomaticEventSubscriber.java:75) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
    at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?] {re:mixin}
    at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:62) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:91) ~[javafmllanguage-1.17.1-37.1.1.jar%2395!:?] {}
    at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:120) ~[fmlcore-1.17.1-37.1.1.jar%2394!:?] {}
    at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800) ~[?:?] {}
    at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1792) ~[?:?] {}
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) ~[?:?] {}
    at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) ~[?:?] {}
    at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) ~[?:?] {re:computing_frames}
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) ~[?:?] {re:computing_frames}
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?] {}