paperweight icon indicating copy to clipboard operation
paperweight copied to clipboard

Error compiling plugin with paperweight dev

Open GriffinCodes opened this issue 2 years ago • 3 comments

In Nexus, for @qixils, doing ./gradlew clean build throws this error

:executing 'apply patches to decompiled jar'
error: patch failed: .gradle/caches/paperweight/setupCache/patchedSourcesJar.jar--1008317708/net/minecraft/core/SectionPos.java:193
error: .gradle/caches/paperweight/setupCache/patchedSourcesJar.jar--1008317708/net/minecraft/core/SectionPos.java: patch does not apply

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':compileJava'.
> Could not resolve all dependencies for configuration ':compileClasspath'.
   > Command finished with 1 exit code: git -c commit.gpgsign=false -c core.safecrlf=false apply --ignore-whitespace /home/lexikiq/Projects/Nexus/.gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/net/minecraft/core/SectionPos.java.patch

For me it throws this error

error: patch failed: .gradle/caches/paperweight/setupCache/patchedSourcesJar.jar-1264333838/net/minecraft/server/network/LegacyQueryHandler.java:12
error: .gradle/caches/paperweight/setupCache/patchedSourcesJar.jar-1264333838/net/minecraft/server/network/LegacyQueryHandler.java: patch does not apply

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':compileJava'.
> Could not resolve all dependencies for configuration ':compileClasspath'.
   > Command finished with 1 exit code: git -c commit.gpgsign=false -c core.safecrlf=false apply --ignore-whitespace /home/griffin/git/Nexus/.gradle/caches/paperweight/setupCache/extractDevBundle.dir/patches/net/minecraft/server/network/LegacyQueryHandler.java.patch

Paper Fork: https://github.com/ProjectEdenGG/Parchment/tree/dev/1.18 Plugin: https://github.com/ProjectEdenGG/Nexus/tree/update/1.18

GriffinCodes avatar Jan 14 '22 04:01 GriffinCodes

tried deleting the caches folder? you have a bad patch pile on from somewhere

electronicboy avatar Jan 14 '22 04:01 electronicboy

Yes, i've deleted .gradle/caches

GriffinCodes avatar Jan 14 '22 04:01 GriffinCodes

I've also had this issue. Updating io.papermc.paperweight.patcher plugin to the one paper uses, and updating the forks remapper, decompiler and paperclip dependencies to be the same as paper (see here), and then removing the caches seems to have resolved the issue for me.

Elioby avatar Jun 05 '22 12:06 Elioby

I've also had this issue. Updating io.papermc.paperweight.patcher plugin to the one paper uses, and updating the forks remapper, decompiler and paperclip dependencies to be the same as paper (see here), and then removing the caches seems to have resolved the issue for me.

This is the correct solution, these versions need to be kept in sync.

jpenilla avatar Sep 13 '22 20:09 jpenilla