#build-tooling-help
1 messages · Page 9 of 1
yeah, that works. tbh, I too would find it useful to be able to run the client from the IDE so I can use the debugger to debug interactions with the server
I have set that up before in the past with mcp reborn but I remember it was a PAIN to get it to work in online mode
like you gotta specify 400 startup flags for the client
yeah 100%
previously while i was debugging status messages, iirc i edited some of the code and re-ran to add additionally logging
Heyyy everyone! I was wondering if someone could help me build WorldEdit? #paper-help message
Any advice?
If you don't care about logging into Mojang and don't care about sounds it's only like 3 or 4 args ^^
Which should be good enough for all debugging purposes, right?
that doesn't tell us much, run the build with the --stacktrace option
foojay-resolver doesn't support Java 21 yet?
Does the current setup allow adding extra args in the build.gradle ?
Like if someone did want to specify asset index/directory + or an access token from an existing launcher
I'd imagine they mean of the resolver, not java...
oh
it's 8.0.0
Execution failed for task ':runServer'.
> Failed to calculate the value of task ':runServer' property 'javaLauncher'.
> Unable to download toolchain matching the requirements ({languageVersion=21, vendor=JETBRAINS, implementation=vendor-specific}) from 'https://api.foojay.io/disco/v3.0/ids/b57d293a38ff8dec8d7ae748a8128e0e/redirect'.
> Provisioned toolchain 'C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1' could not be probed: Unexpected command output:
[0.012s][warning][cds] This file is not the one used while building the shared archive file: C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules
[0.012s][warning][cds] This file is not the one used while building the shared archive file: C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules
[0.012s][warning][cds] C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules size has changed.
GRADLE_PROBE_VALUE:C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1
GRADLE_PROBE_VALUE:21.0.2
GRADLE_PROBE_VALUE:JetBrains s.r.o.
GRADLE_PROBE_VALUE:OpenJDK Runtime Environment
GRADLE_PROBE_VALUE:21.0.2+13-b375.1
GRADLE_PROBE_VALUE:OpenJDK 64-Bit Server VM
GRADLE_PROBE_VALUE:21.0.2+13-b375.1
GRADLE_PROBE_VALUE:JetBrains s.r.o.
GRADLE_PROBE_VALUE:amd64
It works with 17
eeeerrrrrrrrrr, either there is something weird with that JDK install or foojays stuff is being weird
it supports 21 in general just fine
you told it to use jetbrains
Is there something wrong in here?
yeah but for runtime i'm using jebrain's one
foojay tried to download the jetbrains one due to the projects config
and for some reason blew up
adoptium doesn't work too
the fact that you have CDS complaining is somewhat weird, too
what is CDS
it's a java mechanism that speeds up server startup by precompiling some stuff
cds complaining about files changing is generally weird, but, I'm not a windows user, so, idk how you'd go about diagnosing that sorta thing without just wiping the gradle jdks folder
tried that but doesn't work 😢
why it works with 17 even though I don't have 17 installed on my machine or IDE
You need to work out why the cds messages are being spat out
like, that is likely the issue here
it's bitching that the process pat out some command output it didn't expect
tasks.withType(AbstractRun::class) {
javaLauncher = javaToolchains.launcherFor {
vendor = JvmVendorSpec.JETBRAINS
languageVersion = JavaLanguageVersion.of(21)
}
jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods")
}
is there something wrong here
u mean it has nothing to do with java version?
I mean, maybe jetbrains fucked up their package

what
where should I run those commands
in jdk path?
[0.442s][error][cds] Unable to create shared archive file C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot\bin\server\classes.jsa: (I/O error).
[0.443s][error][cds] An error has occurred while writing the shared archive file.
it's an issue with the JBR runtime
so you'd need to go mess with its files in the .gradle folder
and if you want to regen them, you would need to directly run that runtime that is having issues
Execution failed for task ':runServer'.
> Failed to calculate the value of task ':runServer' property 'javaLauncher'.
> Unable to download toolchain matching the requirements ({languageVersion=21, vendor=JETBRAINS, implementation=vendor-specific}) from 'https://api.foojay.io/disco/v3.0/ids/b57d293a38ff8dec8d7ae748a8128e0e/redirect'.
> Provisioned toolchain 'C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1' could not be probed: Unexpected command output:
[0.013s][warning][cds] This file is not the one used while building the shared archive file: C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules
[0.013s][warning][cds] This file is not the one used while building the shared archive file: C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules
[0.013s][warning][cds] C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1\lib\modules size has changed.
GRADLE_PROBE_VALUE:C:\Users\User\.gradle\jdks\jbrsdk_jcef-21\jbrsdk_jcef-21.0.2-windows-x64-b375.1
GRADLE_PROBE_VALUE:21.0.2
GRADLE_PROBE_VALUE:JetBrains s.r.o.
GRADLE_PROBE_VALUE:OpenJDK Runtime Environment
GRADLE_PROBE_VALUE:21.0.2+13-b375.1
GRADLE_PROBE_VALUE:OpenJDK 64-Bit Server VM
GRADLE_PROBE_VALUE:21.0.2+13-b375.1
GRADLE_PROBE_VALUE:JetBrains s.r.o.
GRADLE_PROBE_VALUE:amd64
still same error 😦
but at least this time it downloaded something from the api link
I mean, it was downloading from there
the issue is that the jdk it's extracted from that is busted
Thanks! Here is the stacktrace of WE. https://mclo.gs/W0s3Zyo
could you also share the log at /home/********/WorldEdit/worldedit-bukkit/adapters/adapter-1.18.2/.gradle/caches/paperweight/setupCache/decompileMinecraftServerJar.log ?
Hey so, uh, I am out of ram? It says I still have alot. : /
if you ran out of memory the log ther eisn't going to have anything interesting
well, 4G for the decompiler o.O
Oh that is how much it takes up?
Command: /usr/lib/jvm/java-17-openjdk-amd64/bin/java -Xmx4G
Oh is that something you want me to type in?
Oh I meant to turn ping off sorry
No
Oh
but 4gb of ram is how much WE needs to compile?
4G of ram was given as the Xmx to the decompiler
that is ontop of the other parts of the building system
Damn, wait that is an amazing amount
all I can tell you is that your machine ran out of memory
or it sounds like it
decompiling is not cheap
Is there a simple way to shade smth with paperweight?
shadow
And then execute shadowJar instead of reobfJar?
wtf is this?
Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: C:\.all\.projects\.private\Simple-Chals\.gradle\caches\paperweight\taskCache\reobfJar.log Classpath: C:\Users\derio\.gradle\caches\modules-2\files-2.1\net.fabricmc\tiny-remapper\0.10.1\c293b2384ae12af74f407fa3aaa553bba4ac6763\tiny-remapper-0.10.1-fat.jar
no you still use reobfJar
yeah if i execute reobfJar this happens
.
nvm
i did smth wrong configuring shadow
I ran into this problem a few weeks ago on my old laptop and then I gave up, don't you think there should be info given about minimum system requirements on paper docs ?
ik this is still not how im meant to use mache, but its still very convenient
https://github.com/PaperMC/Velocity/issues/1284#issuecomment-2041430759
https://github.com/456dev/macheclient-test-builds/commit/c99179791f415364a8e8d43a63e095defc1d6f53
mache is intended to poop out consumable bundles
it's cool that you can (ab)use it for other avenues but it's not a usecase we intend for
modding as mojang intended
like, the goal is that, you don't touch mache as a tooling set, essentially; you consume the mache bundle and have some tooling elsewhere that deals with importing the bundle from mache into a useful source set in order to poop out your own useful stuff that you can shove into a mod; Not to say that this sorta thing isn't part of why I wanted mache for the client, just useful tooling for consuming it will generally be elsewhere
yeah ik, and it can be a pain having compile patches and feature patches in that way in the same source tree, but at the moment its the easiest way for me to get a compiling and running minecraft source that i can verify has not had any changes from fabrics tooling etc (iirc both fabric and neoforge create a merged source set, when i just want to use client files to recreate the client jar, not that it should matter. they also both add client only annotations etc, and i cant be bothered to ensure thats the only change they make etc.)
also it feels better using mache-client as I hacked it in, so by golly im going to use it lmao
@paper kestrel did you want to fix the resource pack issue for runClient?
idk how involved that is. probably have to download a bunch of assets from the version manifest or smth
sorry, i had i message in here i forgot to send lmao
The runClient seems to be missing all the resources from the resource pack, like textures and sounds. Also, it should be more explicit about what a user has to manually change in order to log in to the client correctly.
i think @bronze ember deemed the resources unnecessary for testing, and im not 100% sure how you can override these task's arguments with gradle.
if we get that working however, the user can specify --assetsDir to point to their .minecraft/assets folder (maybe as a default, as its a fair assumption they have minecraft with the offical launcher?), as well as --assetIndex to change what resource index.json is used (an int based on version. this could be automatically fetched (get the right name), but not downloaded without downloading the rest of the assets)
once the args are overridable, --accessToken should be possible to find in plain text in most launchers.
Yeah, adding a property for the asset dir or for client launch param seems like a good middle ground between launching the game and writing a whole fucking launcher
While for maches purposes in general the sounds are not necessary
(will look at your stuff tomorrow btw machine, coming down from a way too nice night, don't feel like using my brain today, lol)
Any way to improve this? No google search has answered my answer so far and I'm genuenly confused as the same project takes 1.5 seconds to start the daemon on my laptop
unfortunately, this isn't quite enough (depending on how much we care). Not all the assets are actually in the jar. I think the sounds, for example, aren't included in the jar and have to be downloaded
lemme see how annoying it'd be to download all the stuff from the asset index from the manifest
what im trying to do is move the args for the tasks into a property for mache extension
current issue I'm running into is the default value, particular for the runClient directory, as it needs a project directory context
target.layout.projectDirectory.dir("runClient").asFile.absolutePath,
@paper kestrel so I got the downloading of the missing assets working (except idk anything about kotlin in terms of not doing the downloads in serial). Mind if I push it to your branch?
not at all, go ahead :)
done
a note: the MinecraftVersionAssetsIndex can be replaced with a MinecraftDownload, since mojang have basically standardised that stuff between all the downloads i think
(and actually looks like the size field in that is currently unused, so would be basicaly identical the the one you made i think?)
target.tasks.getByName<ProcessResources>("processResources") {
dependsOn("downloadClientResources")
}
doing this could be an issue because of how gradle only loads tasks that have an explicit thing in the configure step maybe? id have to check, but if it currently works i guess its fine?
yeah, I did that to silence an issue about the download client resources task implicitly using an input for processResources
and the download obv. has to happen before resources are copied to build/resources/...
there is no URL
oh wait, I was looking at the wrong one
its not exactly the same, but the 2 properties are the same
the size property on the existing one isnt used either
ill push changes on my side, it should be fine
im trying to get async working atm
I think I did
@TaskAction
fun run() {
val assetManifestResource: TextResource = project.resources.text.fromFile(assetsManifestFile)
val mcVersionAssetManifest = json.decodeFromString<MinecraftVersionAssetsManifest>(assetManifestResource.asString())
runBlocking {
val deferreds = mcVersionAssetManifest.objects.map { (name, obj) ->
val output = if (name.startsWith("icons/")) outputDir.file(name) else outputDir.file("assets/$name")
output.convertToPath().parent.createDirectories()
project.download.downloadAsync(
"https://resources.download.minecraft.net/${obj.hash.substring(0, 2)}/${obj.hash}",
output,
Hash(obj.hash, HashingAlgorithm.SHA1)
) {
println("Downloaded $name")
}
}
deferreds.awaitAll()
}
}
I was missing the runBlocking {} thing
ah ok cool
I pushed
my issue was converting from List<Defered> to vararg, but that makes sense
yeah, theres an extension function apparently for List<Deferred>
so I think the stuff that should be configurable via the mache extension would be what, username, uuid, xuid (what is this), accessToken?
I guess have to specify maybe userType as well
ive got args working (i think) ill push in a sec after ive tested it
xuid is xbox user id iirc
i think the logging of downloads could be a bit verbose
dunno if a progress bar is possible (x/y?)
i know gradle is terminally challenges with line stuff tho
I played around with an (x/y), but I then only wanted to print smth if it was actually downloaded
and since it's async, the order is kinda wack and you don't know how many you have to download at the beginning, idk I don't really care that much
having the asset dir download to the resources folder might be an issue, as they get bundled into the produced jar
might be worth having it be a mache internal directory, with the path argument pointing there
oh that's true. didn't consider really ever dealing with a produced jar, just running from IDE
ive pushed customisable args to the branch now
we should copy what vanillagradle does with checking common assets dirs (vanilla launcher, multimc, etc.)
i mean downloading is already working, it just needs to be moved into a different cache folder
tho i agree it should be shared if possible
@granite valve looks like the only reason those were loaded was because they got included in the jar by accident :/
i think the --assetsDirectory param expects it in the aa/aaaaaaaaaaaaa format
we can either do what it says, and download them in the format it wants (in a global directory maybe, since we need the asset index there too)
or use an existing launchers assets directory set
or maybe we can re-build the index to use the actual filenames, since we are downloading it per-version and wont have nameconflicts
no, that's not true
when you do runClient it doesn't make a jar
There is specific handling for when you provide an assetsDir and not an assetsIndex. If you provide the index, then it creates an indexed filesystem to workwith, othewise it just uses it directly
How can i only publish the api package of a library to maven central?
only create a publication in that specific module
if you are asking how to publish anything to maven central, there's a whole signup/approval process you have to go through. plenty of tutorials online for that
hmm i might have done it wrong then, ill try again
how can i do that? I am currently using a gradle plugin by thebugmc to publish to maven central
got it working, i was missing an extra assets/
ive pushed my changes and am done for the night now
Read the other message he sent. There are plenty tutorials.
@smoky violet would be be simple to make the runXxx tasks use the jetbrains runtime? I think lynx was saying to me that it supports more hot swap changes than other ones do.
I know, that's why I said I don't think its worth to implement downloading them and just letting people configure a location
But I guess you just did anyways, so doesn't really matter ^^
But I agree with jmp that we should check common mc install folders before downloading
Why doth my fork's reobfJar after these paperweight updates no longer make me my jar in build/libs/
Does build still make the jar?
Either it writes the bundler jar somewhere else or it just doesn't
Oh nvm
file mod time is the last i built my fork out a weekish ago
You updated your commit hash too?
yeah, latest paper hash, updated paperweight, gradle
And apply patches works flawless? clean build as well?
yep cleanCache, applyPatches; though do have this now ```> Task :slice-server:reobfJar FROM-CACHE
Build cache key for task ':slice-server:reobfJar' is 71366bc093242a4b8073a6789e01f326
Task ':slice-server:reobfJar' is not up-to-date because:
Output property 'outputJar' file /home/cryptite/dev/Slice/slice-server/build/libs/slice-server-1.20.4-R0.1-SNAPSHOT-reobf.jar has been removed.
Loaded cache entry for task ':slice-server:reobfJar' with cache key 71366bc093242a4b8073a6789e01f326
all the steps say something to that effect
also tried removing the old existing jar but no dice
I expect the jar to be in Slice/build/libs/
Works fine for me when cloning the Slice repository. reobfJar creates its .jars in /Slice/slice-server/build/libs/, and the createReobf... tasks create one in /Slice/build/libs/, as expected. the server also seems to run properly
Latest Paperweight is 1.5.13, but it works with .12 too.
My guess would be something with your gradle is broken. maybe try running it without the cache (--no-build-cache) or deleting the cache. but the project itself seems fine
can i query what
val output = if (name.startsWith("icons/")) outputDir.file(name) else outputDir.file("assets/$name")
i get that the assets at https://piston-meta.mojang.com/v1/packages/d57c295a9d76a449c65cfb3b281fe61854f2f070/16.json eg are non assets/ prefixes
but i had to specify 2x assets in the dirpath i think anyway
so i dont think the icons got used that way since different parent
(when otherwise they would
how much do we care about asset correctness? atm ive got it defaulting to checking hashes of the assets file, and ensuring all assets are intact (which is what we do if we get it locally)
but neither modrinth nor prism asset indexes match the hash for me: prism has a local cache of their metadata, which currently is an older version, so would be considered unsuitable to use
the actual differences is some slightly outdated translations i think
and modrinths is just... cursed
like
https://meta.modrinth.com/minecraft/v0/manifest.json
latest
release "1.20.2"
snapshot "23w44a"
except the first entry is
24w14potato, way newer that 23w44a
i think im being too harsh verifying
if i just verify that the asset index exists with an expected name, (12.json for 1.20.4 for example)
that should be ok? since it changes semi-freqently whenever translations change
they do even less correctness verifying
https://github.com/SpongePowered/VanillaGradle/blob/master/subprojects/gradle-plugin/src/main/java/org/spongepowered/gradle/vanilla/internal/MinecraftExtensionImpl.java#L103
just a does exist? check
checking for the correct index json seems fine then
when we have to download them ourselves should probably include some logic to configure how often it checks for asset updates
it uses the same 4 hour cache as everything else i think
ive pushed my changes, including the checking other launchers
im not 100% sure the properties were done in the best way possible, but gradle stages is pain so
¯_(ツ)_/¯
it needs to be tested on windows, and ideally macos (but windows is the important one, due to path differences i think)
I'm trying to build the javadocs locally with ./gradlew javadoc but somethings going wrong. I haven't modified anything in the project so wondering if this is happening for anyone else?
$ java --version
openjdk 22 2024-03-19
OpenJDK Runtime Environment Temurin-22+36 (build 22+36)
OpenJDK 64-Bit Server VM Temurin-22+36 (build 22+36, mixed mode)
Terminal output: https://pastebin.com/tLHSXsE1
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
have you done applyPatches first
make sure that you actually applied the patches
oh, I'm new to this, didn't realise. I'll try again. Thank you.
I've built the jar with ./gradlew applyPatches && ./gradlew createReobfBundlerJar which was successful but after running ./gradlew javadoc I get the same error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':paper-server:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/jai/Projects/Paper/Paper-Server/build/tmp/javadoc/javadoc.options'
Seems like a very generic error.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you need to run javadoc only on paper-api
the thing blows up on the server for some reason
that seems to have worked, thank you :)
PS C:\Users\liams\OneDrive\Desktop\Coding\froglight> ./gradlew applyPatches
Configure project :
paperweight-core v1.5.13 (running on 'Windows 10')
Task :applyApiPatches
Resetting Paper-API to Spigot-API...
Task :applyApiPatches FAILED
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentatio
n.
BUILD FAILED in 52s
4 actionable tasks: 2 executed, 2 up-to-date
@distant mango
Don't have your project laying in a one drive synchronized folder. Best for windows to have it directly in the disks root directory.
ik but that isnt my problem.
and idk it leaks my name. but thats my birthname and im trans and shit so dont affect me
Your path clearly shows that this is your problem....
my bad..
where is my path the problem though
Just move it to C:\froglight
and try again.
ok but where does it state that my path is the problem?
Well if it’s paper the best would be to have it on wsl
Common knowledge here that stuff doesn't work as expected in Cloud synchronized folders.
alr. ill try putting it C;
Alright
If the whole process takes a lot follow Noah's recommendation with wsl.
what does wsl stand for again?
windows subsystem for linux
io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard upst
ream/upstream
this seems like the true error
its now in c:
try a fresh clone if you've not already
otherwise, see the full output to see if there is anything useful in there
where can i see a full output, just terminal of intellij?
i mean i might try again the cloned project just finished building
scroll up
ig
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
would this be an issue?
no
ok
PS C:\froglight> ./gradlew applyPatches
Configure project :
paperweight-core v1.5.13 (running on 'Windows 10')
Task :applyApiPatches
Resetting Paper-API to Spigot-API...
Task :applyApiPatches FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':applyApiPatches'.
io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard upst
ream/upstream
- Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentatio
n.
BUILD FAILED in 1m 5s
4 actionable tasks: 2 executed, 2 up-to-date
@lament scarab this is all
No idea
do you have your git user and email set
if it was unset it would generally explictly scream that in the command output
oh i have lots of git accounts yeah
In intellij, make sure you select the topmost block on the left of the run window, sometimes it can hide stuff to just show parts of the error
(But I don't think that's an issue there since you pasted more gradle output)
so is it fine to post minecrafts source, if its only for a day?
https://github.com/PaperMC/sculptor/blob/main/.github/workflows/update-mache.yml#L122-L128

Actually, we delete them after the pipeline 
cleanup:
name: Cleanup
runs-on: ubuntu-latest
needs:
- verify
- update
- applyPatches
- build
if: always()
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: patched-sources
ah i didnt look that far lmao
ı try this but dont saved @golden seal
Read the info above that
okey
Like, the full thing; that truncated snippet looks like a typical misconfig
Just reapply the patches
which command?
I can’t help you
why?
because it literally tells you what to do
Because the issue and the solution is literally right on your screen
if you can't follow what it wants you to do then we can't help you
like it's literally giving you commands to run
If you can’t follow that, as I alreadt pointed you to, I can’t help you
ım sory but ım not using gradle in before
it has nothing to do with gradle
read
literally says what it wants from you
and how it wants it from you
huh okey
it is spoonfeeding you the answer
I'm sorry for making you tired
Hey
Got this error
Caused by: java.lang.RuntimeException: Operation has non zero exit code: 1
at paper.libs.codechicken.diffpatch.cli.CliOperation$Result.throwOnError(CliOperation.java:55)
at io.papermc.paperweight.userdev.internal.setup.step.ApplyDevBundlePatches.run(ApplyDevBundlePatches.kt:75)
... 165 more```
When i look to the logs i got this
```Patching: net/minecraft/server/network/LegacyQueryHandler.java
Hunk 0: EXACT: @@ -12,81 +12,135 @@
Hunk 1: FAILURE: @@ -94,20 +148,108 @@
Hunk 2: EXACT: @@ -115,9 +257,10 @@```
and this
```Patching: net/minecraft/server/level/ChunkMap.java
Hunk 0: EXACT: @@ -1,11 +1,13 @@
Hunk 1: EXACT: @@ -19,16 +21,18 @@
Hunk 2: EXACT: @@ -39,6 +43,7 @@
Hunk 3: EXACT: @@ -51,6 +56,7 @@
Hunk 4: EXACT: @@ -84,9 +90,11 @@
Hunk 5: EXACT: @@ -95,7 +103,12 @@
Hunk 6: EXACT: @@ -106,84 +119,237 @@
Hunk 7: EXACT: @@ -197,37 +363,75 @@
Hunk 8: FAILURE: @@ -236,382 +440,162 @@
Hunk 9: EXACT: @@ -619,172 +603,117 @@
Hunk 10: EXACT: @@ -792,226 +721,248 @@
Hunk 11: EXACT: @@ -1019,12 +970,13 @@
Hunk 12: EXACT: @@ -1033,218 +985,283 @@
Hunk 13: EXACT: @@ -1260,23 +1277,18 @@
Hunk 14: EXACT: @@ -1287,77 +1299,148 @@
Hunk 15: EXACT: @@ -1367,9 +1450,13 @@
Hunk 16: EXACT: @@ -1379,9 +1466,14 @@```
I wonder if there's a way to debug this ?
debug is generally "work out how the tool works and look at the diff to see why it failed"
outside of that, the general common failure point people have is using ancient builds of paperweight
I've tried but it's not so easy, that's why I'm asking for your help here, sorry for the inconvenience
./gradlew reobfJar --refresh-dependencies is supposed to update paperweight ?
I've tried many things before asking here, i don't want take your time for nothing
No, you set the version of paperweight inside of your build config
I don't know if that's the problem, I've got one working project where there's no error code and another that doesn't work.
I tried to see with my project config if everything was OK, and everything seems to be OK.
Wouldn't there be something to remove that would cause problems?
Ex: last time I had a problem, I deleted the .gradle folder and managed to fix it.
Isn't there a folder somewhere else that I could delete to refresh the files?
I mean, you'd generally just yeet the folder; it's not a case of "refreshing the files", it crapped itself doing that
but, debugging this stuff is generally non-trivial, but, the version of PW would be the first port of call considering recent changes
I don't know your setup, etc
Thank you for your reply
The problem came from updating paperweight.
I don't know why one of my projects was working but not the other (same config).
Thanks for taking the time to reply
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ir.wylot</groupId>
<artifactId>Refinery</artifactId>
<version>1.0-B8</version>
<packaging>jar</packaging>
<name>Refinery</name>
<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>papermc</id>
<url>"https://repo.papermc.io/repository/maven-public/"</url>
</repository>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.4-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>me.lucko</groupId>
<artifactId>spark-api</artifactId>
<version>0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
having multiple issues:
1- Could not transfer artifact net.md-5:bungeecord-chat:pom:1.20-R0.1-deprecated+build.14 from/to papermc ("https://repo.papermc.io/repository/maven-public/"): Cannot access "https://repo.papermc.io/repository/maven-public/" with type default using the available connector factories: BasicRepositoryConnectorFactory
2- Failed to read artifact descriptor errors
update: fixed, problem was from repository url
yea, I just noitced, was looking at the errors, brain just wandered over the " until I read the actual error and was like "wait..."
org.eclipse.aether.transfer.NoTransporterException: Unsupported transport protocol "https
So glad maven hides that information...
anyone know what the f is going on here?
Could not create task ':runMojangMappedServer'.
Could not create task of type 'RunServer'.
Could not create an instance of type xyz.jpenilla.runtask.pluginsapi.DownloadPluginsSpec.
Could not generate a decorated class for type DownloadPluginsSpec.
is paper-server-userdev the jar that you compile against for NMS and API access?
not trying to do anything in particular just wrapping my head around the internal operations of paperweight-userdev
Hey hopefully someone can help.
I am using Jpenilla's Resource Factories for my plugins. I just wanted to do the same for our Velocity plugin, however I am getting this error:
- In plugin 'xyz.jpenilla.resourcefactory.ResourceFactoryPlugin$Inject' type 'xyz.jpenilla.resourcefactory.ExecuteResourceFactories' property 'factories.$0.value.main' doesn't have a configured value.
however this is in my gradle:
velocityPluginJson {
main = "lol.simeon.piervelocity.PierVelocity"
}```
Also, I am getting `java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics` when my Plugin starts up, I tried implementing kotlin("stdlib") but that did not work. I am using Jpenilla's run Task
sounds like you still need to shade dependencies
try the shadow plugin
well I have shadow but it doesn't get called when I use the run task
I am using: https://github.com/jpenilla/run-task
it might be more appropriate to ask in a community for that specific project
i dont know if youll get a good answer here
I found an issue on the project talking about shadow support so idk https://github.com/jpenilla/run-task/issues/36
I mean, it's a classpath configuration issue
any Idea how I can fix it?
runtask works fine when making paper plugins, aswell as implementing stdlib
it just doesn't work in velocity for some reason
work out why it's not in the classpath
a suggestion how?
these are my deps:
plugins {
kotlin("jvm") version "1.9.23"
kotlin("kapt") version "1.9.23"
alias(libs.plugins.shadow)
alias(libs.plugins.runTask)
}
dependencies {
implementation(libs.ansi)
implementation(libs.bundles.configurate)
implementation(kotlin("stdlib"))
compileOnly(libs.api)
kapt(libs.api)
}```
I can't really advise on the info I can see, and, sunday
oof :/ you think we could somehow get jmp's attention? I would really like to get this going
I just double checked on our server, when I upload the plugin it works fine.
So it must be an issue between run-task and shadow
I would consider opening an issue on the repo
send your full build script
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
use run-task snapshot version or switch to the original shadow
(for the shading error)
also try using 1.1.1 of resourcefactory?
Paper needs to migrate in 1.20.5 anyways to support java 21 for shadowJar.
?
Probably a new version of shadowJar requiring java 21?
Well 
the original shadowjar doesn't really support java 21
but the question mark was bc I didn't understand Yannick's comment or rather the relevance
(paperweight) Hello, how do I publish my fork's development bundle to my Maven local repository? (Or maybe there's another solution) I need to test with a test-plugin which will use paperweight-userdev
Just found the code in another fork: https://github.com/PurpurMC/Purpur/blob/ver/1.20.4/build.gradle.kts#L111
Yes. And paper either needs to maintain it's own fork of shadowjar to allow shading in java 21+ or uses the other one.
Mc 1.20.5 requires java 21 -> so depending on a shadowjar version that supports java 21 is required.
yes i know
And my initial comment was the shortened version. 🙂
i just re-cloned my paper repo (WSL) and when I open it in intelliJ it starts configuring the project. This seems to work at first sight but then it suddenly tries to resolve C:\user\lib\jvm.... Did someone have the same issue lately? Applying patches works perfectly fine to but it just doesn't want to finish setup.
if you are still having that issue send a paste with the relevant build script
Hey its those two
the first is my build gradle the second one is my versions toml
you need java 17
okay I just upgraded to 1.1.1 of the resource factory and its still causing the issue
the one linked there does not use resource factory
are you sure you didn't include something extra when it was broken
because that builds with no issues
i just said that applying patches works fine. I think it needs java to do that no?
hmmm. nope but let me try restarting my pc maybe Intellij is just being stupid
yes, no clue how i fixed it though or if i did
weird, restarting did not help, but yeeting the .gradle and build folder did.
The Kotlin instristics error still remains
its probably caused by the version of shadow I am using
however using the one from john won't work since our whole network works on java 21
seems to be a paper issue since i can normally create gradle projects on wsl
with the wsl java 17 as my gradle jdk
I tried cloning a gradle project (with userdev) as well and it did configure successfully. The only projects that didn’t work was paper and paperweight (both fresh clones)
I tried applying patches on my laptop today from a clean clone and encountered this issue: https://pastes.dev/VsD7Dswfzy
the log file mentioned just stops at PreProcessing class net/minecraft/world/food/FoodMetaData: https://pastes.dev/YBpGQB53mw
makes sense on this dogshit laptop...
thanks
it just worked before without problems thats why i was confused
how would i use shadowJar with jitpack?
i got this:
although, i get this error:
i need to include all the dependencies in the jitpack source
solution: don't use jitpack
fair, what should i use then?
deploy your own repo or look towards maven central or something like codemc, depending on needs
also only the second to last line of that create block should be needed
this is also one of the many reasons I do not recommened changing output locations to gradle newcomers
seems like i ran into an issue
how do i deploy it?
i got the panel workin
i see no issue
oh you have to add a plugin like gradle publish
here is a kts example
plugins {
id("maven-publish")
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
repositories.maven {
val branch = if (version.toString().contains("-pre")) "snapshots" else "releases"
url = uri("https://yourrepohost/$branch")
credentials {
if (extra.has("RELEASES_USER"))
username = extra["RELEASES_USER"].toString()
if (extra.has("RELEASES_PASSWORD"))
password = extra["RELEASES_PASSWORD"].toString()
}
}
}
thats a github workflow right ?
ye
add your secrets to github
already did
then it should work when pushing to github
well wtf am i doing wrong 🤦♂️
the name should be admin and the password should be the token right?
although i would recommend you using on release instead of push
yep
you added your keys under security > actions > org/repo secrets right ?
alright seems like the issue with this is because of the java.toolchain block. If i comment it out it configures without any issue. https://youtrack.jetbrains.com/issue/IDEA-329792/Gradle-build-fails-jdk-doesnt-exist#focus=Comments-27-8471381.0-0
Next IJ version should fix this.
do you even use gradle in your plugin
you dont publish anything
.
😭
you are missing the entire repo section
what's extra?
bascicly env variables
ohh
you don't need to do that manually
ah
use System.getenv instead
if you want to only publish using your gh workflow then no
when using my approach yep
i just heared of password credentials and they seem better then env variables
it's basically just setting up gradle properties for you based on the repo name
you want to publish to localhost ?
rn yeah
then just use maven local
how do i do that
as long as you dont have a public repo
the repo is public on github
ah
but how would i use shadowJar like this?
i need to include all the dependencies inside the maven jar
its a repo you dont provide fat jars
hmm
i need my other projects that compile this one to have access to the dependencies
your maven config is published as well so all depends are included
compileOnly("group:artifact:version")
you add mavenLocal to your repositories (in kts)
and then the dependency notation
like that
did you publish it to your maven local
yeah
did you add maven local to your repositories
mavenLocal()
mavenLocal()
thats it
that's how it works yes
you dont directly provide dependecies in a repo
yeah i need to include these into the repo:
could i not compile into the dependency? I dont wanna add each one everytime
you don't add them yourself
if you are using paper most likely not
transistive*
but i dont have access to them?
you do but they are not in the jar
they are in the xml you saw
i dont have access to anything
in the main repo i have to set them as api?
no?
you need to add the java-library plugin
@hollow condor into takes a directory, not a file, apart from that, care to provide a build scan?
Yes, sorry for responding so late. The pastebin I provided was the last thing I tried doing, I used a directory before. Give me a second and I will send a paste of the build scan.
Here it is: https://scans.gradle.com/s/rgtx6uq5n5qze
yeah you need to actually run the task or configure it so it runs after reobfJar as finalizedBy, simply creating it won't automagically run it "sometime"
Thanks!
unless you have a specific reason you need finalizedBy it's generally better to use normal depends
is there somehow a way to make a run configuration to run a server in dev workspace instead of the runServer gradle task?
why not the runServer gradle task?
cause I can't use hot reloading which is really irritating
I mean, yes
you use the runServer task through the debug option
IJ already hijacks gradles thing and injects in some stuff to make it attach its debugger
doesn't work
does anyone know the task that gets the generated sources jar
well, do note that if you're using things like relocations you'll generally break the debigger as classes won't line up
dont worry after 30 minutes of struggling i realised theres an amazing thing called the gradle tab
?
i register a package sources task and add it to publish, but then some non-existent generateMetadataFileForMavenPublication task needs to depend on it,
when i try and do tasks.getByPath it says it cant find it, then when i try and register it, it exists
tasks.register("packageSources", Jar::class) {
dependsOn("classes")
from(sourceSets["main"].allSource)
archiveClassifier = "sources"
}
configure<PublishingExtension> {
publications.create<MavenPublication>("maven") {
from(components["java"])
artifact(tasks.javadoc)
artifact(tasks.getByName("packageSources"))
}
}
isn't there just java { withSourcesJar() } ? iirc properly adds it to the java component
same goes for javadoc
there is but you cant use it as an artifact
wdym
are you trying to include generated sources from an annotation processor or what
from(components["java"]) is all you need in the publication
when you use java.with[Sources/Javadoc]Jar it goes into the component
withSourceJar adds it to those components ^
probably
now to sort out this horrid naming convention
I'm getting this error on paperweight 1.5.15 with paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT"). Gradle version is 8.1.1.
Failed to apply dev bundle patches. See the log file at '/Users/pixeldev/Workspace/revenge-ntw/akardoo/tesseract/plugin/.gradle/caches/paperweight/setupCache/patchedSourcesJar.log' for more details. Usually, the issue is with the dev bundle itself, and not the userdev project.
Failed to apply dev bundle patches. See the log file at '/Users/pixeldev/Workspace/revenge-ntw/akardoo/tesseract/plugin/.gradle/caches/paperweight/setupCache/patchedSourcesJar.log' for more details. Usually, the issue is with the dev bundle itself, and not the userdev project.
Invalid context line in 'net/minecraft/world/entity/ai/behavior/ShufflingList.java.patch' at 1:'diff: unrecognized option `--color=never''
message.txt by @raw vessel: https://pastes.dev/DfbqaqSra5
your patch files are literally diff errors
your bundle is invalid
did you pass --ignore-unsupported-environment when generating the bundle?
where am i supposed to use that?
doing so is what would allow an invalid bundle to generate on latest pw
I mean, where should I pass that thing?
I'm not creating my own fork or something like that
I'm trying to use paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
day 3 of trying to get remapping to work in scala
gradle was a failure so i think i will be trying to dissect paperweight and turn it into sbt
What's the equivalent to this when replacing reobfJar? Since we shouldnt use reobfJar anymore
reobfJar {
outputJar.set(layout.buildDirectory.file("libs/test.jar"))
}
you just configure the jar or shadowJar
for some reason any time i include my library in my project i get "Unsupported class file major version 65"
but my lib is set to compile on j21
am i doing somethign wrong?
wait is paper switching to mojmap at runtime?
Yes
neat
so ive remade my lib using gradle
and i did a local publish but i cant import anything?
ah found my issue
typo in publish xd
still getting that "Unsupported class file major version 65" though..
hmm
shadowJar fails but build doesnt..?
I did some searching around, and this fork of shadowjar works.
Updates to Paper do not have any sort of estimate for when they release, ever. Any and all updates will arrive when they are ready, and the only thing to do is wait for them patiently along with everyone else.
hi, does anyone know whether it's possible to run paperweight without any internet? e.g. cache the currently checked out paper repo?
i'd like to be able to work on paper stuff while on the go
no
please open an issue with what issues you run into without internet, we can look into supporting gradle's --offline-mode flag
is there any good reason for that? or would it be something i can pr in?
ahhh awesom
yea i was thinking of smth like that
you could also try https://github.com/chayleaf/mitm-cache/ as a temporary solution
(i havent tried it, just saw it being used for building gradle projects in environments with no internet)
I'm working on some paperweight changes
gonna hit the obvious areas but I might miss something
I feel like that might be enough to get it working offline once you have everything cached
with --offline-mode ofc
hmmm

i got it working
that's awesomee
will that change make it into paper 1.20.5/6 release?
it'll be in paperweight 1.6.1
1.6.0 works good enough for the release but there's some stuff we want to fix soonish anyway
ah so potentially 1.6.1 it won't be in 1205/6 release?
would this error indicate a bug in paperweight userdev? https://mclo.gs/A2ZRl9S
you need to explain what you are doing
i will get a minimal reproduction example
w/ the change in mappings at runtime will i be able to yoink a remapped server jar from a paperweight gradle project and link my non-gradle project against that
you can do what you want, I barely have time to deal with supported configurations as is
same as with the maven plugin someone made
the question was "does that work" not "will i get help for it"
the dev bundle works for userdev and the maven plugin so clearly it's possible
no need to implement my own reobfuscation in not-gradle w/ new changes?
did you read my posts in #dev-announcements
if you are exclusively targetting paper you don't need to remap, but set the manifest attribute
Updates to Paper do not have any sort of estimate for when they release, ever. Any and all updates will arrive when they are ready, and the only thing to do is wait for them patiently along with everyone else.
Hey, I'm facing an issue with paperweight 1.6.0
Here is the error message presented when running gradle assemble
> io.papermc.paperweight.PaperweightException: Execution of 'net.fabricmc.tinyremapper.Main' failed with exit code 1. Log file: /home/foxikle/IdeaProjects/CustomNPCs/v1_20_R1/.gradle/caches/paperweight/taskCache/reobfJar.log Classpath: /home/foxikle/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.8.6/a584208ddeebec2eb210aaa2a6f8622052c07132/tiny-remapper-0.8.6-fat.jar
Here is the reobfJar.log that gradle produced.
https://paste.insprill.net/s6hZN
Potentially Helpful Details:
- Gradle 8.7
- JDK 21
- Its a multi-module project
Module build.gradle.kts: https://paste.insprill.net/FOzeI
Parent build.gradle.kts: https://paste.insprill.net/BO8UZ
Please ping me if you can help, thanks <3
when using old dev bundles you will need to target a java version their remapper supports
you can use jdk 21 just fine, but set options.release to 17 on the compile task for the project
you could also add a newer tiny-remapper to the remapper configuration actually
like 0.10.2
from paper: remapper("net.fabricmc:tiny-remapper:0.10.2:fat")
in dependencies
well actually that might break things... if it works then it works, otherwise you would need to swap the remapper only for reobfJar
since the way I shared just now will also change it for the dev bundle pipeline
Great, this resolved it!
Cheers ❤️
Does ShadowJar not work on Java 21 or is there a version I haven't seen yet?
Using 8.1.1 by the way
there is an updated fork
Thanks, seems to work
Is there a way to change the paperweight-mappings-namespace manifest value when using the shadowJar task with paperweight-userdev?
Because doing it the usual way doesn't seem to work and the value will always be mojang+yarn, no matter what I try.
... what are you trying to change it to
Well, spigot because of dependencies which are not mojang mapped but shaded into my plugin
but presumably your code is mojang mapped since you are using userdev
so that would break your code when it tries to remap
you should ask lib authors to publish mojang mapped variants and use those, then your shadowjar is mojang and reobf works normally
otherwise you could do some custom gradle setup to combine the dependencies in after reobfJar instead of before
How am I supposed to add this:
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
to my build.gradle? Currently i have this,
plugins {
id "io.papermc.paperweight.userdev" version "1.6.2"
}
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
dependencies {
implementation project(':abstraction')
paperweight.paperDevBundle("1.20.5-R0.1-SNAPSHOT")
}
But it gives me the error
* What went wrong:
A problem occurred evaluating project ':paper'.
> No such property: MOJANG_PRODUCTION for class: io.papermc.paperweight.userdev.ReobfArtifactConfiguration
@vapid helm is it io.papermc.paperweight.userdev.ReobfArtifactConfiguration.Companion.MOJANG_PRODUCTION in groovy?
if so I will need to fix that
and please open an issue on the paperweight repo
Hello! I'm trying to apply patches on my purpur (latest commit from ver/1.20.4) fork, but this error occurs. How to solve it?
Applying: Setup Gradle project
Applying: Remap fixes
Applying: Build system changes
Applying: Test changes
Applying: Paper config files
Applying: MC Dev fixes
Applying: ConcurrentUtil
Applying: CB fixes
Applying: MC Utils
Patch failed at 0009 MC Utils
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: invalid object 100644 46cab7a8c7b87ab01b26074b04f5a02b3907cfc4 for 'src/main/java/com/mojang/logging/LogUtils.java'
error: Repository lacks necessary blobs to fall back on 3-way merge.
hint: Use 'git am --show-current-patch=diff' to see the failed patch```
You should probably be looking for help from the fork you’re using.
Do you need to do anything special for run-task to use the moj mapped jar?
oh wait wrong task
Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-8.7-bin.zip'.
Why does this happen? How can I solve this?
looks like the userdev plugin is quite resource hungry... its crashing my build server :( Anything I can do to make it compile?
jenkins@a6f561014931$ free -m
total used free shared buff/cache available
Mem: 7944 3608 3978 135 746 4336
Swap: 0 0 0
jenkins@a6f561014931$ JAVA_HOME=~/jdks/jdk-21.0.3 ./gradlew shadowJar
:executing 'decompile transformed minecraft server jar'
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':paper:compileJava'.
> Could not resolve all dependencies for configuration ':paper:compileClasspath'.
> Execution of 'org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler' failed with exit code 137. Log file: /var/jenkins_home/workspace/plugin/paper/.gradle/caches/paperweight/setupCache/decompileMinecraftServerJar.log Classpath: /var/jenkins_home/.gradle/caches/modules-2/files-2.1/org.vineflower/vineflower/1.10.1/4f48c5947b21f9ebc743e7c80215ee839d3dc668/vineflower-1.10.1.jar
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 2m 23s
it seems to need more than 4GiB.. how much does it actually need? Is there a way to limit the memory?
decompile shouldn't be running in CI
it checks for the CI system property being true
and it needs about 4.5gb total, the decompile jvm needs 4gb and the gradle jvm needs 512m
but again that means only 512m needed on properly configured CI
why not?
because ^
when it is, decompile is skipped
decompile is so you can see paper sources in-ide
yw
idk if this the right place but someone please help i have never used gradle before and i cant fix this no matter what i do 😭
> A build operation failed.
Could not move temporary workspace (C:\Users\Nick\.gradle\caches\transforms-4\89484451d661f99a457eb4144ca49e06-415aeaf4-df1b-492b-ba55-99e781a8daa1) to immutable location (C:\Users\Nick\.gradle\caches\transforms-4\89484451d661f99a457eb4144ca49e06)
> Could not move temporary workspace (C:\Users\Nick\.gradle\caches\transforms-4\89484451d661f99a457eb4144ca49e06-415aeaf4-df1b-492b-ba55-99e781a8daa1) to immutable location (C:\Users\Nick\.gradle\caches\transforms-4\89484451d661f99a457eb4144ca49e06)```
heres the full stack trace: https://paste.gg/p/anonymous/91f0902f630d47d9954c6cf1e8a13e2f
nvm found something written in korean saying to use gradle 8.5 and it worked
ok, this is probably a really easy fix, but i dont get how to make sdk version and language level like each other:
error: invalid target release: 1.21.2
SDK 21 is not compatible with the module CustomSwords language level 21 in chosen run configuration CustomSwords package.
Change the version of JRE in the Maven Run Configuration
I mean
they represent two entirely different things
and we got away from 1. many eons ago
uh so for some reason maven was set to java version 1.8, which didnt allow my switch loop
but in project structure my project uses sdk21 and language level 21
Make sure that your stuff is actually set to java 21, not 1.21
you'd need to work out why it's setting an invalid version
i have no idea lol
i have the Maven Run Configuration Java version set to Project default
if you want people to look you'd need to share your build config, I can't say much more
(and, I'm going to go do my morning routine)
what do you mean by build config?
the pom
message.txt by @misty heath: https://pastes.dev/x6r5rlvwNT
oh, so just "21"?
yes
it worked as intended, tysm
hi, i got this error when i am trying to build my prject
build.gradle
https://pastebin.com/ibjA2Hqw
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
probably this
it doesnt works
i write this and i got this error again
that doesn't set the JVM that the thing runs with
you'd need to set the toolchain for that
or, well, maybe it should, eer, idk
all I can see is that it hit java code it didn't know how to deal with
you can also just update the remapper as he said
any ideas?
Hey, i'm getting the following error when trying to build my project:
https://paste.gg/p/anonymous/396457b939f64d50833cc7e1db494eeb
using paperweight-userdev:1.6.2, and a multi-module multi-version setup
https://github.com/onebeastchris/geyser-adapters/blob/1.20.5/spigot/v1_17_R1/build.gradle.kts my build.gradle.kts file for the failing module
Here the patchedSourcesJar.log it's telling me to check: https://paste.gg/p/anonymous/03643bcda87840dc9bacd97490bc226f
@lament scarab could you please merge bungee upstream to waterfall?
nvm your name is no ping
i realized after i pinged you
im sorry lmao
done, but, do note that
- 1.21 is probably not happening
- This is the channel for help with build tooling
thank you
Same problem with clean Paper from ver/1.20.4
I'm using Ubuntu 22.04 from WSL2
Creating Paper-Server from remapped source...
Importing 255 classes from vanilla...
Importing 5 data files from vanilla...
Importing 1 classes from library sources...
Applying patches to Paper-Server...
Applying: Setup Gradle project
Applying: Remap fixes
Applying: Build system changes
Applying: Test changes
Applying: Paper config files
Applying: MC Dev fixes
Applying: ConcurrentUtil
Applying: CB fixes
Applying: MC Utils
error: invalid object 100644 46cab7a8c7b87ab01b26074b04f5a02b3907cfc4 for 'src/main/java/com/mojang/logging/LogUtils.java'
Patch failed at 0009 MC Utils
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: Repository lacks necessary blobs to fall back on 3-way merge.
hint: Use 'git am --show-current-patch=diff' to see the failed patch```
See why that patch fails and fix it's conflicts I guess?
And of course make sure paperweight is up-to-date and that the other dependency versions in your fork (remapper, decompiler and so on) match the one used in Paper 1.20.4
This happens even on a clean Paper without any changes, I suspect it may be related to some kind of problem in the system, but I do not know how to look for it
it's probably a java version thing
any ideas what this might be?
I've tried to set the language version using toolchains, but that's also failing..
I mean, that is 100% java version related
I mean, the thing failed to apply the patch, you'd need to work out why
i.e. go look at that file
There is simply no file (src/main/java/com/mojang/logging/LogUtils.java), and I just noticed another problem.
SHA1 hash of downloaded file '/root/IdeaProjects/Paper/.gradle/caches/paperweight/mappings/server_mappings.txt' does not match what was expected! (expected: 'c1cafe916dd8b58ed1fe0564fc8f786885224e62', got: '14be97974a77b09eb8bca88ed9268445f0fde3e7')
Re-attempting download once before giving up.```
if theres no LogUtils file then something is cursed with your setup and I cannot offer support
outside of "make sure you're not running on some broken FS", 
Fixed it by reinstalling ubuntu
message.txt by @agile coral: https://pastes.dev/YFHtFBYdkV
does it build with ./gradlew build
Yes
probably just need to use the repair ide option
and or set a newer jdk for the project
The JDK is fresh installed, but I am working my way through the IDE repair steps.
Unfortunately, still nothing. Even removed the dev bundle dependency and then added it back. I'll keep working at it, though.
idea is a pain like that sometimes
Do you prefer a different IDE? Idea is much better than Eclipse, which I moved from a several years ago.
Sorry, wrong channel to ask that.
no I use idea as well
it just randomly breaks sometimes
especially with kotlin
not as bad for me recently but it still happens occasionally
Oh, cool. Well, I will try to figure this out 
Thank ya
@smoky violet Sorry for the @, but I thought you would get a kick out of this.
Off of a hunch, I uninstalled and installed the newest version of IntelliJ (I was on a 2023 edition). It works now.
Thank you again; I probably wouldn't have thought it was purely an IDE issue if not for your comment.
glad you resolved it
Did you install IntelliJ via toolbox? this lets you update it easily
Nope; I just downloaded the installer and ran it 🫠 Buuut, it was also fairly simple. I know the option of the toolbox is there for the future, though.
Got an index out of bounds error when rebuilding patches after making a new commit, unsure of the cause. Any ideas? It's when rebuilding server patches. Index 1 out of bounds for 1
Errors at RebuildGitPatches.kt, line 87.
Fixed it I think
tends to happen when the repo is in a detached head state
im trying to build a velocity fork and it is telling me that the extra property nettyVersion does not exist. Anyone know what a fix is?
finally fixed.
hi, I am unable to do anything with gradle in paper source due to following error. I tried deleting all caches i could think of, including global gradle and maven caches, neither helped. It started happenning after I pulled 1.20.5 changes. Am I doing something wrong?
Delete the paper server folder
aaaah, did not think about deleting that, thank you!
It's basically always the solution when you have Gradle issues in one of the patched folders
I guess deleting the build file alone should also work
I completely forgot those folders are generated :D
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':remapSpigotSources'.
> Could not create an instance of type io.papermc.paperweight.tasks.RemapSources$RemapParams.
> paper/libs/org/eclipse/jdt/core/dom/ASTVisitor has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
I am currently stuck on this error. Already tried changing java version for the whole project between 11/17/21 and neither helped
The problem is your java version
You need to run Gradle with a newer java version
my default java is 21, do I need to set it somewhere else?
Look at what Gradle did use
gradle must not be running with a newer java version. if you’re using intellij you can check your gradle settings
ah, had old JAVA_HOME and in idea's gradle's settings... hope it will work now
thank you!
yup, now it finished successfully, thank you!
Hello! 👋
Reloading the Gradle project in IntelliJ seems to be no longer possible due to Task 'prepareWorkspace' not found in project ':cardboard-api-generator'. (cardboard is the name of my fork) – is this expected or is there any migration I need to do for the api-generator module in my fork?
I'm using this build configuration and my only patch changes thereferenced dependency of the api:
patchTasks {
register("PaperApiGenerator") {
isBareDirectory = true
upstreamDirPath = "paper-api-generator"
patchDir = layout.projectDirectory.dir("patches/api-generator")
outputDir = layout.projectDirectory.dir("cardboard-api-generator")
}
}
This is the only diff:
- implementation(project(":paper-api"))
+ implementation(project(":cardboard-api")) // Cardboard - change branding
Additionally, if I run ./gradlew tasks in the root directory, there seems to be another problem with the api-generator (already tried deleting it and letting it regenerate the module, came out with the same result):
Execution failed for task ':tasks'.
> Could not create task ':cardboard-api-generator:applyAts'.
> Task with name 'fixJar' not found in root project 'cardboard'.
make sure that you'e applied patches already, as a bunch of the configuration gets derived from that stuff, and generally, make sure that you've reflected any changes done in the gradle patches of the paperweight repo, etc
I've applied patches already and running ./gradlew createMojmapPaperclipJar generateDevelopmentBundle works flawlessly. I also rebuild patches afterwards and fixed all of my patches. It seems to only affect the api-generator. I'll have another look at the individual commits of the paperweight repo 🤔 I compared my repo against the paper repos commits already
I mean, paper is paper, the paperweight project is of the focus for fork specific caveats
For anyone having a similar problem, I fixed it by only including the generated folder of the api-generator, which has no build.gradle.kts:
patchTasks {
register("PaperApiGenerator") {
isBareDirectory = true
- upstreamDirPath = "paper-api-generator"
+ upstreamDirPath = "paper-api-generator/generated"
patchDir = layout.projectDirectory.dir("patches/api-generator")
- outputDir = layout.projectDirectory.dir("cardboard-api-generator")
+ outputDir = layout.projectDirectory.dir("cardboard-api-generator/generated")
}
}
you have to manually remove the prepareWorkspace hook since we moved away from vanilla gradle
in gradle menu in intellij, right click on module, Task Activation, delete prepareWorkspace
what should my build.gradle look like? this is my current one:
build.gradle by @night zealot: https://pastes.dev/PEN4y6W5pi
probably need #dev-announcements message specifically for 1.20.6
you need to get rid of the targetIavaVersion
how would i update to java 21, cuz i tried and add io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT as a compileOnly dependency and it doesnt work
o
Who can help me? i dont know whats wrong: https://mclo.gs/QQ2kwpm
i only added:
<dependency> <groupId>io.javalin.community.ssl</groupId> <artifactId>ssl-plugin</artifactId> <version>6.1.3</version> </dependency>
and it doesnt work, but the library is needed
SourceCode: https://github.com/FemRene/Website-Plugin
I recommend upgrading the project to java 21.
And what doesn't work?
And your server is running java 19 which is an unsupported version. Upgrade to Java 21 there.
at compiling, the Manifest.INF seems to be broken:
[02:50:41 ERROR]: [DirectoryProviderSource] Error loading plugin: Invalid signature file digest for Manifest main attributes java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
@prime cliff The error keeps happen with java 21
I personally wouldn't add ssl into the application. Instead I recommend doing ssl termination using a proxy.
It's fairly simple. Instead of exposing the service directly, you do it via a proxy that adds ssl.
Additionally I prefer not running the rest service in the plugin itself, instead having a fully separate application.
yes i know but its a bit easier with docker and so on... But i got it work using ReverseProxy Thanks!!!
it would be easier to do reverse proxying with docker than using SSL on your application itself
yes and i did, an other way where a database but in this case its complicated
I seem to have installed the correct version of Java, but I get this error
your thing is still using an older version of java
how to change
if you ran that from your IDE, check your settings there
check the gradle settings
how would i upload to the maven central repo with gradle, i already have a namespace but im confused because im trying to upload with a bundle but idk how to do the repo layout
i would recommend you use https://github.com/ani2fun/sonatype-maven-central-publisher
hello, i'm getting this error while userdev is patching 1.19.2
here's the log it mentions
patchedSourcesJar.log by @loud wigeon: https://pastes.dev/J6BiOi9cVq
idk, stuff failed to apply worldborder stuff
best bet is to delete that paperweight-userdev folder and try again
in .gradle/caches?
there and in your home kaspian .local share gradle caches folder
i deleted the 1.19.2 one and reloaded gradle and got the same result
but only there, ill try both now
yup, same thing again
Iirc world border failing in that version was an issue with the decompiler and Java version
Make sure to use whatever version of Java was the norm for the tool chain back then
hi, I'm trying to update my fork to the latest commit, but I get this weird error
message.txt by @sharp trellis: https://pastes.dev/Nih8bd5XOk
something apparently mangled the jar
check your tooling and make sure that you're using a sane JVM, etc
nvm, computer restart solved the issue
copy setting the java version to the module build script
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}```
this one?
yes
message.txt by @loud wigeon: https://pastes.dev/ZmSQrdXb6w
that version of tinyremapper doesn't support that version of java
iirc, you can supply the new version in the depencencies block, but, I don't remember the exacts
try remvoing the 2nd tasks block
where?
tasks {
runServer {
minecraftVersion("1.20.6")
pluginJars(project(":wgrp-paper").file("build/libs/WorldGuardRegionProtect-Paper-${rootProject.version}.jar"))
jvmArgs("-Xms4G", "-Xmx4G")
}
}
and which one do you mean?
the one in the thing i pasted
make that ```kotlin
runServer {
minecraftVersion("1.20.6")
pluginJars(project(":wgrp-paper").file("build/libs/WorldGuardRegionProtect-Paper-${rootProject.version}.jar"))
jvmArgs("-Xms4G", "-Xmx4G")
}
and for 1.20.6 need mojmap officialy?
Paper runs using mojang mappings as of 1.20.5
I think that not all packages will be missing with Bukkit names?
thanks
so now working, thanks!
How to update tiny-remapper to use newer Java versions with old dev bundles: kotlin dependencies { pluginRemapper("net.fabricmc:tiny-remapper:VERSION:fat") } latest version as of now is 0.10.3.
Also keep in mind that some older dev bundles will fail to apply with newer toolchains due to since fixed decompiler issues (i.e. patch fails for WorldBorder.java and etc). In those cases you must use a Java 17 toolchain for the project, but can still specify newer toolchains for compile tasks.
i keep forgetting to run in debug mode instead 
not yet - i think he just needs to update the async-profiler library tho, so i'm hoping that's all that's needed to be done
hi, I am trying to swap the mapping to the mojmap as in paperdev online docs (still use plugin.yml because of commands), I have:
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
dependencies {
paperweight.paperDevBundle("${mcVersion}-R0.1-SNAPSHOT")
// ...
}
but I am getting
paperweight requires a development bundle to be added to the 'paperweightDevelopmentBundle' configuration, as well as a repository to resolve it from in order to function. Use the paperweightDevBundle extension function to do this easily.
if I add the config below the dependencies I am getting
No such property: MOJANG_PRODUCTION for class: io.papermc.paperweight.userdev.ReobfArtifactConfiguration
If I remove the property, it works normally.
I have id 'io.papermc.paperweight.userdev' version "1.7.0"
Hi, I'm unable to execute shadowJar here it is the error, if I execute runServer it works...
message.txt by @finite crypt: https://pastes.dev/x1UNVgDJoa
using the fork it works but as i said doesn't it means that there is a dep that is using java 21 and if somone try to load the plugin with java 17 it will fails bc there is a dep compiled with java21?
cant test locally since your dependencies aren't on a repo ¯_(ツ)_/¯
ok don't worry, ty.
here:
message.txt by @foggy crypt: https://pastes.dev/ecWEiITbE6
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
a previous helper told me to change <java.version>1.8</java.version> to <java.version>17</java.version> btw
the log
oh my bad
[WARNING] io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT/maven-metadata.xml failed to transfer from https://repo.papermc.io/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of papermc-repo has elapsed or updates are forced. Original error: Could not transfer metadata io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT/maven-metadata.xml from/to papermc-repo (https://repo.papermc.io/repository/maven-public/): Connect to repo.papermc.io:443 [repo.papermc.io/104.26.12.138, repo.papermc.io/104.26.13.138, repo.papermc.io/172.67.72.198] failed: Connect timed out
[WARNING] io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT/maven-metadata.xml failed to transfer from https://repo.papermc.io/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of papermc-repo has elapsed or updates are forced. Original error: Could not transfer metadata io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT/maven-metadata.xml from/to papermc-repo (https://repo.papermc.io/repository/maven-public/): Connect to repo.papermc.io:443 [repo.papermc.io/104.26.12.138, repo.papermc.io/104.26.13.138, repo.papermc.io/172.67.72.198] failed: Connect timed out
[INFO] Validation error:
[ERROR] Failed to read artifact descriptor for io.papermc.paper:paper-api🫙1.20.4-R0.1-SNAPSHOT
[ERROR] [server] Maven transfer artifact problem: io.papermc.paper:paper-api:pom:1.20.4-R0.1-SNAPSHOT
Cannot resolve io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT
can you connect to repo.papermc.io
how? just entering this? https://repo.papermc.io/repository/maven-public/
yes
alr
in ur browser
one second, the browser just opens with a vpn
are you from brazil
so should i just use a vpn?
Yeah, may also want to complain to your ISP
alr
thanks
sorry for the trouble
im really bad at this
can someone help me with my build script
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
java
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "github.unjoinable.io"
version = "1.0.0"
repositories {
mavenCentral()
maven (url = "https://jitpack.io")
maven {
name = "papermc-repo"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
name = "sonatype"
url = uri("https://oss.sonatype.org/content/groups/public/")
}
}
dependencies {
implementation("com.github.stephengold:Libbulletjme:20.2.0")
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
}
tasks {
named<ShadowJar>("shadowJar") {
archiveBaseName.set("Physics")
mergeServiceFiles()
manifest {
attributes(mapOf("Main-Class" to "io.github.unjoinable.physics.Physics"))
}
}
}
tasks {
build {
dependsOn(shadowJar)
}
}```
it doesnt compile properly for some reason
can you show the error you're getting
well the error is in console because a part of library is missing
i decompiled and checked it too
u think it can be because of buildscript
It’s a linkage error
linkage error?
Likely it’s expecting that something loads a native library and that failed or didn’t happen for some reason
Work out what it’s missing
probably need to add a second dependency with the natives themselves
All I can see is the error
also it makes 2 jars 1 with just my code and 2nd with libs too
You’d need to seek support from the library devs potentially
Well, yea, but there was a linker error, so either you’re missing the natives for your platform or somebody missed a hook point to load them
okay
i thought it might be build script error purely because i just changed from normal to kotlin ones
I mean, it could be
dam i realised there is 1 for maven too
imma quickly change project to maveen cause i dont know gradle
I mean, they’re both build tools, you can use either assuming you don’t need server internals
Hey'o, I seem to be having quite some trouble executing the Gradle 'applyPatches' task, which is giving me an error. I am using Windows 10, trying to run the task on the cloned Paper repo, on an exFAT formatted drive, without directly using WSL.
The error in question:
io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false config commit.gpgSign false```
Now, I did look at the more common causes of this, such as git credentials and such, but all of it seems to be in order. Running the git command alone provides zero output. This issue only occurs if I am using Windows (no WSL) **and** on an exFAT drive. If I use WSL **or** the drive format is NTFS, then it works fine.
@tawdry wing i'm not the biggest expert on gradle, but can you not apply the userdev plugin?
that check happens inside an afterEvalutate block as well for the project it's applied to (for what it's worth)
I have applied it, but in order to build there's a check in paperweight where the dev bundle must be set. However I register all my dependencies in the afterEvaluate (and thus the devbundle will need to be here aswell) but it doesn't look like paperweight-userdev supports this
I mean can you declare the plugin with apply false and then apply it in the afterEvalutate?
Yea, that's what I have done, but I still get the Cause: paperweight requires a development bundle to be added to the 'paperweightDevelopmentBundle' configuration, as well as a repository to resolve it from in order to function. Use the paperweightDevBundle extension function to do this easily. unless i specifically put it in the noraml dependencies {} section and not afterEvaluate
yeah, idk then. I don't know enough about how afterEvaluate works or even when or why it's used
Yea, I mean, ideally the checkForDevBundle should have a system property to disable the check and I can perform it myself in the afterEvaluate https://github.com/PaperMC/paperweight/blob/4d47004311d2916539fe472442cd67c96f1a24c9/paperweight-userdev/src/main/kotlin/io/papermc/paperweight/userdev/PaperweightUser.kt#L210C25-L210C42
the check itself is performed in an afterEvaluate already
is there an ordering thing there? if multiple afterEvaluate actions are added
like if you add your afterEvaluate before applying the userdev plugin maybe?
I'm not exactly sure how to do that tbh, I'm most likely gonna just recode my plugin conventions so it no longer uses the afterEvaluate. I coded it a while ago and took forever to get it working 
bump
does groovy used named properties?
like, project("a", configuration = "b")
if not, eeerrrr, see the gradle api docs and figure out what method it was that lets you specify a configuration
but, you probably do wanna look into migrating away from groovy, the community as a whole is generally moving on from it
you understand groovy but not kotlin? 👀
Because groovy is generally not an "IDE first" type language, and so IDE tooling, etc, generally sucks at managing it
looking at it tho, project(path: ":project", configuration: 'config') should work
and so, beyond the fact that groovy is generally far from an ideal language, and kotlin has better IDE integration, etc, etc, people have generally been moving over to kotlin, especially as you can use it for more things
think i tried that can’t remember
Yea, that looks about right, I don't think path needs to be named, however
i’ll probably just switch this specific project to kotlin
would be a good idea 👍
Will the shadow plugin ever work with Java 21? Tryna develop against it but it shits itself
Drop in replacement id assume?
Can you add for that link some shortcut command ?
My paperweight userdev says Failed to apply dev bundle patches. See the log file at ...
The log file says that 3 hunks failed. I am currently using version 1.19.2-R0.1-SNAPSHOT.
Is there something i can do to fix that? I already removed the folder of the gradle cache for that version and ran it again
please ping me if you respond
read the pins
hi, I'm trying to run runServer task in my paper fork project and I get this error
> Task :roxypaper-server:runServer FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':roxypaper-server:runServer'.
> Failed to calculate the value of task ':roxypaper-server:runServer' property 'javaLauncher'.
> Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=21, vendor=JETBRAINS, implementation=vendor-specific} for LINUX on x86_64.
> No locally installed toolchains match and toolchain download repositories have not been configured.
how can I just use my existing corretto 21 installation or fix this?
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
} add this to settings.gradle.kts
okay, thx 🙂
