#build-tooling-help
1 messages · Page 21 of 1
You tried to apply the patches that you modified
the patch failed
your git repo is now in a busted state because you didn't resolve that
you tried to run a command which expects the repo to be in a specific state, which it is not
i didnt even created it xd
so i used publish to maven locally
paperweight creates the git repo for that tree
I think you have a poor understanding how any of this stuff works
I cannot help you
Working with patches requires deep understanding of git
Is there any way I could have my paperweight dev bundle in the runtime classpath? I want to create a little codegen tool that makes updating my nms stuff between minecraft versions easier
got it working by adding mojangMappedServerRuntime to the runtimeClasspath
(which is not the dev bundle but is what you want)
I'm trying to build the current 1.21.5 branch and I'm getting this error, anyone know whats up?
https://pastebin.com/raw/vEfWAKk8
feature patches arent working yet
We aren't released yet, so yeah it's a work in progress. Gotta wait until we announce it's ready.
oh ok, I was hoping I could build some sort of DEV version but thanks anyway
ApplyFilePatches
how does that differ from applyPatches?
It doesn't apply feature patches
applyPatches = applies everything
applySourcePatches = source patches
applyFilePatches = (correct me if im wrong) applies the datapack file patches
File patches depends on source and on resource patches
Apply patches depends on file patches and feature patches
i was close, also thats good to know as i ran file AND source 😂
I'm trying to patch paper 1.8.8 from here
https://github.com/PaperMC/Paper-archive
But when I do mvn clean install it gives me a bunch of errors
I think our general position on 1.8 is "it's super old, so we can't really help you with it" even in this channel. If you can't resolve that kind of stuff it's probably a larger undertaking than is worth it. It's 10+ year old code and tooling.
We generally know that that doesn't work
you'd need to clone the branch and apply the patches, and fix every issue that comes your way in the process
I was hoping it would work since I have an underlying issue that needs fixing. Do you guys know any other open source spigot forks that I can apply patches to?
Nope, we just focus on our own software here.
Ok
Running 1.8 in 2025 is bonkers.
It's for a community that plays 1.8
I'm remaking a gamemode on the Hypixel network after it has failed to receive any updates for 3+ years
Hypixel uses their own software. Generally don't try to be Hypixel
Anyway - I'm not here to try to convince you otherwise.
We can't help much with 1.8. Sorry.
Good luck!
I think that there was 1 or two forks out there which where kinda maintained, but, you're generally on your own on that front
Is it possible to transfer performance optimization patches in paper to spigot?
there is a reason why we moved away from bash scripts for all of this stuff
with enough effort, sure
But, again, we just worry about our own software. Anything like that is far beyond the scope of this channel / Discord.
We don't need this kind of comment/etc in help channels.
ok,i deleted
do I have to use paperweight 2.0.0 beta for 1.21.5 or is the latest stable version fine?
is there a list of breaking changes
Should just work
alr
Make sure you also use latest Gradle
wait is spigot reobfuscation still supported in 2.0.0?
for now, yes ™️
please don't remove it 🙏
we will in the future
Same goes for the remapper that allows spigot mapped nms plugins to run on paper.
That thing is there as a transition period helper for devs, not a long term commitment to allow spigot NMS to run on paper
yeah that makes sense once spigot is completely dead
i mean it already is
Well no, we are already no longer a spigot fork
we are not "waiting" for anything from spigots side
We are just giving devs time to migrate over to mojang mappings
i am talking about popularity
Yea I am not
spigot popularity is irrelevant to this
If you still wanna support both paper and spigot NMS you should look into modules for each platform
it’s like 10 percent at most anyway iirc
i don't, i just maintain a library and i don't want to drop spigot support
This isn't really the channel for conversation around popularity of Minecraft software.
okay sorry
Then you'd want to look modules for each platform, as lynx said.
i'll probably just switch everything to reflection
at some point
> Could not resolve org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT.
Required by:
project :scoreboard-library-modern
> Module 'org.spigotmc:spigot-api' has been rejected:
Cannot select module with conflict on capability 'org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT' also provided by [io.papermc.paper:paper-api:1.21.5-no-moonrise-SNAPSHOT(apiElements)]
> Could not resolve io.papermc.paper:paper-api:1.21.5-no-moonrise-SNAPSHOT.
Required by:
project :scoreboard-library-modern > io.papermc.paper:dev-bundle:1.21.5-no-moonrise-SNAPSHOT:20250327.163108-2
> Module 'io.papermc.paper:paper-api' has been rejected:
Cannot select module with conflict on capability 'org.spigotmc:spigot-api:1.21.5-no-moonrise-SNAPSHOT' also provided by [org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT(compile)]
how can this be fixed?
just depend on the paper dev bundle
i can't, i have multiple modules A and B, A depends on spigot-api, and B depends on the dev bundle but also depends on A
so it causes that capability error
then exclude spigot when depending on module a
yeah that works
does anyone know how to fix this? i'm trying to compile a fork of paper for 1.21.5 and it's giving these errors
i never touched this file and i heard that paper is supposed to compile on the latest commit
applying the pufferfish patchset is not going to make your life easier
i'm updating my fork of it
oh okay nvm i figured it out
i had to change the generatedDir in the server build.gradle.kts
@@ -262,7 +_,7 @@
jvmArgumentProviders.add(provider)
}
-val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
+val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("../paper-server/src/generated/java").asFile.toPath()
idea {
module {
generatedSourceDirs.add(generatedDir.toFile())
now it compiles 😎
im trying to run gradlew applyPatches but I keep getting this error that I can't figure out, anyone know what could be causing it?
* Where:
Build file 'D:\dev\Paper\build.gradle.kts' line: 88
* What went wrong:
Could not create task ':paper-api:test'.
> Could not create task of type 'Test'.
> Could not create an instance of type org.gradle.api.internal.tasks.testing.DefaultTestTaskReports.
> Could not create an instance of type org.gradle.api.reporting.internal.DefaultReportContainer.
> Type T not present
* 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 940ms
Configuration cache entry stored.```
deleted my jdk and reinstalled from adoptium and now it works 🤷♂️
morning all. can anyone help me with the give command? Im running the lastest papermc on docker, with geyser and floodgate installed. Everything else is vanilla. I have one admin that can run the give command fine, but giving items with enchantments is not working. I tried installing essentials but it made no difference. Here is the error i get thats saying my syntax is wrong where its expecting a number and not curly brackets:
full comand was: /give <player> minecraft:diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:5},{id:"minecraft:unbreaking",lvl:3},{id:"minecraft:fire_aspect",lvl:2},{id:"minecraft:looting",lvl:3},{id:"minecraft:sweeping",lvl:3}]} 1
that looks like a pre 1.20.5 command.
Also not sure how thats related to this channel
sorry. which channel should i ask
#paper-help is usually the channel, but considering youre running year old software, i dont think youre going to get a lot of help.
then you should use 1.20.5+ commands
can you give me a pointer on using enchantments 1.20.5+
cool thanks
i just switched to gradle.kts and i do not understand the problem here, i searched online but i can't see where to fin the syntax of kts
share your entire buildscript
i should have fixed it by adding uri(link)
now i get this error at line 51
Please send logs to mclo.gs and other large files to pastes.dev.
that's my build https://pastes.dev/AcgHfC5fLu
How can I make gradle build something deprecated for removal. I have a class I have marked as deprecated for removal myself? It does not build. When I remove it, it will build. I just want those red markers in the code so that I know what I have to remove, but I still want the ability to test. Gradle is so annoying because it is so restrictive, I also can't build a javadoc jar when not ALL methods, even those which are obvious (getter/setter) have a comment with all parameters. It's so stupid.
i think it should be
tasks.withType<JavaCompile>().configureEach {
thank you a lot, now i am getting this new error
line 59
You have groovy code inside of a kts file, you basically need to convert stuff into kotlin
if you want to configure a task, generally you need to go to the tasks container, i.e. inside of a tasks block, or, tasks.taskName
i ran this:
and i cant find the right folder
you have the clean task highlighted
that will delete the target folder
you want package, right click it and create a run task for it
What is the meaning of paper-server and folia-server (I forked folia) + myfork-server and same with api. Because right now I see some of the files are arbitarily thrown inbetween these 3 directories, whats the logic and where can I easily find where to look for a specific file (when applying patches from pre 1.24.4)
I mean, it's layers
folia is a patch over the top of paper
when modifying stuff in the folia repo, you ignore the paper folders
but why some mc files are in myfork-server, some of it is in paper-server and some of it is in folia-server
because its' done in stages
folia patches over paper-server, and you can't patch paper-server without having paper-server
step 1 is to use the right channel
Oh, sorry :(
I mean classes like CraftPlayer. I fork folia, shouldn't these classes be in folia-server or in myfork-server?
because right now I make a feature and I have to commit this feature in 3 different git repositories
They will be in all of them, because they're patching layers
You once again do not need to touch the other folders
They're not even added to your project compilation
@timid carbon the gradle cache is in .gradle/caches
thank you
I don't see a "caches" folder in my .gradle folder. I did see a configuration-cache folder which I deleted but didn't do anything
stacktrace?
the full log that gradle outputs when you run the build
or do you want me to run with --info?
I'll run with the info flag
oh sorry just realised that the caches folder was under my users folder, not the project folder
technically they both potentially have them
message.txt by @timid carbon: https://pastes.dev/PDmMEAFlWQ
message.txt by @timid carbon: https://pastes.dev/J1UgLsXNTg
Caching disabled for task ':paper-server:indexLibraryFiles' because:
Caching has not been enabled for the task
Task ':paper-server:indexLibraryFiles' is not up-to-date because:
Task has failed previously.```
very weird error
That's not the error
what do you suggest?
There is some corrupted jar or zip somewhere
If it's not in Gradle's caches folder then I don't know where it is
Run the clean task, whatever that's called, or delete .Gradle in server
Same error
It can't possibly run that fast
Calculating task graph as no cached configuration is available for tasks: clean
> Configure project :paper-server
paperweight-core v2.0.0-beta.14 (running on 'Windows 10')
BUILD SUCCESSFUL in 1s```
It did
No I mean the appP
oh
And I am not sure if that's the task that actually deletes the caches
cleanCache seems to be it
what's concerning is that it only took 5 seconds...
did nothing 🤷
Run appP with --stacktrace after manually deleting .Gradle in server
It should took quite some time to run appP
I'll asume ".gradle in server" means the .gradle folder under C:\Users\Jadyn\?
No, paper-server
ohhh sorry
Required by:
root project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.16
> No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16 was found. The consumer was configured to find a library for use during runtime, compatible with Java 23, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.10' but:
- Variant 'javadocElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 23)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.10')
- Variant 'shadowRuntimeElements' declares a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies repackaged (shadow jar):
- Variant 'sourcesElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 23)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.10')```
Gradle version: 8.10
Java: Oracle OpenJDK 23
How to deal with this?
Update Gradle
@bronze ember vielen dank, my internet is quite slow so it'll be a while before I can report back. Thanks for helping so far!
I'll be around
message.txt by @timid carbon: https://pastes.dev/JWJGqJzYtQ
do you have a anti virus/firewall/restrictive government?
none of those
because something is messing with your downloaded files...
might be worth running an anti virus too... viruses might modify jars too lmao
oh the windows defender firewall is on
this hasn't happened before though lmao
i'll consult doctor malwarebytes and get back to you
Can also try to manually open the libs and see
Should be somewhere under paper-server .Gradle caches paperweight libraries or Minecraft or something
yeah, there's most likely just one being 0 bytes big
this would be in the project folder and not the .gradle folder in my users folder?
In the paper-server module
It may sound ridiculous but when I use this, for some reason I can't get the same result as mache. Even though the mappings and .jar versions are all the same, when I compare the code I get a different output. ```bash
librariesClasspath=$(find ".cache/$mcVersion/libraries" -name "*.jar" | paste -sd ":" -)
java -jar "tools/jars/codebook.jar"
--remapper-file="tools/jars/autorenamingtool.jar"
--mappings-file=".cache/$mcVersion/server.txt"
--params-file=".cache/$mcVersion/parchment.zip"
--output=".cache/$mcVersion/server-deobf.jar"
--input=".cache/$mcVersion/server.jar"
--input-classpath=$librariesClasspath
--hypo-parallelism=1
--force || exit 1
Here I am trying to remap the server and apply mache patches but I am not getting exactly the same format as mache
Sounds silly but it worked thank you
codebook deals with renaming and bytecode normalisation
decompilation is left to the decompiler, all the formatting stuff is decided by it
Make sense
Your branch is old, pull and appP
what is the equal of EntityPig (nms) on Paper?
i have the dev bundle but i cant find that class
Pig
use that to help convert spigot > mojang
i guess is the first one right
do you want nms pig or bukkit pig
thank you, i dont use nms but im trying to understand it :)
yeah
i want to create a custom entity
just a pig that can have a owner
and he will follow him
you could probably do that with pdc
iirc every mob is a pdc holder
yea but you mean saving the owner uuid and make the entity teleport to the player some time or what?
if thats what you want sure
I want the entity to behave like a wolf, cat or any tame animal
apply...FilePatches will error with Failed to apply 0/x hunks, without mentioning the patches that weren't applied since their target was lost. I mean it does, but as a warning which can be easily overlooked
should i create an issue on the tracker? I can see someone getting confused by this since it's very easy to gloss over
Re-cloned the Paper repo, completely redownloaded and installed Gradle, ran the task, downloaded dependencies, failed in the exact same way.
if it's failing in the exact same way, you'd need to work out why you keep getting corrupted zip files
There isn't really much we can advise there which isn't "try deleting the cache folders manually" and "check your environment", make sure that the path isn't too long, make sure that you're not running in a folder affected by some file sync stuff
When using the hangar publish plugin in a GH workflow, does it do anything to expose the version url or should I just pipe the entire output somewhere in the workflow and grep for the url?
im trying to fork folia, but i cant seem to get it work
https://pastes.dev/JyTWXf4iiV
i cannot get familiar with the new paperweight thing
i have read the CONTRIBUTING.md but i cant understand how would i add new patches ?
how do i modify the patch of the build.gradle.kts in the -api and -server ?
Not to my knowledge, how would it do that? Sounds like a decent feature request
i think need parse because if wanna an output that need a github action for hangar who can allow that i think.
https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action#creating-an-action-metadata-file
i have followed the guide in CONTRIBUTING.md for patching for paperweight 2.0
but im unable to do fixup tasks
what is the issue here ?
that is for paper, not for forks of fork
read the gradle tasks, you are looking for "single file" patches if you wanna edit the .kts build files
i tried task 'rebuildFoliaSingleFilePatches'
didn't work :/
im not sure what the git command means or what it is doing
im not sure how to deal with these git commits because i dont know how paperweight actually works, didnt find the document on it
Is this still a fork of Folia?
The tasks are names according to who owns them
You are not folia
You haven't given your thing a name from what I can see, and thus, your tasks will be named Fork
The how at least is just echoing out to GITHUB_ENV. Might look into a way of doing it and PR it :)
that feels out of scope for the gradle plugin tbh
I guess it'd be more in-line to create a GH action that wraps the gradle plugin and parses it out. For instance, https://github.com/Kira-NT/mc-publish seems to just wrap around a ton.
Ended up doing a very cursed:
- name: Publish
id: publish
env:
HANGAR_API_KEY: ${{ secrets.HANGAR_API_TOKEN }}
run: |
output=$(./gradlew build publishPluginPublicationToHangar --stacktrace)
echo "$output"
echo "output<<EOF" >> $GITHUB_OUTPUT
echo "$output" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Parse publish result
id: parse-publish-result
run: |
version=$(echo "${{ steps.publish.outputs.output }}" | grep "Successfully published VillagerLobotomy version" | sed -E 's/.*version ([^ ]+) to.*/\1/')
url=$(echo "${{ steps.publish.outputs.output }}" | grep "Successfully published VillagerLobotomy version" | sed -E 's/.*Hangar: ([^ ]+).*/\1/')
echo "version=$version" >> $GITHUB_OUTPUT
echo "url=$url" >> $GITHUB_OUTPUT
``` 
Good evening, I am currently correcting my gradle. But I can’t get paperweight. The project compiles correctly but IntelliJ does not recognize classes.
Did you have any ideas of why ?
final net.kyori.adventure.text.serializer.@NotNull ComponentDecoder<? super String, C> decoder
how am i supposed to find this?
i am trying to get from the config, instead of a list of string, a list of Components
the method is this: config#.getComponent(BPItems.LORE_KEY, decoder??);
The serialisers are ComponentDecoders
?
you are not specifying the repositories
also you are not importing correctly the paper api
repositories {
mavenCentral()
maven {
name = "papermc-repo"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}```
```kotlin
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
}
The general serialisers used for MM, etc, are implementations of that interface
you would just pass in a MM instance, for example
i did, but it seems that it is invalid
I already have it in the build.gradle of my project, should be enough?
for the common use case you don't need to add the repo manually and you shouldn't add the api dep manually
it's already a transitive dep of the server
try building from console, intellij doesn't like to show errors
multimodule?
yep
what I said still applies
look at the multi project branch of the test plugin if you need an example
okay thx !
I wanted the url that the plugin returns instead of assuming a format
Mmh, fair
val simpblossom = forks.register("simpblossom") {
upstream.patchDir("paperServer") {
upstreamPath = "paper-server"
excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
patchesDir = rootDirectory.dir("simpblossom-server/paper-patches")
outputDir = rootDirectory.dir("paper-server")
}
upstream.patchDir("foliaServer") {
upstreamPath = "folia-server"
excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
patchesDir = rootDirectory.dir("simpblossom-server/folia-patches")
outputDir = rootDirectory.dir("folia-server")
}
}
activeFork = simpblossom
if i need to patch into the code that folia has patched into paper-server codebase, where do i do it ? into folia-server or paper-server ?
You do not care about the folia or the paper folder
Those are not yours, those are still just required as part of the chaining
you modify the files inside of your fork
ah ok thanks
i dont see the source of com.destroystokyo path in my simpblossom-server folder, how can i make patches to that com.destroystokyo ?
Those aren't minecraft classes
those will be in the main source folder, not the minecraft one
there is only the forkserverfile class
You have to modify paper-server
you can check the guide on how all this works in the closed pr on the paperweight-examples repo
@slim dawn
ok thanks :d
oh, I didn't realise how cursed the repo layout had become with v2, that's, interesting (And this is why you read the docs instead of trusting some idiot on discord)
Hello, I have a problem like this. I decompiled the server according to Mache and downloaded the patches, but when I use the diffpatch tool used to apply these patches, the patches are never applied. I always get an error. I tried to write the Maven plugin as a separate Java application. I tried to use its own CLI tool, but I couldn't. Is there a way to solve this without using Gradle?
Our tooling doesn't really support maven anymore. You're basically on your own if you aren't using gradle.
I'm not exactly using your tooling tools, I'm just trying to apply mache patches, but this diffpatch program is driving me crazy, I guess I'll just apply them all manually.
You never even shared the error
Yes you are right because I do not get any error diffpatch does not apply patches all the time Failed to apply patches. Number of failed patches: 0 I am sure I did everything right
applyMachePatchesMojo.java by @clear vector: https://pastes.dev/gBgG69txZR
Well, attach your debugger and dig into diffpatch
I had to do so countless of times when I wrote the paperweight tasks
That helps you figure out what params are wrong
I examined a project using mache and noticed sometging the file created as patched.jar constains Java files not classes
I think this is my problem
will consumers of my nms using library automatically depend on the reobf jar or do i need to configure that
im putting my nms code in a different module in order to not accidentally use nms in the main module
im wondering if ill have to edit the nms module in order to be remapped when included into the main module
for 1.21.4?
please try to give as much context upfront as possible like the linked page says
yeah
idrk what other context i can give
module a is my plugin, module b is nms part of that plugin. im wondering if including module b into module a will automatically apply the reobf to module b
you don't need to reobf since 1.20.5
wait so the server is completely deobfuscated?
if you were targeting older versions or want to waste user's time and disk space, the ''answer" is the oldest pin here
yes the server has been mojang mapped since then
it deobfuscates legacy plugins
unless someone is paying you a lot of money to support the dozens of spigot users out there, you shouldn't reobf
... the same as always
so all paperweight does post 1.20.5 is provide access to nms api?
the entire point of userdev has been to provide access to mapped server internals since the beginning
there is no 'nms api' though
...oh right sry got confused for a moment
it's just server internals
ty for the help
in order to facilitiate that we used to have to reobf plugins at build, but no more
is paperweight incompatible with arm64? im getting this error when building my plugin. idk how this stuff works 😅
> Error while evaluating property 'launcher' of task ':paperweightUserdevSetup'.
> Failed to query the value of task ':paperweightUserdevSetup' property 'launcher'.
> Failed to query the value of extension 'paperweight' property 'javaLauncher'.
> Service 'SystemInfo' is not available (os=Windows 11 10.0 aarch64, enabled=false).```
seems some Gradle stuff doesn't: https://github.com/gradle/gradle/issues/29807
paperweight uses that to auto-provision a JDK. there might be a way to disable that (and to provide your own manually), but I don't know that
what is latest paperweight version with java17 support?
wanted to build for 1.20.6, not sure if 1.20.6 is java 17 or 21
it looks like from 1.20.5 forward it is java 21
Can i set dependencies in a multimodule gradle project available for all the subprojects as well?
E.g i want to use lombok in every subproject but i thought that there is likely a better way than adding it to every build.gradle for each subproject
i believe you just add it to the main build file
tried that but it only works for root then
use allprojects { and set the dep there
hey so I tried updating paperweight userdev in my gradle and it's made all my dependencies and tasks error lol
when I try refreshing my gradle, the only output I get is this:
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
BUILD SUCCESSFUL in 218ms
here's my build.gradle.kts, all I wanted was to use 1.21.4 lol: https://paste.learnspigot.com/uboxepuqek.py
LearnSpigot provides a free web-based pastebin service for storing and sharing code snippets with anyone. Powered by hastebin.
what error do you get
all of this is unresolved reference
try applying the java plugin
^ Probably need that as that is what usually provides the implementation configuration iirc
like this?
this was all working before i changed the paperweight userdev version 😭
if I go back to a different version, like 1.7.7 (most recent non-beta), I get the following:
Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
Then, bump it back to the latest beta and hit the reimport button
if it still fails, do a built from the terminal/try restarting IJ
the only thing that happens when i refresh gradle with the newest version is just
prepareKotlinBuildScriptModel BUILD SUCCESSFUL
but it doesnt actually import anything
ive invalidated caches and restarted intellij but that hasnt changed anything
and if you do a build?
LearnSpigot provides a free web-based pastebin service for storing and sharing code snippets with anyone. Powered by hastebin.
You need to update gradle
you are the goat tysm good sir
never wouldve been able to figure that out on my own
This might be a silly question, but I am finally moving "with the times" and am updating my plugin from 1.20.4 to 1.21.5. I have already followed the steps outlined in https://docs.papermc.io/paper/dev/userdev to change my build.gradle.kts, and updated the code where needed to make it compile against the experimental paperweight.paperDevBundle("1.21.5-no-moonrise-SNAPSHOT"). However, in the past we used reobfJar to compile the plugin, but what has this changed to now? Extra context: I do not care about Spigot compatibility and can thus use a Mojang-mapped output. And more importantly: my plugin also uses the shadow plugin to shadow in some extra non-Minecraft-related dependencies like Jackson and some own libraries.
I can run the Gradle build or reobfJar tasks, but it does not appear to then shadow in the other dependencies.
Ah wait, I might have already answered my own question: I need to use shadowJar again. Will have to test if this one works, but the jar is now significantly bigger. I have gotten too used to reobfJar
Yeah if you don't care about spigot just run shadowJar as it no longer needs to reobf
Hey guys i am currently trying to push my mullti-module gradle project to jitpack so i can use it as a library but i run into problems when jitpack is building using paper
bad class file: /home/jitpack/.gradle/caches/modules-2/files-2.1/io.papermc.paper/paper-api/1.21.4-R0.1-SNAPSHOT/bdf888190417929a453af7e053cc7406fc4178b4/paper-api-1.21.4-R0.1-SNAPSHOT.jar(org/bukkit/inventory/ItemStack.class)
221. class file has wrong version 65.0, should be 52.0
222. Please remove or make sure it appears in the correct subdirectory of the classpath.
I would love some help
also you don't really want to use jitpack if this is a public project that others should be able to build too 👀
well regarding this, i didnt really know what i use in order for people to import it easily using gradle so i thought id use jitpack
what would i use instead that implemention is done easily
well usually you just deploy to maven central if it fits... but github offers maven repos too or you just deploy it to some maven repo/file server you run yourself
the main issue with jitpack is that there is no guarantee that each version will continue building in the future (as they don't store builds after a short cache period if you don't pay them)
alright ill look into that
also jitpack builds just randomly break at times lol
there's also this "fun" issue when people name their group ID after their github profile with com.github that jitpack thinks it needs to build that when you have it as a dependency instead of getting it from the real repo
Running a blank right now with a 1.21.4 fork. Keep running into this error ( Shown here: https://i.tricrotism.com/3ioayhap.png ), and don't remember exactly how to resolve it. Attempted to Clean Cache, and some other gradle tasks but just running a blank how to resolve it again.
(Ping me with a response if you have feedback)
Delete that .gradle and try again
Also, just a site note, but folders with spaces are always a really bad idea
Server
Gonna re-implement my patches in a fresh fork and see if I somehow can get the same thing or not
Can anyone give me downlad link of paper 1.20.1
To download old versions of Paper, go to the build explorer: https://papermc.io/downloads/all. Note that old versions are completely unsupported and contain numerous bugs/exploits.
but also wrong channel
To download old versions of Paper, go to the build explorer: https://papermc.io/downloads/all. Note that old versions are completely unsupported and contain numerous bugs/exploits.
so where i can ask
#paper-help was the right place
What is the intended way to merge upstream changes into my fork when I'm updating it (by changing the commit hash in gradle.properties)? I need to fix the patch files since the line numbers are off and I don't know how to do it without just manually updating them
you apply the patches and deal with the conflicts/rejects
you can apply fuzzily or just configure generating .rej files and apply those hunks manually and merge using git rebase into the file patches commit
if ure referencing file patches that is
for feature ones well u just do it manually 
Did this and worked fine, probably was a borked patch
It looks like you've encountered an issue with our tooling. Before proceeding with troubleshooting, please review the list below to ensure your setup is up to date.
- Ensure Gradle is updated.
- Verify that the userdev version is the latest.
- Please share all
build script files,logs, and any other relevant information. Upload them to pastes.dev
Lastly, please take the time to describe the issue in detail, as this will help us diagnose and resolve it more effectively.
@tribal dagger ^
output log
It would take less time if I did it by hand
Unless your project is setup with 20 dozen other versions before it, no, that probably has stalled out or something
Doesn't the paperweight work with arm processors?
So what exactly can I do in this situation?
cancel it and try again
Still same
you might need to run the cleanCaches command if it complains about that version, or, try to delete the busted files manually
Well, it takes some time to decompile, it's not instant
I could easily do it in a very short time with a non-official maven plugin.
I don't understand why the paperweight is causing problems. I already did what you said and I decompiled Minecraft many times on this device and it never took this long.
I mean it takes around the same time for me when i’m using windows
did you cancel it, delete the caches, and try again?
Yes i did
Decompile speed has nothing to do with OS
After completely remapping the server, isn't it enough to add it as a dependency? Why does it take so long?
Need to apply patches
And it's not normal that it takes so long
It takes a few minutes max the first time on a modern PC
And is cached after that across all projects using that version
Normally it would take at most 10 minutes to decompile with vineflower, now I'm waiting for it to compile for about 1 hour.
Maybe it's running oom or something, there should be logs for the VF output somewhere
haaaah just accidently toasted my .gradle folder, thank god for bacjblaze
hi looking at paperweight-examples v2 branch what is the correct way to edit the build.gradle.kts patches now? for example when trying to rename the fork from just fork to something else it'll try to apply fork-api and error
Rebuild single file patches iirc
Hey guys I'm trying to use paper for the first time
mc ver: 1.20.5
Im using gradle groovy and trying to use paperweight-userdev
plugins {
id 'java'
id 'com.gradleup.shadow' version '8.3.2'
id "io.papermc.paperweight.userdev" version "2.0.0-beta.16"
}
group = 'me.mqzen'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url = 'https://jitpack.io'}
maven { url "https://repo.dmulloy2.net/repository/public/" }
maven {
name = "papermc"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")
compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
//compileOnly 'com.comphenix.protocol:ProtocolLib:5.3.0'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
shadowJar {
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
archiveBaseName.set("Example-Plugin")
archiveClassifier.set("")
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
shadowJar.destinationDirectory = file(file(project.rootProject.property("shadowJarOutputDir")))
}
This is my settings.gradle:
pluginManagement {
repositories {
gradlePluginPortal()
maven{ url "https://repo.papermc.io/repository/maven-public/"}
}
}
rootProject.name = 'ExamplePlugin'
But it's giving me this error:
A problem occurred configuring root project 'ExamplePlugin'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16.
Required by:
root project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.16
> No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16 was found. The consumer was configured to find a library for use during runtime, compatible with Java 21, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.10' but:
- Variant 'javadocElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 21)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.10')
- Variant 'shadowRuntimeElements' declares a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies repackaged (shadow jar):
- Incompatible because this component declares a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.12' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.10'
- Variant 'sourcesElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 21)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.10')
the latest beta requires gradle 8.12 or newer iirc
you seem to be using gradle 8.10
Ok understood, but can you please update the docs and state it directly atleast , I didn't see it
which docs did you follow
because the userdev docs state that
Furthermore, if you are having issues with paperweight-userdev, it is suggested that you update your Gradle version to the latest version
(latest actually being 8.13)
Yes, ik it's my fault and all, I'm just suggesting to make it more clear section instead of being between multiple lines or in a paragraph
👍 I'll throw an issue at the docs to maybe make that a warning block
Alright Thank you !
oh btw, should the dev bundle be always for 1.20.4
im using 1.21.5 paper , so shouldn't i change it to 1.20.4 ?
Sorry i meant 1.21.5
You can start updating, but that is as much as the dev bundle is usable for
I mean, it seems to run fine, etc; just waiting on some stuff, the ^
would the paper dev bundle of 1.21.4 work for paper 1.21.5's dependency ?
no
it all boils down to coverage, overall, no, for the stuff you need, maybe
time to temporarily downgrade to 1.21.4
how to download builtool.jar?
paper does not use build tools, what are you trying to do
Quick question about: https://docs.papermc.io/paper/dev/userdev
In the docs, only Gradle Kotlin DSL is listed as an option. I'm using Maven POM however.
Has anyone already implemented paperweight-userdev using maven? Or is this not an option anymore?
We don't offer a maven plugin no
Generally suggest switching to gradle if you can
otherwise, there are third party maven plugins for this, we just won't offer support in those 😅
cc @sharp pelican
Ah I see.
Okay, will see if I can port my plugins to gradle.
Thank you
I don't know why, 3rd party maven plugins worked better 🤣
it is a pretty nice plugin! whether it actually works better or if the gradle plugin just skill checked you might be up for debate
When I used the gradle plugin, I waited 50 minutes for no reason but yes, it is ultimately open to debate.
that is not normal, lol
even on Windows without any exclusions it takes a few minutes max
it's not for no reason, the maven plugin does not give you sources
so you will not be able to view the server source code and the ide will not index properly
but even on my 9 year old PC decompile only takes like 3 and a half minutes
you might need to get more ram, decompile requires 4g to itself
you can also technically disable source gen buts it’s only intended for CI use - additionally most paper updates won’t require decomp to rerun
(different forks can even reuse the same decomp if the input parameters are the same in v2)
hey, so I've been eager to use the new translation features on adventure 4.20 but noticed gradle is using 4.18:
\--- io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT:20250327.133756-218
+--- com.intellectualsites.bom:bom-newest:1.52 (requested io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT)
| \--- compileClasspath
\--- io.papermc.paper:dev-bundle:1.21.4-R0.1-SNAPSHOT:20250327.133756-218
\--- compileClasspath
how can I stop IntellectualSite's BOM from importing the very outdated paper-api? relevant snippet:
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
implementation(platform("com.intellectualsites.bom:bom-newest:1.52"))
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core:2.12.3")
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit:2.12.3")
}```
Subproject A depends on module L which has an optional dependency on another module X. Subproject B depends on module M which has a required dependency on X. /a/build.gradle: dependencies { compile libraries.l } /b/build.gradle: dependencies { compile libraries.m } /dependencies.gradle: ext.libraries = [ l: [ 'com.example.l:l:1....
thats not needed
that tree printout says the paper version is being upgraded from what IS requested to the newer one needed by the server
paper only updated adventure in the last couple days, try --refresh-dependencies
(it specifically says you're using a build from march 27)
yeah that worked 🤦♂️ thanks
you need gradle 8.12
8.8 might be IJ running with it
there is a setting in IJ to use the gradle wrapper instead of the inbuilt one
how do i do that?
is there a command to update?
i tried ./gradlew update but i dont think that was it
might be best for you to kinda just update the number in the gradle/wrapper/gradle-wrapper.properties
the command to update will fail because paperweight fails
make sure to run ./gradlew wrapper after
to properly update everything else
Yea
is it for mc 1.21.4?
ok i assume so since its released earlier than 1.21.5
uh whats this
is it saying its missing hte paperweight.paperDevBundle("${version}-R0.1-SNAPSHOT")
It looks like you've encountered an issue with our tooling. Before proceeding with troubleshooting, please review the list below to ensure your setup is up to date.
- Ensure Gradle is updated.
- Verify that the userdev version is the latest.
- Please share all
build script files,logs, and any other relevant information. Upload them to pastes.dev
Lastly, please take the time to describe the issue in detail, as this will help us diagnose and resolve it more effectively.
can't really say much off a screenshot like that
judging by the snippet and what you said, it’s specified to use your project’s version ${version} so like 1.0-SNAPSHOT instead of the paper api version ${paperApiVersion} or whatever u named that constant
i was missing the entire line
thats why it was complaining
everything's good now, i fixed it
thanks anyways tho
Hello, I have a question: I am making a plugin for version 1.21.1 using Gradle, but it seems I need NMS, and when I try to import something like org.bukkit.craftbukkit.v1_21_R1.CraftWorld;, it shows as "cannot resolve symbol." I am attaching my Gradle file to see if I am doing something wrong. Thanks in advance:
https://mclo.gs/4ZCyII7
paperweight provides you with a mojangmapped server source
The type is just called CraftWorld, without the package prefix of v1_21_R1
for some reason, my one plugin gradle project is using the right paper-plugin.yml but when i build the gradle project it takes the content of my other plugin and puts it into the jar
I am getting this error:
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16.
Required by:
root project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.16
> No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16 was found. The consumer was configured to find a library for use during runtime, compatible with Java 21, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.10' but:
- Variant 'javadocElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 21)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.10')
- Variant 'shadowRuntimeElements' declares a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies repackaged (shadow jar):
- Incompatible because this component declares a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.12' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.10'
- Variant 'sourcesElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 21)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.10')```
- Incompatible because this component declares a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.12' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.10'
This is the relevent bit.
How would I fix that?
Update Gradle
hello, where do I get files like mappings.srg from?
What are you trying to do?
I am trying to create a plugin for a server, but I’m encountering issues with compatibility due to version mismatches. I need to ensure the plugin works with the correct mappings.srg files for different versions of the server.
or rather an addon to the plugin
I apologize, I put it in the wrong place.
Hey. I have a "fork of a fork".
In this case I have forked purpur. How can I "fetch" the latest "upstream" patches and apply?
so I just run, for ex. applyPaperMinecraftPatches?
how do I add my own dependency to use on the server and/or the api as well?
do I add the repository and the dependency to fork-api or fork-server?
i've tried both, syncing gradle project, and ./gradlew rebuildPaperPatches, ./gradlew rebuildAllServerPatches, but it doesn't seem to show up in auto complete
... nevermind my package was under a different namespace
Caused by: org.gradle.api.GradleException: Could not add file '/home/flameyosflow/IdeaProjects/StorySMPPlugin/build/classes/java/main/me/flame/storysmp/blocks/SMPBlock.class' to ZIP '/home/flameyosflow/IdeaProjects/StorySMPPlugin/build/libs/StorySMPPlugin-1.0-SNAPSHOT-all.jar'.
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65
plugins {
id("java")
id("com.github.johnrengelman.shadow") version("8.1.1")
//id("io.papermc.paperweight.userdev") version "2.0.0-beta.16"
}
group = "me.flame.storysmp"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public")
}
java.toolchain.languageVersion.set(JavaLanguageVersion.of(21))
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
implementation("io.github.revxrsal:lamp.common:4.0.0-rc.10")
implementation("io.github.revxrsal:lamp.bukkit:4.0.0-rc.10")
}
tasks.shadowJar {
relocate("revxrsal.commands", "me.flame.lampcommands")
}
What should I do?
use the gradleup shadow
wdym?
yalls know how to build 1.21.5? following the instructions in the readme, the build fails, so I'm currently wondering if I need paperweight to build paper (for context, the build error is ```FAILURE: Build failed with an exception.
-
Where:
Build file '/workspaces/Paper/build.gradle.kts' line: 88 -
What went wrong:
Could not create task ':paper-api:test'.
Could not create task of type 'Test'.
Could not create an instance of type org.gradle.api.internal.tasks.testing.DefaultTestTaskReports.
Could not create an instance of type org.gradle.api.reporting.internal.DefaultReportContainer.
Type T not present
- 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 52s
Configuration cache entry stored.
@qtqgyt ➜ /workspaces/Paper (update/1.21.5) $ ```
)
Must be something with your setup - I just cloned and built on a fresh machine. Make sure your stuff is working properly I guess?
currently using github codepsaces just built a fresh one with openjdk 21
specifically, I checked out to update/1.21.5
My steps were:
Create a codespace on update/1.21.5
sdk install java 21-open
./gradlew applyPatches - FAILED
I'd recommend cloning it to your PC and not using codespaces
are you using the gradle wrapper? it smells like wrong gradle version
Yeah no idea if codespaces is gonna work.
alright ill try my main computer I just like to keep it in the cloud if I can 🤷♂️
either that, or wrong java version, or JAVA_HOME mismatching the PATH java
doing a bit of searching, this same issue happened to another project, where they forgot to properly pin down the java version and it got updated to java 24, which gradle does not support: https://aur.archlinux.org/packages/android-apktool#comment-1016633
interesting
so I would assume JAVA_HOME is wrong
anyways I forced java 21 on my host and it appears to be getting further then before
I did find some loose ends in the 1.21.5 source but I presume the paper devs will fix that up soon
Again, not recommended to run the jar on production server until release.
not sure if you caught this but this isnt a production server, I mentioned it earlier

anyways thanks for helping me guys
geez this build is hammering my cpu (this cpu is 10 years old now)
we have accomplished a failed build
... ah I forgot to setup git nvm
not exactly sure what its doing with git but yk
alright! I have aquired another error! this time not related to git
yeah im just gonna wait for experimental
If you want to help, PR that feature to diffpatch
If you just want to complain, please do so quietly
huh I'm not complaining
I updated paperweight and it just did that for the single file patches, and it turns out I like it that way
(ya know... the 4th panel of the comic)
Fix what
IJ doesn't download plugins by default
That's why stuff is red
You can run mvn install and it will fix it, or you can ignore it
so how i can fix because i was making paper plugin i want to learn veloity
ok ty
My gradle throws this when i try to build
Caused by: org.gradle.api.internal.artifacts.ivyservice.TypedResolveException: Could not resolve all files for configuration ':paperweightDevelopmentBundle'.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Cannot resolve external dependency io.papermc.paper:dev-bundle:1.21.4-R0.1-SNAPSHOT because no repositories are defined.
'java.lang.RuntimeException org.gradle.api.problems.ProblemReporter.throwing(org.gradle.api.Action)'
Please send logs to mclo.gs and other large files to pastes.dev.
provide the build config
this?
build.gradle by @tame spruce: https://pastes.dev/nME9bFQ5S6
Well, the error is coming from run-paper, so, I guess, disable it for now and report it to the plugin author
kk
it works but
java.lang.ClassNotFoundException: wyzCmd.abs.WyzCMD excuse me
its literally there
The thing won't magically inclinde the contents of that jar into the other one
you'd want to setup shadowJar in order to merge the library into your actual plugin jar
is there gonna be a fun order issue if i import shadow before userdev now
btw which version do i put in
the command for just has a placeholder for version
<version>
not sure what you mean
shadow right
wait what am i looking for exactly
btw thanks for helping me to this point
version
you have the id of the plugin
slap it into that site and find the plugin, the version info and such will be on there
oh
sry for not knowing these things but i never once used any build tool even maven let alone gradle
so i need to get used to things
understandable
anyways when adding a plugin you first specify the plugin name/id and then version
says build successful
did you shadow?
thats why im asking what to do now
i have another .jar with my command api which i need
whats wyzCMD
thats my commandapi
for generic commands
then run reobfJar
epic
now im gonna fool around to see what paperdev and packets can do
i heard you can make your server much more optimized since you can emit particles and block changes and entities client side only
anyways I opened this chat to ask how can I build paper with my version of Adventure API, do I just add mavenLocal() to repos and change the adventureVersion var to my snapshot version?
i dont use maven so i cant help you with that
my guess would be Try and see if it works
its Gradle
yes
ok thx
btw
how much space does Paper take
Adventure took 10 minutes to download everything
I'd imagine Paper is much larger and takes longer to prepare
I'm asking because I'm on the lower side of disk space
few gigs potentially
I'd shallow copy
plus dependencies
*clone
(paper experimental released if you are just trying to build something)
yeah no
but yea
I dont need that
be aware, publishing the builder jar anywhere is going to get you into legal trouble
because it isn't what we publish xD
the bundler is the full minecraft server jar
ahhhhh
we publish paperclip, which only contains the diff between vanilla -> paper
it doesnt download
Yea
(but as such, it contains mojang code so, yea, no distribution)
50mb with no mc server
Well
we ship a shit ton of stuff
lol
anyways should I create a new server or can I reuse an existing one
I ran one yesterday with latest
0 idea what you changed lol
patches also have extra lines that in a sense arent related to the change.
Ex: You could patch 1 line, but the patch will be line 10 lines
(that isn't part of the jar)
oh sorry, just to use my local Adventure api
what 💀
so I cloned paper and sat trough 5 minutes of builds
and the test-plugin directly depends on the API and its dependencies
it is a pretty neat workflow
but wait
test plugin won't be able to use my version of adventure?
how can it isue it if the server doesn't ship with it
it will given you had to update the dependency in the api build.gradle.kts?
How would anything use it if the server isn't shipping it?
okay I'm confused, yesterday I made a little plugin with one single command, depended on my adventure, ran the plugin but it didnt work
the concept applies though, binary diffing two different compilations is not going to be super efficient
because the server contained stable adventure
the diff is going to be much larger than a theoretical optimized binary diff
Yea xD Just not because patches have extra lines
So did you update the adventure version in paper by changing the version in paper-api/build.gradle.kts?
then the test plugin can depend on it
root build file
Yes
ahh I see
the test plugin literally directly depends on the paper-api project
not like "latest paper" api artefacts
that is in fact neat
thanks
this is the last thing I need before my PR gets merged
Kezz wants docs and I need a screenshot
can enabled it by uncommenting the test-plugin.settings file content
where
ah I see thx
anyways back to my previous question
can I use my previous server files and just replace the server jar
or would it be wiser to create a fresh installation
the runDev task spins up a new server in your IDE
that was the hole reason I suggested it xD
OHHHH
OKAY THATS EVEN BETTER
now to wait 5 bussines days for Lunar to spin up
YES
WORKS
thank you lynx
now I can make a PR for docs
anyways here is the product:
very colourful rainbow 
I added a saturation argument
Yea I saw the PR 😅
docs time
btw
not really a question for this channel but
do docs need to build succesfuly on my machine? 😅
I'd hope adventures CI pipeline does that lol
this is the day those 32GBs of RAM I bought 6 months ago come in handy
3 IDEs and MC open at the same time
spicy
I'm not exactly sure why it's complaining about org.bukkit.craftbukkit.block.impl.. or how to fix it
are you trying to fork paper? look closely at the build files on the paperweight v2 example branches
and build file patches
Yeah I cloned that repo, fixed one thing with the patch file so it can patch properly, then ran rebuildPaperSingleFilePatches (so it saves the new patch stuff), then applyAllPatches. I'm still getting the issue when i try generating the paperclip jar task
||Deleting everything “fixes” it /s|| please advise
update:
Oddly enough, its resolving to fork-api|server/src/generated... not paper-api|sever/...
forcing it to those dirs is seeming to make it work?
https://cdn.discordapp.com/attachments/954165286293082203/1360838612823834645/udArzbT.png?ex=67fc9338&is=67fb41b8&hm=377db78e7d5423c32483f4cde36773a9094e920a8bfcc6e7aee3ce46bdd8cd98&
I got this error when I tried to build the core myself. It happened when I used gradle applyPatches. I don't know how it happened or how to solve it.
Could not write standard input to Gradle Worker Daemon 5.
java.io.IOException: 管道正在被关闭。
at java.base/java.io.FileOutputStream.writeBytes(Native Method)
at java.base/java.io.FileOutputStream.write(FileOutputStream.java:347)
at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.writeBuffer(ExecOutputHandleRunner.java:98)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.forwardContent(ExecOutputHandleRunner.java:85)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:64)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:831)
����: �Ҳ��������������� worker.org.gradle.process.internal.worker.GradleWorkerMain
ԭ��: java.lang.ClassNotFoundException: worker.org.gradle.process.internal.worker.GradleWorkerMain
Execution failed for task ':generateMappings'.
> A failure occurred while executing io.papermc.paperweight.tasks.GenerateMappings$GenerateMappingsAction
> Failed to run Gradle Worker Daemon
> Process 'Gradle Worker Daemon 5' finished with non-zero exit value 1
Looks like something is wrong with gradle / your machine
He also reported another error, saying that my .gradle\caches\paperweight\taskCache did not have decompileJar.jar. I followed the instructions and did not do anything else.
It's a very strange problem. I can run the command normally with git tool, but it doesn't run normally on idea
I added the line for plugin management suggested in the paperweight setup page and it's giving me this:
* What went wrong:
Script compilation error:
Line 12: pluginManagement {
^ Unresolved reference: pluginManagement
that goes into the settings.gradle.kts
thank you
possibly a dumb question, but is there a commonly known place to learn about the Mojang and other mappings?
I have zero experience with nms, but was told that to accomplish what I wanted(increasing tnt on tnt knockback), nms was the route I had to go. So I'm just hoping to learn what mappings pertain to TNT/explosions mainly
ah. No there isn't really a documentation for interenals
they are kinda ever changing
fabulous xD
you kinda grab the server source code from paper and start reading it
as in, within the IDE or elsewhere?
increasing the knockback distance is gonna be hard tho
Yea in your IDE usually
You could try to see if the EXPLOSION_KNOCKBACK_RESISTANCE attribute can go negative
but also miore of a #paper-dev question 😅
I know that someone has done something similar, but no idea beyond that
alrighty ty
Uhh
I am facing a in game error
so the server is running perfectly fine no errors on the console
however
when I try to login with either of my PCs it says Disconnected
This channel is for support with dev build tools, you'd want to use the applicable help channel (and, see the logs)
oh alright - my bad
https://github.com/PaperMC/Paperclip/pull/66
Can someone give me some info on whether this PR will be merged any time? It's been open since last year and there isn't much happening in the Paperclip repo
Probably not, there are huge concerns around exposing a whole bunch of extra crap into the classloading environment, we're generally just following the normal bootstrapper behavior of mojang here
Would you be opposed to the idea of adding an argument to add specific jars to the setup url classloader? My goal is to add a custom log4j appender to the server without the need to maintain and build a custom paper jar. I think this is a valid use-case and should be made possible somehow
Personally, no; that is something I could support, but, I'm also not the only dev on this project
That's fine. I'll open an issue so proper discussion can happen there. Thanks
Can't a plugin do this?
Yes but fairly late in the process so you lose stuff
Initialization order refactor wen
Currently running into this issue with paperweight https://paste.helpch.at/fupekidusa.php
The applyDevBundlePatches task fails.
Versions:
id("io.papermc.paperweight.userdev") version "2.0.0-beta.15"
paperweight.foliaDevBundle("1.21.4-R0.1-SNAPSHOT")
Any help is appreciated!
It looks like you've encountered an issue with our tooling. Before proceeding with troubleshooting, please review the list below to ensure your setup is up to date.
- Ensure Gradle is updated.
- Verify that the userdev version is the latest.
- Please share all
build script files,logs, and any other relevant information. Upload them to pastes.dev
Lastly, please take the time to describe the issue in detail, as this will help us diagnose and resolve it more effectively.
@floral whale ^
Yeah I tried with beta 16, assuming I used java 21 but checking rq
I was indeed on java 17... lol
Thanks!
How do I drop/undo patches? Git undo cherry pick whatever?
What about after that
Maybe I shouldn’t have commited all my patches in one commit ._.
delete it and apply again?
How to add the paperweight-userdev gradle plugin with just a build.gradle instead of a build.gradle.kts file as shown in the paper documentation?
When I try to add the code showed in the website, it gives me an error.
you will need to convert it to groovy
generally we heavily advise against using groovy and provide no support for it
is converting the file to build.gradle.kts also an option?
since I think my problem is that I am using groovy
when I created the project it also didn't give me an option which DSL I wanted to use
if you mean the mc plugin, it doesn't have kts templates
nothing prevents you from converting to a kts file other than it being a manual operation
ah so the mc development plugin does not support using the kotlin DSL for gradle
I'll just convert it manually then
when running it with gradle.kts (properly converted) and adding the lines needed to add the plugin I get this error
io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.16 No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.16 was found. The consumer was configured to find a library for use during runtime, compatible with Java 21, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.7'
ah ok, it does run without paperweight-userdev strangely
as the eror is saying, paperweight userdev requires a newer gradle version
it explicitily tells you which one in the part of the error you cropped
ah this line told me
- Incompatible because this component declares a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.12' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.7'
is paperweight-userdev compatible with 8.13? because when attempting to add it, I get the following
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'Unauthorized'.
> Failed to notify project evaluation listener.
> 'java.lang.RuntimeException org.gradle.api.problems.ProblemReporter.throwing(org.gradle.api.Action)'
running with --stacktrace, it seems that it's attempting to use the problem reporter api, which is currently an incubating api, but it's getting a no such method error
Caused by: java.lang.NoSuchMethodError: 'java.lang.RuntimeException org.gradle.api.problems.ProblemReporter.throwing(org.gradle.api.Action)'
at io.papermc.paperweight.userdev.PaperweightUser.checkForDevBundle(PaperweightUser.kt:277)
at io.papermc.paperweight.userdev.PaperweightUser.access$checkForDevBundle(PaperweightUser.kt:65)
at io.papermc.paperweight.userdev.PaperweightUser$apply$5.execute(PaperweightUser.kt:179)
at io.papermc.paperweight.userdev.PaperweightUser$apply$5.execute(PaperweightUser.kt:153)
looking at the gradle api docs, 8.13 does not have a method ProblemReporter.throwing(Action), only gradle 8.12 does
- https://docs.gradle.org/8.13/javadoc/org/gradle/api/problems/ProblemReporter.html
- https://docs.gradle.org/8.12/javadoc/org/gradle/api/problems/ProblemReporter.html
why is paperweight userdev attempting to use the problem reporter api when it's still incubating and changing frequently?
declaration: package: org.gradle.api.problems, interface: ProblemReporter
declaration: package: org.gradle.api.problems, interface: ProblemReporter
We ought to make a release
, pretty sure den fixed it
I mean, when it's working properly it will work, it just can't blow up, as it shows
cos, you know, it trying to report the blow up blows up
my buildscript is currently just this
plugins {
java
alias(libs.plugins.paperweight.userdev)
}
repositories {
mavenCentral()
maven("https://maven.solo-studios.ca/releases") {
name = "SoloStudios"
}
maven("https://repo.papermc.io/repository/maven-public/") {
name = "PaperMC"
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
dependencies {
// compileOnly(libs.paper.api)
paperweight.paperDevBundle(libs.versions.paper.api.get())
}
and my libs.versions.toml is
[versions]
paperweight = "2.0.0-beta.16"
paper-api = "1.21.5-R0.1-SNAPSHOT"
[plugins]
paperweight-userdev = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" }
[libraries]
paper-api = { group = "io.papermc.paper", name = "paper-api", version.ref = "paper-api" }
there shouldn't be any issues here?
A problem occurred configuring root project 'Unauthorized'.
honestly, it should be wrapped in a try-catch and fall back to just throwing an exception explaining the error, if it catches a NoSuchMethodError
I mean, it was a bad idea to use incubating API
yeah I agree
you're generally not wrapping chunks of your program in try/catch's just incase some method disappears one day
especially since it seems to be changing so much
well yeah, just with the problem reporter api I feel it's appropriate
there were changes in 8.6, 8.8, 8.12, and 8.13 off the top of my head
could be others I forgot about
yes, but I'm not sure why it's saying there's a problem
ig I'll temporarily downgrade to 8.12
Jump to gradle 8.12.1 or whatever it was
otherwise you'll need to manually deploy the latest from github into your maven local and set that up
hmmm it seems the issue is I set up the proxying wrong on my maven server lol
so it was proxying the pom and jars but not .zip files
oopsies
no wait.. I didn't have any extensions configured so it should proxy everything ?
odd
yeah uh, idk what is up with your publishing, but the layout is really weird
why are there sub folders inside a -SNAPSHOT version?
https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/1.21.5-R0.1-SNAPSHOT/
those are individual builds
bc gradle is trying to look for the artifacts at https://maven.solo-studios.ca/releases/io/papermc/paper/dev-bundle/1.21-R0.1-SNAPSHOT/dev-bundle-1.21-R0.1-20240810.100446-132.zip, which will proxy it to https://repo.papermc.io/maven-public/io/papermc/paper/dev-bundle/1.21-R0.1-SNAPSHOT/dev-bundle-1.21-R0.1-20240810.100446-132.zip, which does not exist
I've never seen gradle lay out builds like that before, it's usually just all the artifacts dumped into a single folder
We're using nexus
yeah but the publishing is done via gradle, no?
Well, yea; I mean, idk what deals with the folder layout, but, this looks normal to me
it's gradle that determins the publishing layout
I'm assuming you're publishing it with gradle, rather than some gradle plugin, correct?
afaik, yes
hmmm, quite odd, it downloads fine if I disable my repo
is reposilite doing smth weird like rewriting the maven-metadata.xml??? it shouldn't be...
hi with 1.21.5 being out this is a perfect opportunity for me to learn this, what is the correct steps to update a fork? would it be to update gradle.properties' paperRef, mcVersion, version then applyAllPatches?
then deal with conflicts and rebuild each time a file is fixed?
hmmm I think reposilite is doing smth funny and rewriting the path the pom is located at
My understanding is that the maven-metadata.xml file existing enables a different path for stuff which supports this layout
but, idk; I semi recall there being some funny stuff with how maven resolved this stuff
yeah, this is smth to do with reposilite rather than with your repo it seems
nah, your maven-metadata.xml looks basically the same as the one from nyx (linked above)
Yea, no idea
I ponder if nexus just lays stuff like like that and deals with it programatically or something; I semi remember us having some fun issues with this stuff
it's smth to do with reposilite bc the proxied pom is located at https://maven.solo-studios.ca/proxy/io/papermc/paper/dev-bundle/1.21-R0.1-SNAPSHOT/dev-bundle-1.21-R0.1-20240810.100446-132.pom, when it should be at https://maven.solo-studios.ca/proxy/io/papermc/paper/dev-bundle/1.21-R0.1-SNAPSHOT/1.21-R0.1-20240810.100446-132/dev-bundle-1.21-R0.1-20240810.100446-132.pom
no clue why reposilite is rewriting it to that, I'll open an issue with them
I'll just disable proxying it for now
paperweight userdev should work fine with gradle's configuration cache, right?
oh also is there a spec for paper-plugin.yml, and if yes, how stable is it? (I want to add smth to my gradle plugin that allows me to just generate them, but I only want to do that if paper-plugin.yml is unlikely to change in a backwards-incompatible way)
Jpenilla made a resource factory plugin
Paper convention factory is what you're after
yes ik, I just want smth similar in my gradle plugin that doesn't depend on their plugin
look at the source code of that plugin
I'm not asking how to do it, I know how I can do that.
I'm asking if there exists a spec and if the spec is stable
the paperweight-userdev plugin uses yarn in the dev env, correct? and if it doesn't, is there any way to get it to use yarn in the dev env?
nvm I think it uses mojmap, is there a way to switch to yarn mappings in dev?
Im currently updating my fork of purpur to 1.21.5, i fixed the build.gradle.kts´s and now im trying to apply my patches but this happens:
https://pastes.dev/Uv6HctqIRE
java.lang.Exception: Failed to apply 31 mache patches
I have never seen that exception, what do i do
How can I use the Mojang mappings (and prevent remapping)?
My plugin supports versions 1.19-1.21.5, these are my build.gradle.kts: https://pastebin.com/4hmkGzvF
I then compile the plugin using the gralde task shadowJar, which doesn't cause any error. However, during runtime I get this error which causes the plugin not to be enabled:
Caused by: java.lang.ClassNotFoundException: net.minecraft.core.HolderLookup$a
How can I fix that?
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.
Use the reobfJar task
For latest that isn't needed as the server runs mojmap
I mean, nms is not stable and changes across versions
The only way to avoid remapping is to have an already mapped jar
Easiest approach would be to declare your plugin as mojmapd and only reobfJar pre mojmap versions, there are some caveats in that we did stiff over those server jars, just, probably not used by many unless you wanted to deal with that
bump
no, unless you remap paper to yarn
prob not also paper plugins are subject to change as they’re planned to be redone into lifecycle plugins
That's going to be a terminology rename, we're not planning to actually change much on that front
How do you declare it as mojmapd? Isn't that what I did with (as seen in my pastebin):
// v1_21_R4 module
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
// Plugin module (shadow task)
manifest {
attributes(
mapOf(
"paperweight-mappings-namespace" to "mojang"
)
)
}
you don’t have to set the mappings namespace if you’re planning to use mojmap
and also you should remove that manifest block from shadowJar it’s not needed as paperweight sets that and it could cause problems
and don’t set the mappings namespace in the java block…
@main wadi
Okay, that worked, thanks!
Does anyone know if it's possible to load another plugin from it's local Gradle project into the runServer task? I have a core plugin that is a standalone plugin, but also contains common logic that I reuse in my gamemode specific plugins.
Something like this (this obviously doesn't work):
ah, so the format should be either staying the same or adding things?
yes, but I'm wondering if there is a way to have it remapped in dev and then have the jar be remppaed back to mojmap/obfuscated names
also, pls ping for any replies otherwise I might never see it
i don’t think so unless you do some very hacky things like a custom paperweight
but with official paperweight no
i personally prefer mojmaps idk they’re more intuitive for me than yarn
and with yarn sometimes you have to use intermediary which is well…
abcdef_123456
hey guys, anyone else getting old versions of adventure when building with the R0.1?
not sure if we still have to use the no-moonrise snapshot?
Im currently trying to build paper from a external disk and vscode is telling me that it cant resolve net.minecraft and :paper-server:applyResourcePatches is failing. How can I fix this issue?
This is the error that im getting io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false config commit.gpgSign false
don't think many people use VSC here, but basic troubleshooting is usually:
- if on Windows, make sure the path isn't too long, e.g. move Paper to C:\Paper\ or something like that
- make sure you configured git with user/email. It should tell you that in the log though.
If its not that, run the gradle task with -Dpaperweight.debug=true to get the full error log
I dont see the user/email thing in the debug log after running it again with the --debug flag
I just ran the task again with the last flag lmk if u need me to paste the output here
Can't really comment on what we can't see
But, it failing on that task specifically is probably because windows and the folder path being too long
Hmmmm ok
Is there any reason why the java language server is telling me I have like 23k errors due to the minecraft packages being unresolved tho
I don't deal with vsc
If Gradle failed to do stuff it may be related, but, vsc was a tragic environment for java stuff last I looked, you wont get much support for it here
So im guessing I need smth like eclipse or intellij
I'd recommend IJ
Their community edition is free and does all you need for general java stuff
Ill make sure to check it out ty ty
The Minecraft plugin builds great scaffolding for getting your project started. I'm using it with kotlin
Like rn im getting errors from java like (Found 27000 errors + 50 warnings) Compiling jdt.ls-java-project/src/net/minecraft/... and the Problems tab in vscode says it cant resolve net.minecraft and other packages
Theres also this error in the Gradle log while configuring the gitCould not create task ':paper-server:assemble'.
you dont afaik
you should use normal api/dev bundle
ok well i get this issue when i do so....
Ok this one I fixed cuz I forgot to sign in but the exit code 128 in paperweight is still happening
Hmmm so if I want to change paper .patch files do I need to download paperweight and patch it using that and running Gradle there?
Does the runserver task have support for folia?
no idea if built-in, but you can use serverJar to specify a custom jar to run
ok i figured this out
basically forgot to update velocity version, and since anventure got moved into io.papermc... it was still using the old one
how can i use Spigot mappings with paper-weight? for example i need to use EntityBoat but it doesnt exist in paper-weight normally
you don't, paperweight does not support that
thats for reobf
when you reobf the jar, it translates mojang mappings back to spigots mappings
you can use something like the following bot link to convert between spigot and mojang
alright i do use it to figure out which mapping is spigot , but how do i convert between them?
Do I ask here if I got issues with development?
find the mapping thats named as spigot and see what it says for mojang
depends.
this is for issue with gradle or maven
other issues go to #paper-dev
I dont really know if its a gradle issue or a paper issue, but I think its a paper issue. Also I am using purpur is that a problem?
Well this isn't the purpur support discord
they have their own and know their software so, go there 😅
ooooh you mean this right?
Yes
yeah
alright thanks
Well but its giving me a paper class loader error
Yea but purpur might be screwing with those, generally, check on paper if you want support here
I might just switch to paper lol maybe that fixes everything 
im trying to update my test fork just to learn but i am getting this error when trying to build after applyingAllPatches
error: package org.bukkit.craftbukkit.block.impl does not exist
register(net.minecraft.world.level.block.AmethystClusterBlock.class, org.bukkit.craftbukkit.block.impl.CraftAmethystCluster::new);
seems like its applying some code that doesnt exist am i doing it wrong?
for more context the fork is pretty much just the paper-weight example fork-v2 with changed name trying to update it to 1.21.5