#build-tooling-help
1 messages · Page 25 of 1
maybe mini tried to change it and missed something
but it’s been needed to set those since we started using pw iirc
im using paperweight to make a fork of paper, but when i try to run the gradle task applyAllServerPatches, it doesnt exists? im using paperweight 2.0.0-beta.18
maybe try checking what tasks do exist...?
it says something specific
you need to be more specific about the issue you're having
when i try to run ./gradlew applyAllPatches
it throws this error
OpenJDK Runtime Environment Temurin-21.0.8+9 (build 21.0.8+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.8+9 (build 21.0.8+9-LTS, mixed mode, sharing)
Reusing configuration cache.
> Task :applyPaperApiFilePatches
Applied 0 patches
> Configure project :Symphony
paperweight-patcher v2.0.0-beta.18 (running on 'Linux')
> Task :applyAllPatches FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Task 'applyAllServerPatches' not found in project ':Symphony'.
* Try:
> Run gradlew tasks to get a list of available tasks.
> For more on name expansion, please refer to https://docs.gradle.org/9.0.0/userguide/command_line_interface.html#sec:name_abbreviation in the Gradle documentation.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to generate a Build Scan (Powered by Develocity).
> Get more help at https://help.gradle.org.
BUILD FAILED in 3s
6 actionable tasks: 4 executed, 2 up-to-date
Configuration cache entry reused.```
something is wrong with your configuration, that's a task in the sever project
hence why applyAll runs a nested gradle process after setting up the server
here is my build.gradle.kts
https://pastes.dev/waEaQQYvug
I suggest comparing to paperweight-examples which built successfully on github actions
Per file patches are not supported by forks right?
Ahh okay you need to run the fixup patched
My bad, thanks for the food for thought.
Does someone know how to work around this issue?
https://pastes.dev/zyQ16H67xZ
https://pastes.dev/cHfnssTJEI
https://pastes.dev/9y0tRHDnwn
nvm, forgot to bump gradle itself to 9.0.0 🤦
Got another issue though:
> 'runClasspath' is empty and no version was specified for the 'runServer' task. Don't know what version to download.
* 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 generate a Build Scan (Powered by Develocity).
> Get more help at https://help.gradle.org.
BUILD FAILED in 434ms
11 actionable tasks: 1 executed, 10 up-to-date
runPaper {
disablePluginJarDetection()
}
tasks.runServer {
minecraftVersion("1.21.4")
dependsOn("shadowAll")
pluginJars = files("/build/libs/ChatFormatter v${project.version}.jar")
// We need to start the server with Java 21, but jar is built with Java 17
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(21))
})
}
why are you disabling plugin jar detection
and what is the shadowAll task, it should automatically pick the shaodwJar task
it'd be better to just see your build script tbh
it's because it's a multi-module project
<@&748618676189528155>
handled
tyty
hello, how can I go about updating my fork from upstream? I'm currently at version 1.21.7 and have made some patches myself but I'd like to update to the most recent commit to paper
generally, update the paper ref and such, apply your patches, making sure that the single file patches apply, if not, fix and rebuild those and then apply again, etc, until you get through the entire process and have updated patches
ok so I updated gradle.properties and tried applyAllPatches and got some fails, for my build file for fork-server
it generated a build.gradle.kts.patch.rej how do I go about fixing this as its looks different to a typical merge conflict
generally, manually
you could use tools like wiggle but often much easier to just redo the tweaks manually, and then rebuild the single file patches and give it another shot
ok i'll have a go thanks
so I fixed my issue with my build file, rebuilt single file patches then re applied patches and got a new reject with CraftPlayer so i just keep going in this cycle until its all done?
Basically, yes
depends on what stage you're in, afaik for file patches it should apply all of them in one go and give you a bunch of rej files to fix that you'd then need to rebuild the patches from that step
alright
im slightly confused by the task names
how does:
rebuildServerFilePatches - Rebuilds paperServer file patches
differ to:
rebuildPaperSingleFilePatches - Rebuilds all paper single-file patches
It all ties down to the patch tasks you create in your gradle config
single file patches are explictly declared inside of your build config
the group ones are also declared there, you generally end up with fork specific named ones instead of "paperServer" ones, iirc
oh i see
so I rebuilt my patches and ran applyAllPatches succesfully but don't seem to have new patch files coming in from upstream
oh I needed to run specific tasks to apply all the patches
do the fork-server fork-api build files use the patch system for tooling convenience because i dont think there's any other reason to not just include the build files directly is there?
you can do the whole thing with bash scripts if you want
They use patching because the source files are subject to change at any time for various reasons
i.e. dependencies, etc
i looked at another forks scripts and they’re helpful
i just need to fix pulling com.otherfork.stuff
> Task :applySakuraSingleFilePatches FAILED
Patch /home/kynes/Octane/prism/prism-server/build.gradle.kts.patch failed:
[WARN] Missing patch target for sakura-server/build.gradle.kts.patch
Patch /home/kynes/Octane/prism/prism-api/build.gradle.kts.patch failed:
[WARN] Missing patch target for sakura-api/build.gradle.kts.patch
I'm forking a fork by registering an upstream and get this error on ./gradlew applyForkPatches
ok
i think what jmp tried to tell you is that the build.gradle.kts file that the patch was created for isnt there anymore, so it cant apply the patch
so if you know the issue what do you want to know?
well i think the issue is much more complex than that
i don’t think my fork upstream are being pull/patched? correctly if at all so the dirs aren’t creating and the patch can’t apply
im really not sure anymore
i started fresh from the example and still have no clue, the issue persists when running applyAllPatches
is there somewhere I can look to check if I'm doing this right
Where does mache's parchment data come from? I see it's on the maven in a papermc group, but is it a private(?) fork of parchment?
The last upstream update was 2 months ago, so is the version number being per-snapshot the only change?
The only change is the artifact location or something in order to not conflict with their releases if they drop them for that version
it's literally just the normal repo but published somewhere useful for us
Is it just published manually to each snapshot version then?
Yes
Hello, I'm running into an issue with paperweight related to Netty version.
When I apply the io.spring.dependency-management plugin with userdev, Netty version gets overridden
is there a way to specify the version of Netty ?
I also tried these, but they didn’t work
It's not the normal repo but the snapshot branch of that one contributor, right?
Maybe
I import the same exact artifact as a dev bundle in two subprojects and IDEA recognizes them as separate external libraries, effectively duplicating search results for Find Usages, Find in Files, etc, any way to prevent/fix that?
I'd assume this happens because paperweight saves the mappedServerJar.jar file separately for each subproject instead of saving it in the root project's gradle task cache, although the understanding of that doesn't make the issue magically disappear 
the setup task must own it's outputs so it has to copy from the global cache
you could not apply paperweight to one of them
and then export the server deps as a consumable configuration on the one with pw
never tried that but it should work
out of all configurations in paperweight, are these two the only ones I need to export?
the second one is only for run-paper or similar use
which, you can just use the default task instead of runDevBundleServer, paper is always mojmapped now
you will need to make a new consumable configuration that extends from it iirc
failing that you could just add the setup task output directly to the consumable config sidestepping pw's config
we could maybe add utilities to streamline this for advanced users, but it can't be done automatically with config cache and project isolation compatibility
@static urchin regarding the git file patches issue, i found a workaround for that by verifying if a patch file is a valid git patch before trying to apply it as such, you can see how the impl would look like here
https://github.com/CraftCanvasMC/weaver/commit/c5ddcee9b568262cdada4acfe1c1105bb2509154
it seems to work but idk if its the cleanest and if it would get accepted
so im asking before a pr
idk why we'd want that?
it'd be good for forks which want to use git file patches to update and they're basing off a commit where upstream has normal file patches
so apply/rebuild doesnt fail
I cannot say I have looked a lot at your issue
but "ah the folder does not apply rn, lets not apply it even tho CLI asked us to apply" sounds like a less than ideal solution
wdym?
That is what your diff is doing no?
no, if the patch is not a proper git patch it falls back to normal apply
using diff patch
i only check for corrupt patch line
which only appears when the patch is bad
not when it fails
Eh
I guess?
depending on stderr from git sounds even less fun xD
This just feels like a "we need a way for forks to rebuild their stuff as git patches while leaving upstream alone"
like, a configurable ext value
yeah but that would mean bigger changes
Well yea
I am sure we'd be happy to fix this for forks but we don't need to do this with a semi hacky fix
Well it just requires the upstream repo to be applied to rebuild against
that is just the gradle task dependency graph at work
it just seems error prone like rn with the git file patches
wouldnt it be possible to cache upstream?
How is it error prone, the fact that the upstream project inherits the gitFilePatches thing apparently is just a bug
the process itself isn't like bad
If I want to rebuild patches, the upstream needs to be fully applied, making sure that is the case is not error prone
would it be possible to make it refer to upstream's value
idk? xD
well that is technically error prone to me lol if a bug slipped
sorry 
at that point all of computer science is error prone 
a quick thought: could we just use applyAllPatches from upstream or applyPatches in case upstream is paper instead of prepareForDownstream which is registered by the fork?
that would make it read the correct properties and use the upstream's versions of pw too
havent tested tho, might be wrong xD
idk xD been a while since I dabbled in that part of PW
i looked at it and seems that there is a problem
pw has diff names for apply for forks and paper 
so either depend that people dont set paper upstream name to smth arbitrary or unify the tasks? add a new one or sum
this makes my eyes hurt 
What gradle version should you use for a paper fork? 8.14 or already 9.0.0?
When I try to build gradle it shows error for : https://pastebin.com/m7nECYq7
I've already checked the gradle version. (8.8)
build.gradle.kts - https://pastebin.com/7Zqtuixp
id say 8.14
since that’s what paper is using rn
has anyone else had an issue where intellij tries to run an all tests configurations seperately when building, in the wrong enviroment(?)
commenting the include line unter the test tasks fixes running individual tests
might help there too idk
is this supposed to be the hash of the commit that made the patch in the -server/-api directory?
Those instructions are no longer applicable to supported versions of paper
oh, wait, no, I guess they are
the commands provided are generally fairly literal
yea, i thought so too, but all the combinations i try get a "failed to lookup commit" 😅
ofc, -api no longer exists as a patched subtree anymore, only the server
and the server folder has different git trees inside of there, rather than just being a git tree itself
i've been trying to update a paper fork from 1.21.5 to 1.21.8 and i keep getting this error when applying the feature patches, and i'm not quite sure how to rebuild them
Patch failed at 0002 Add client-side trident API
error: invalid object 100644 3c5d84ff4b28acb0de07dec52e39f311135b9842 for 'net/minecraft/world/entity/LivingEntity.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
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
> Task :applyAllPatches FAILED
6 actionable tasks: 4 executed, 2 up-to-date
Configuration cache entry reused.
Already on 'main'
warning: You seem to have moved HEAD since the last 'am' failure.
Not rewinding to ORIG_HEAD
error: invalid object 100644 3c5d84ff4b28acb0de07dec52e39f311135b9842 for 'net/minecraft/world/entity/LivingEntity.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
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
*** Please review above details and finish the apply then
*** save the changes with `./gradlew rebuildPatches`
FAILURE: Build failed with an exception.```
i've tried rebuilding with gitFilePatches, but it also gives an error
applyAllPatches is mainly meant as a shortcut for CI or setting up a fresh env, you really don't want to use it for normal development and especially not updating, if you read the task descriptions you would see why it will just slow you down compared to using more specific tasks
and not sure what you're trying to rebuild if you haven't gotten your patches applied yet..?
you need to resolve the problem like it says
sometimes you can improve the success rate of 3-way merge by adding the old src repo as a remote for the new one and or using the oldPaperCommit property
Does anyone know why this keeps happening when i run applyAllPatches?
java.nio.file.FileAlreadyExistsException: ~/taskCache/filterSlimyballspaper-asp-apiFromSparklySlimePaper/.git/hooks/applypatch-msg.sample
This is my paperweight entries inside of build.gradle.kts
paperweight {
upstreams.register("SparklySlimePaper") {
repo = "https://git.balls.rocks/PvPLand/SparklySlimePaper.git"
ref = providers.gradleProperty("sspaperRef")
patchFile {
path = "sparklyslimepaper-server/build.gradle.kts"
outputFile = file("slimyballspaper-server/build.gradle.kts")
patchFile = file("slimyballspaper-server/build.gradle.kts.patch")
}
patchFile {
path = "sparklyslimepaper-api/build.gradle.kts"
outputFile = file("slimyballspaper-api/build.gradle.kts")
patchFile = file("slimyballspaper-api/build.gradle.kts.patch")
}
patchRepo("paperApi") {
upstreamPath = "paper-api"
patchesDir = file("slimyballspaper-api/paper-patches")
outputDir = file("paper-api")
}
patchDir("aspaperApi") {
upstreamPath = "aspaper-api"
excludes = listOf("build.gradle.kts", "build.gradle.kts.patch", "paper-patches")
patchesDir = file("slimyballspaper-api/aspaper-patches")
outputDir = file("aspaper-api")
}
patchDir("slimyballspaper-asp-api") {
upstreamPath = "sparklyslimepaper-asp-api"
patchesDir = file("slimyballspaper-api/aspaper-api-patches")
outputDir = file("slimyballspaper-asp-api")
}
}
}
I probably cant get much help here since this is a fork of a fork
i deleted the git folder in the cache and ran apply all patches again and it like copied evefything from the papermc repo and overrid my build.gradle.kts file
deleting the git folder is always an issue
@static urchin here is it: https://pastes.dev/AiNz2htQ7q
id("io.papermc.paperweight.userdev") version "1.7.1"

you want version 2.0.0-beta.18
Oh well, it also need to be upgraded 😅
Sorry, forgot about it.
Thank you very much.
I'm trying to build my Paper plugin using Paperweight, but my build fails with this error:
Execution failed for task ':paperweightUserdevSetup'.
io.papermc.paperweight.PaperweightException: Exception executing vanillaServerDownloads```
You would need to look at the full gradle output and see if there is anything useful
otherwise, run a build manually with the flags it advises
This is the full output https://jitpack.io/com/github/Devlrxxh/BlockChanger/eb777421e6/build.log
You would need to run it with the flags that it suggests to get more information
For some reason it works fine on my pc but on jitpack it isn't
I mean, it is sus that they're explictly setting some tls protocols, but, idk
Can't really provide support for jitpack
jitpack tends to randomly break, best to not use it
pretty much all git code repositories provide ways of building stuff and even hosting a maven repo nowadays. One shouldn't need to have to deal with all the quirks of jitpack.
Thanks
how to patch? build.gradle.kts.patch?
I want to know how to create(rebuild) patch of paperfork-server/build.gradle.kts
hmm... I cant find useful things..
There should be tasks called something like „rebuild…SingleFilePatches“
That’s what the other user told you. With ./gradlew tasks you should see those tasks
Hi sorry I've been out of the loop for over a year at this point and coming back to managing my own fork of Paper I see a lot of things have drastically changed in how the build system works. It seems like applyPatches is no longer what you run to setup the Workspace. Which of these tasks is the one I want? I'd like to setup the fork and compile the server jar for now
FAILURE: Build failed with an exception.
* What went wrong:
Task 'applyPatches' is ambiguous in root project 'fork' and its subprojects. Candidates are: 'applyAllPatches', 'applyOrMovePaperApiFilePatches', 'applyPaperApiFeaturePatches', 'applyPaperApiFilePatches', 'applyPaperApiFilePatchesFuzzy', 'applyPaperApiPatches', 'applyPaperFeaturePatches', 'applyPaperFilePatches', 'applyPaperPatches', 'applyPaperSingleFilePatches', 'applyPaperSingleFilePatchesFuzzy'.
Oh wow it seems like the rebuildPatches system is also different now
Gonna take a really long time to relearn everything...
applyAllPatches is the one you’d want
its pretty self explanatory tbh 
Thanks!
what is better patch?
protected void idk(ServerLevel level) {
int time = getTime();
+ if (getRider() == null) // blabla
this.tick(level, this);
this.update();
}
vs
protected void idk(ServerLevel level) {
int time = getTime();
- this.tick(level, this);
+ if (getRider() == null) this.tick(level, this); // blabla
this.update();
}
Does the likelihood of a patch conflict increase as more “-” appear than too many "+"?
I’d like to know which approach carries less risk of upstream patch conflicts.
both will conflict when the line below changes which is what you want
one is more obvious what it's doing when you read it
Does PaperMC prefer the first?
you can probably find examples of both in the patches
whatever is in the contributing doc is the 'standard'
not sure if it covers this exact case
is there a nice way to run tests in a real server environment? I just need to start the plugin, do some tests with some data (which requires nms to be present) and that's all, no event/player/whatever simulation
you can integrate the run-paper plugin to your gradle setup so you can launch a paper server right from ur dev env
if thats not what u want, there is also mockbukkit which allows writing unit tests tho im not sure how it handles nms
They don't handle NMS, hence the mocks
mockbukkit is just paper api "standalone" implementation
There isn't really a "nice" way to do it
I suppose I could do that, yeah. tho is there a way to make it use the test sources and run multiple versions?
I mostly care about the latest, but it's actually a library, so supporting more versions would be nice
there should be, tho i think it’d have to be applied on modules then with each module having a different mc version specified for the run task
i mean, you can just have separate run tasks for different versions in the same module, no?
that might be possible, I would need to create them manually tho
it's a task after all
why do codebook param renames result in the param names becoming harder to read
here is an example
- if (Math.abs(source_move) < ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON) {
+ if (Math.abs(desiredOffset) < ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_EPSILON) {
or this
- protected SetWritableBookPagesFunction(List<LootItemCondition> predicates, List<Filterable<String>> pages, ListOperation pageOperation) {
- super(predicates);
+ protected SetWritableBookPagesFunction(List<LootItemCondition> conditions, List<Filterable<String>> pages, ListOperation pageOperation) {
+ super(conditions);
i feel like conditions is better suited here ig than predicates
this is diff after applying parchment again (the same build as in mache) ontop of the src/minecraft/java
there is a lot more and prob even more mention worthy examples
there’s also shifts such as owner becoming owner1
is there any way to return error code to the RunServer task from my test plugin?
I would like gh actions to report any failed tests to me
i know it is a bit early but i'd like to update my plugins to 1.21.9 already
i am using paperweight in this project
just using the api with compileOnly works fine but paperweight.paperDevBundle("1.21.9-pre2-R0.1-SNAPSHOT") fails
https://pastebin.com/FKrgsAMN
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.
anyone know what gradle is confused about here?
I mean, what version of adventure is that branch of paper using?
It's clearly upset about something to do with the versioning there
I mean, either you override the dependency resolution or you meet it
too much work
i will wait patiently
you can look at adventure-platform-mod
fun Project.configureUnstableAdventureStrategy() {
configurations.configureEach {
resolutionStrategy.capabilitiesResolution.all {
if (candidates.size == 2) {
// Select unstable Paper variant over stable Kyori variant
val unstable = candidates.find { c -> c.id.displayName.startsWith("io.papermc") }
val stable = candidates.find { c -> c.id.displayName.startsWith("net.kyori") }
if (unstable != null && stable != null) {
select(unstable)
}
}
}
}
}
the problem is you are bringing in stable adventure somewhere and it conflicts with paper's unstable deps
yeah i have a few deps that depend on various adventure libs
like how in mod it depends on stable adventure-platform but unstable -api
you need to tell gradle how to resolve the conflict like the docs explain
gonna give that a try
thanks
Heya I am jusing jpenilla's gremlin for my dependency management and for some reason when I try adding kotlin-reflect it downloads it properly but kotlin still says its not available in the classpath. Does anyone know why?
Nope I have shadowJar installed and I am just calling runtimeDownload. All other dependencies work fine.
well if the dependency is being correctly passed to the classpath builder and you aren't applying relocations then it's something outside of gremlin
you're looking for something that doesn't exist
unfortunate
Not sure if this is something that can be asked here, but anyone get this error specifically when trying to apply patches from a fork-of-a-fork? (in windows, in linux works fine)
Doesn't happen when applying patches from paper or a fork of paper
io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard base
Windows long paths are enabled, and I signed in into github from both cli and desktop app
lemme try
do you need decompiled code for 1.16.5?
wild, looks like that was the issue, thx bro 
yh this is a weird bug cause git uses its own APIs for paths or something like that so you don't even need windows long paths to be enabled
only the git config is needed
I have a jar that uses mojang mappings and I wanted to remap into spigot mappings. it looked like paperweight-userdev could do that
wait, so I basically enabled long paths in regedit for nothing 
Sorry for the late response, maybe you can help me out:
my build gradle: https://pastes.dev/7jxYYHepg6
my version catalog: https://pastes.dev/sgXeLYNiA9
my plugin loader: https://pastes.dev/7EhFQWhOsx
when running the server it also downloads: kotlin-reflect and puts it into G:\» Servers\» 1.21.8\libraries\org\jetbrains\kotlin\kotlin-reflect\2.2.20
so maybe gremlin does its job properly but its just the kotlin library not being properly added to the classpath or something idk
its the only library causing issues
you could copy the paper appender and add logging
also check for any non jars files in the result
beyond that it will likely be something with plugin class loader semantics
looks good:
Adding to classpath: kotlin-reflect-2.2.20.jar
also no non-jar files
so what are my options? I am assuming one of them is to just use the normal gradle implementation and just bundle kotlin-reflect with my jar
what kind of errors are you getting for what code
so this is the error: https://pastes.dev/T3SLvc7Tz1
lemme get the code one sec
it could just be the classic library loader cannot see plugin loader (only the other way around)
and this is the code:
for (clazz in classes) {
val constructor = clazz.constructors.firstOrNull { it.parameters.size == 1 && it.parameters[0].type == LMS::class.java }
val eventInstance = constructor?.call(instance) ?: clazz.constructors.first().call()
Bukkit.getPluginManager().registerEvents(eventInstance as Listener, instance)
}```
the stacktrace is pointing to the constructor val
you can try setting the context classloader to the plugin class loader
if that doesn't work and you really want to avoid shading then you can jar-in-jar most of your plugin code except for a bootstrap to get everything on the library CL
or maybe you need to try the other way around (set ctx loader to the lib loader)
worth experimenting with
oh no I don't mind shading it, just wanted to ask around to see if there is a different way to do it for consistency sake
this what you mean? Thread.currentThread().contextClassLoader = instance.javaClass.classLoader
yeah
yea that didn't work
what would be the lib loader in this case?
or SomeKotlinReflectClass::...classLoader
or any class from a downloaded lib should work
(as in work to get the library classloader)
so I tried: Thread.currentThread().contextClassLoader = KClass::class.java.classLoader
KClass is part of Kotlin Reflect and it still gave me the error but on the same code line (the constructor one)
KClass is part of the kotlin stdlib
there's probably a way to get it working but personally I would just shade kotlin stdlib and reflect
it's in the stdlib but it doesn't really matter for the purpose of retrieving the lib loader
any class added via the loader will do
Okay that's interessting now:
I tried using a class thats not in the stdlib but in kotlin reflect and Intellij is saying this:
however I can see kotlin.reflect in my external libraries
I think that they're pulling some stuff off where they basically expect that everything is inside of one classloader
Or, i have no idea where their logic is to determine what variant of something loads
KClass is an stdlib class, but it's basically just an interface, I'd wonder if their compiler is pulling off some BS
oh well, I just shaded reflect - would've been interesting to figure out why kotlin is behaving like it does but don't wanna waste your guys's time
cause it just feels like it should work just fine since the library is on the classpath
I mean, your thing is loading the stdlib implementation of that class which is basically a dummy impl that blows up whenever you try to do anything that relies on kotlin-reflect to exist
yep but for some reason it things it doesn't exist
I'd generally wonder if it's this
impl stuff isn't in the classpath so the compiler just uses the "oh noes" impl from the stdlib
I tried pressing the add library button, it did something and the button disappeared however it still gave me the unresolved reference
That would just modify the IDEs config, it wouldn't appease the gradle side of stuff and would be lost as soon as it resync'd
switching from runtimeDownload to implementation fixed the error but I still can't access kotlin reflect classes in my code. Maybe I am not meant to?
No idea how that works
all runtimeDownload does by default is add it to the dependency txt
unless you changed that, you still want to add it to compileOnly or implementation depending on your setup
Oh I have never done that and it always still worked
how would i go about of making a fork of a fork of paper? (I want to make a private fork of https://github.com/InfernalSuite/AdvancedSlimePaper). I already know how to make a fork of paper for a fork of a fork idk how to
thanks
Does the https://fill.papermc.io/v3/projects/paper/ rate limit?
ok so only without user agents, its rate limited, cool.
Had to come up with something janky to allow pres
it looks like gradle 9.1.0 once again messed up with the generate mappings task
which randomly fails now
why is that so picky when it comes to java ver and gradle lmfao

I cloned https://gitlab.com/BlockStack/ArtMap, and it doesn’t build.
- I’ve removed the redundant
dmulloy2.netrepository - I've fixed the one with the SSL handshake error
- I've also tried deleting the
.m2directory - https://pastes.dev/VEbrWvoGyn
need help 🙏
this isn't really "help with building random projects that aren't yours", but it seems like something is corrupting the files in your local repository. Might be some Windows/Defender issue, might be something with the downloading
not sure why, but after deleting the broken packages from my local repo and rebuilding a few times, it suddenly worked (not everything tho).
https://pastes.dev/MwcyngZaCt
im getting this error with the latest paperweight snapshot and gradle 9 during the generateMappings task
both gradle 9.0.0 and 9.1.0 have this error
Caused by: java.lang.NullPointerException: CSRG must not be null
at io.papermc.paperweight.util.MappingFormats.<clinit>(MappingFormats.kt:35)
cleaning the cache and fresh clones of my fork dont fix it too
this line seems to point here in paperweight
object MappingFormats {
val TINY = TinyMappingFormat.STANDARD
val CSRG: MappingFormat = Formats.CSRG // <- error here!
val PROGUARD: MappingFormat = Formats.byId("proguard")
}
<@&748618676189528155>
lmao
Is there a way to override the paper repo in paperweight-userdev?
nvm I think i see
Maybe not? I have injectPaperRepository set to false but it's still looking in the paper repo, though that could be my build logic cache shit thing
read the doc on that method, it's very specific
the dev bundle itself declares repositories it needs
just use a lifecycle hook to swap out the urls
Uhh how would I do that?
it’s back now anyways
im updating my fork of a fork of paper from 1.21.7 to 1.21.8, but while applying the patches it spit out a build.gradle.kts.ref, how do i fix the patch file?
look at the reject file and manually re-apply whatever tweaks are relevant and rebuild the patch
how do i manually re-apply tweaks?
by hand
im confused
hunks of the patch failed
either you fight a tool like wiggle or you do it by hand
not sure if this warning is my build or what because i use paperweight.paperDevBundle and not call the implementation for paper
afaik thats talking about smth like
conf("group", "artifact", "version")
yes open a paperweight issue please
@smoky violet have you seen my comment on this pr?
https://github.com/PaperMC/paperweight/pull/350
sorry for the ping but i saw you're doing work on pw rn
so i thought i'd bring this up while you're at it
tl;dr the shadow bump broke reobf mappings
generation
open an issue with all of the details please
there are other things blocking updating pw in Paper, so I haven't been testing it yet
done)
also i've opened a pr some time ago to fix the full vanilla test in paperweight as it right now doesn't do what it should
the test patches never got applied
as they weren't configured properly
so while the test succeded it didnt provide any meaningful input and wasnt reliable
i discovered that by accident lmfao cause changing things in those patches didnt conflict at all and changing/removing ATs and upon closer inspection in the dir where the tests ran, those changes from the patches weren't in the patched source
oh and also the output from the tests said 0 patches applied
@bronze ember should review that, he wrote the test
Can somebody remind me next week? Then I'll be back at a PC
Or maybe ping me in the comments and hope that I somehow wade thru my GitHub notifications
um, can anyone remind me the process of updating the server jar (fork)? I updated the commit hash, which gradle tasks should I run now?
1.21.4 -> 1.21.8
@smoky violet i debugged the shadow behavior a bit more and it seems that the service files dont get merged properly, perhaps the default behaviour changed somewhere in shadow 9 as they did a lot of changes like this
shadow 8 -> https://pastes.dev/7Jsu2hQ3Gv
shadow 9 -> https://pastes.dev/8vhqEEkV8n
so im not sure about opening an issue on their github
-# especially since im not quite well-versed with it
the confusing part is that there is a mergeServiceFiles() in the buildSrc
apply and fix conflicts if post hardfork
otherwise you have to manually migrate your patches to the correct patch sets
it seems that someone reported it and that there is a fix
duplicatesStrategy = DuplicatesStrategy.INCLUDE
must be set for
mergeServicesFiles()
to work properly. Once this is set, it worked properly.
yeah seems like that fixed it, i can open a pr to close that issue
Post hard fork what's the general structure for Paper forks? I see src/minecraft/java containing the net.minecraft package as expected, but curiously it also contains non net.minecraft classes (Like spottedleaf's code and io.papermc.paper packages). It's puzzling to me why those classes are in src/minecraft/java instead of src/main/java in paper-server, more confusing is that all non net.minecraft classes from Paper, CraftBukkit, Spigot etc are split between src/minecraft/java and paper-server's src/main/java
have a look at paperweight-examples
generally, <fork>-server/src/mojang/java is gonna maintain mojangs code, <fork>-server/src/main/java is going to maintain classes created in your fork and paper-server/src/main/java is going to maintain classes we add
Ah I see, I was just about to ask to see whether my understanding of the directory structure was correct
The split into two patch sets for nms and paper classes was made as paper classes no longer need full nms code to apply / rebuild etc
like, given our classes are in tree now post hardfork, you can patch them without nms decompilation
thats because some classes are added in feature patches which makes them end up in the minecraft source
Hmm, let me see if I got this right
paper-server: src/main/java contains Paper classes that are stored directly in tree without any patches needed
fork-server: src/minecraft/java contains actual Minecraft game code, but also Paper classes that still use the patch system
At least that's what I'm getting from this
Yea
I see, things are a little clearer now
The patched classes mostly come from moonrise
given that is just trying to be its own complete patch
maybe that can point to the deps branch?
that.. i mean its part of the update (?
really not sure but based in its the update+fixes to that update...
that update isnt pulled in tho and that pr is an automated one
this just supercedes that update as its broken
hmm true
yeah it's post hard fork. you mean applyAllPatches?
yes
hm. I did that and now I am getting an error:
https://m0dii-dev.xyz/paste/53853b60
I may be very bad at reading these errors but in no way I could tell by this error message that gradle needs to be updated lol
yeah its really verbose but when you look at them a couple of times you can quickly identify whats wrong lol
Incompatible because this component declares a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.14' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.12'
I suppose it's this part, right nvm, yes
* What went wrong:
Execution failed for task ':scoreboard-library-modern:reobfJar'.
> Failed to calculate the value of task ':scoreboard-library-modern:reobfJar' property 'mappingsFile'.
> The current dev bundle does not provide reobf mappings.
the mappings will be provided after spigotmc releases 1.21.9 right?
soo, a few patches failed, what's my best option here?
https://m0dii-dev.xyz/paste/5c261566
manually adjusting the patch files?
yeah or you can try fuzzy apply
You don't touch the patch files manually, you generally just work through them and apply whatever rejects exist or whatever depending on the stage it got stuck
But when I asked ChatGPT, it said I have to press the blue button labeled 'Commit Merge'
ok
They are not reliable source of ANYTHING
so i just need to close it?
it would rather be git commit
to commit merge
and git add (. or files) before that
ok
I mean, you have a merge conflict you probably want to figure out how to resolve
outside of that, we can't really teach git here
I resolved everything
👍🏻
Can someone pls say it i am stuck there for a long time 😢
We can't tell what your issue is
either you're stuck with a really basic "how to use git" issue and are stuck inside of a text editor, or you have some deeper issue
if you're litearlly stuck at that screen still, read up on how to use vim
you can switch the editor to something else if you want
Updating my fork to 1.21.9 and stuck on dev imports for libs
io.papermc.paperweight.PaperweightException: Failed to read library line 'adventure-api net.kyori.adventure.translation.GlobalTranslatorImpl', no library file was found.
build-data/dev-imports.txt:
# You can use this file to import files from minecraft libraries into the project
# format:
# <artifactId> <fileName>
# both fully qualified and a file based syntax are accepted for <fileName>:
# authlib com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
# datafixerupper com.mojang.datafixers.DataFixerBuilder
# datafixerupper com/mojang/datafixers/util/Either.java
bungeecord-chat net/md_5/bungee/chat/TranslationRegistry.java
adventure-api net.kyori.adventure.translation.GlobalTranslatorImpl
Also tried importing it by file path (similar to bungeecord-chat import), but no luck. Am I missing something? This worked on 1.21.8 with paperweight 2.0.0-beta.18
well, things went terribly wrong, most likely due to my mistake. I tried applying fuzzy, got a few issues that I resolved manually but now some imports are not recognized.
if anyone who knows what they are doing wants to help me fix some issues with the fork - dm or @ me, willing to pay, thanks.
I correctly merged the Folia repository into my branch. After that, I built the .jar file using the Gradle command: ./gradlew build -x test. I then placed the resulting .jar into my server folder. However, when I try to start the server, I get the following error: no main manifest attribute, in server.jar.
someone?
you need a bundler jar
do i have to update paperweight if i update from 1.21.7 to 1.21.9?
I would like to use the gradle catalog but the catalog seems not to work with plugins when you publish it to a remote repository
So I considered to ignore a paperweight update. But gradle 9 would be kinda pretty
We released 1.21.9 before spigot, so we didn't have mappings on release
they'll be added at some point
wow paper so fast
Where do you add them? I'm curious.
To our build config, and then we have to validate a bunch of stuff
noting that we consider the obfuscation stuff to be deprecated behavior and it's not going to be around too long, you should consider looking into supporting mojmap'd environments
Well I can't, it's a feature that is compatible with spigot/paper.
you are going to have to make a decision about it eventually by the time the mechanism is dropped
how to fix this
you need to use the right jar
can’t remember which one it is though
may be in the root directory (or root’s build/libs)
i used the correct one from builds/libs
server/build/libs?
yes
folia-server/builds/libs
Not the -server jar, you need the bundler/paperclip jar, as already said
This will be in the root projects build folder
Can someone say how to use papper clip.
as you were told in #folia-dev, you need to run the create paperclip jar task
are you trying to fork paper?
look at paperweight examples
Yep
Clone and start right?
Well, you probably want to customise some aspects of the configuration there
part of the expectation is that with your knowledge it is mostly self documenting at this point
I can change fork-api,fork-server ?
yes
I'm getting this same error as shown here by another person, any idea why its happening or how to properly fix it?
I'm fixing it the way they did (by adding it to my dependencies) but if there is a better way Id like to switch to it
1.21.9 still unstable for fork?
have you tried syncing gradle to your IDE?
I tried it just now and it did not fix that
It works fine when I open in it something like vscode
and compiles too
Unlink and link again?
wdym by that
Click the gradle module to unlink (not the root project) on the right window and select unlink then right click the build.gradle in the paper module to link the project again
That did not fix it too
Maybe just updating it would also helped then.
so im trying to generate javadoc, i had previously commented it due to some reasons, before it used to work now i uncommented it and it throws this error:
https://pastes.dev/7omeWO3RBr
also the build.gradle:
https://pastes.dev/69RYBqlKSc
java is temurin 21.0.7
I got javadoc error too🤣🤣 but
Error fetching URL javadocs 26.0.2
How to disable javadocs in javadoc ?
Comment it out
Configuring project ':generator' without an existing directory is not allowed. The configured projectDirectory 'C:\Users\1111\Desktop\Development\Development\RPGItems-reloaded\generator' does not exist, can't be written to or is not a directory.
- Try:
Make sure the project directory exists and is writable.
Run with --scan to generate a Build Scan (Powered by Develocity).
what is even generator
Unable to resolve a dev bundle, which is required for paperweight to function.
Add a dev bundle to the 'paperweightDevelopmentBundle' configuration (the dependencies.paperweight extension can help with this), and ensure there is a repository to resolve it from (the Paper repository is used by default).
https://pastes.dev/kP5dDTLkZN
wtf is this
why are you using pre2
you're also using the old shadow plugin, but that shouldn't cause paperweight to break
resolved, there are something I need to modify with gradle 9
well now that you solved your issue, if you don't mind me nitpicking, here's a few things I noticed:
- You have two shadowJar tasks in there
- for the javadoc and source jar, you can do it on the
javaextension instead withwithSourcesJar()andwithJavadocJar - You should use the release option + a toolchain instead of the old source and target compat variables, like so:
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar()
withJavadocJar()
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 21
}
those are very old configs from like years ago
figured as much given it is using groovy dsl lol
A problem occurred configuring root project 'Frame'.
> Could not resolve all artifacts for configuration 'classpath'.
> Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.19.
Required by:
root project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.19
> No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.19 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.13' 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.13')
any idea? tryna use paperweight for nms
most likely just outdated gradle
not necessarily, but using latest allows to rule out some version incompatibility
latest version is 9.1.0 btw, you can change it in the gradle/wrapper/gradle-wrapper.properties file by changing the version in the url
or just ./gradlew wrapper --gradle-version=9.1.0
Or even simpler, what I tend to do gradle wrapper --gradle-version=latest so that you never have to keep track of the latest Gradle version
Paperweight has a min Gradle version requirement
It's at least 9 rn I think
If you didn't cut of the log it would have said so
not sure if this is the right place to ask questions like this, but: im trying to make a few modifications to folia. My Goal is to modify a few classes within io.papermc.paper.threadedregions.
I have
- cloned the repo
- ran the
applyAllPatchestask
However, now, my IDE marks all files within thefolia-serverdirectory as 'red' (however, those inpaper-serverare not red and appear to be part of the git repo as intended), as in not part of the git repo. when I make modifications to files and use intellij's "commit" feature, the modifications do not show up. I have made modifications to folia in the past, and if I take a look at the intellij project, thefolia-serverfolder is not marked as red by my ide
thats because there are no classes under folia-server
all folia classes are under the minecraft source
is this a fork or folia itself?
but isnt the minecraft source within the folia-server
I just cloned folia from https://github.com/PaperMC/Folia
and in which directory were you trying to commit?
I made a change to src/minecraft/java/io/papermc/paper/threadedregions/RegionizedData.java
ik but it sounds like you committed under the wrong directory if the changes dont get rebuilt
the proper git repo for committing would be the java folder
under minecraft
well I didn't 'manually' make any commits yet as in I only ran the applyAllPatches task
i understood it as if your changes aren’t showing up from the original message
as for the red files it seems that it somehow got imported wrongly or just some error
yeah, I made one change for test reasons, and then looked to check the commit window if it would show up.
Im guessing this is somehow related to my local setup then? I've cloned the repo 3 times now and this is consistently how its setup after running the gradle task
any idea what this is caused by / how I could get rid off it? Making my changes and compiling works, however I do need patch files for them
you could manually commit them in the java dir if the ide doesnt work properly
and then rebuild
i think you could try importing just the server directory into the ide
so opening the server directory as its own project basically?
thats how it should be done iirc
yes
if that fails then just the java folder
wohoo! that did it. thanks for the help!
what gradle tasks do I need to run after updating the paperRef and mcVersion in my paper fork so it is actually updated to the new version?
just applyAllPatches
What is api.papermc.io/v2 actually using for downloads? Asking bc I want to create universal scripts for downloading the builds of like similar projects to paper. GeyserMC's download api is build the same
Geyser uses and papermc used a project we created called Bibliothek, it's on our GitHub.
We have since replaced our usage with a new project called fill, which isn't open source (yet)
I hope you aren’t using the open source licenses for this project 😆
Hi, I'm getting an error :
.\gradlew --refresh-dependencies
[Incubating] Problems report is available at: file:///C:/Users/anton/Documents/_Walyverse/Walyverse/Plugins/WalyverseOneblockModule/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring project ':NMS:v1_21_5'.
Failed to create service 'paperweight-userdev:setupService:67b115ed742da2541c3b41cbbd9950e53aafe8c7a73fd1ba97eb107ffe27d5ec'.
Could not create an instance of type io.papermc.paperweight.userdev.internal.setup.UserdevSetup.
The paperweight development bundle you are attempting to use is of data version '7', but the currently running version of paperweight only supports data versions '[2, 3, 4, 5, 6]'.
- 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.12/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 18s
build.gradle
plugins {
id("io.papermc.paperweight.userdev") version "2.0.0-beta.11"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
group 'NMS:v1_21_5'
dependencies {
paperweight.paperDevBundle("1.21.5-R0.1-SNAPSHOT")
compileOnly rootProject
}
shadowJar {
archiveFileName = "${project.name}-exclude.jar"
}
assemble {
dependsOn(reobfJar)
}
tasks {
reobfJar {
File outputFile = new File(rootProject.archiveFolder, "reobf/${project.name}.jar")
outputJar.set(layout.buildDirectory.file(outputFile.getPath()))
}
}
if (project.hasProperty('nms.compile_v1_21') && !Boolean.valueOf(project.findProperty("nms.compile_v1_21").toString())) {
project.tasks.all { task -> task.enabled = false }
}
My project is composed of NMS folder containing all files, and inside each, build.gradle with paperweight version. I'll show you
try updating the paperweight version and see if that fixes the issue
latest version is 2.0.0-beta.19
Should I update all build.gradle that contains beta.11 ? Or just the version 1.21.5?
let's try just updating the 1.21.5 module first
though, you should probably put it in the root project's build.gradle instead of each module having an independent paperweight version
Some versions do not use paperweight
you can make it so the plugin is applied to a specific set of modules
I'm new to gradle. I'll make a quick video to show you
though, it doesn't matter that much. Don't wanna rework your thing if it is working
I would recommend looking at the following example repository for a more standard multi-module setup: https://github.com/PaperMC/paperweight-test-plugin/tree/multi-project
I will check
Interesting but didn't help me to fix the problem
Fixed the bug!
thx for the tip
I have some merging errors now because of a patch I added. How do I update the patch or what exactly do I need to do in order to solve the conflicts the right way?
Do I just need to rebuild the patch?
you fix merge conflicts, apply the patch and rebuild yea
patches after that however are a bit of a headache as rebuilding would remove them
Can I update from 1.21.8 to 1.21.9 directly or do I need to update through all the single versions?
you can directly update
Is the updatingMinecraft=true attribute in gradle.properties necessary while updating?
i think that it never did anything on forks anyway only on paper
i think no cuz the relevant part in the main build file that got activated by it is removed
it was used here
for the tasks which have since been moved away from there
since april 14 to be exact
repositories {
maven {
name = "papermc"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")
}
Why can't this gradle be imported? The error only prompts my module name.
I just tested it and it works fine so there must be something messed up with your setup
@tawny lintel let's continue here
as for why, I have no idea
What is the gradle version?
make sure to specify a java version
Other projects can be imported normally, and there is no other information, just a module name.
repositories {
maven ("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
you specified the repository wrong
maven("https://repo.papermc.io/repository/maven-public/")
no space here
That does not affect the format, it is just the format display, in fact it is the same as not writing spaces
the snippet you sent works perfectly fine for me having the java plugin applied
Yes, so it's very strange. It's the same content, but it works fine when I change the project.
The key is that this is all his information
:project:common-impl-nms21p:main: Could not resolve io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT.
Required by:
project :project:common-impl-nms21p
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
try running ./gradlew wrapper --gradle-version latest twice
Yes
this generally looks like you misconfigured the repositories but given the snippets you sent everything works fine
could you give all of the build files since it seems like a multi-module project
Yes, it is a multi-module project, the address is https://github.com/TabooLib/adyeshach/tree/XiaoJie-150/1.21
https://github.com/TabooLib/adyeshach/blob/XiaoJie-150/1.21/build.gradle.kts
seems like you declare java 1.8 for the source id suggest setting that to java 21 and also perhaps try adding the paper repository in the main build file under subprojects
you could set the compatibilities per module
because paper 1.21 needs java 21
and 1.19 needs java 17 etc
Oh? You mean the project's Java version definition affects the module's?
from what i recall yes
Yes, because JavaPluginConvention is set to jdk8, it is normal now.
how would I update the patches then after resolving the merge conflicts? It really is a headache
Where can I find the version specific ids?
Wdym
hey guys im having a 0 braincell moment with a gradle build.kts file rn.
this is the code i copied from the paper wiki:
maven {
name = "papermc"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}```
and im getting a ton of errors:
Unresolved reference: compileOnly
Expression 'java' cannot be invoked as a function. The function 'invoke()' is not found
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val PluginDependenciesSpec.java: PluginDependencySpec defined in org.gradle.kotlin.dsl
Unresolved reference: toolchain
Those are provided by the gradle java libraries plugin or something
(may also need the java plugin too)
make sure you have: build.gradle.kts
plugins {
id("java")
}
at the top (it can be anywhere, but usually at the top)
dang sorry i guess i was just confused cause the tutorial doesnt have that in the build script
that stuff is generally inside of the standard java gradle template
oh thats my mistake then, i mustve just copied the thing replacing the entire script
my bad
thanks guys
i was reading up on kotlin on w3schools and the syntax seemed a bit different from the build.gradle.kts file. are they the same language?
Yes
maybe i need to find a build specific kotlin tutorial
Well, they're using a bunch of gradle magic features in order to make it more clear what's going on
or, well ,clear from the reading part, not always the writing part
oh i see. whats the term for the named curly brace sections in kotlin? they look like functions, blocks, or namespaces but idk what they are called in this context.
like dependencies {}
iirc it's basically a shortcut for apply()
That's basically just lambda statements
I was gonna say lambda but I know kotlin loves to give stuff fancy names just to make reading the documentation more fun
those are like unnamed functions like functional interfaces right?
Writing
dependencies {
compileOnly(...)
}
Is the same as writing in Java
dependencies(this -> {
this.compileOnly(...);
});
They are also basically extension functions
Kotlin DSL is nothing more than just smartly chosen extension functions which you provide as a lambda statement
Just Kotlin trickery
Basically, yeah
just took a screenshot of this so i can revise this in the morning when im properly awake xD
not sure if higher order function or aneurism
But here the interesting part is that you do not have a parameter, but this is the same as whatever type is inside that dependencies block normally
i actually dont think ive ever seen that java syntax. i think im missing some knowledge in that area
ive seen the arrows like () -> {
same thing
The Kotlin docs have an article on this exact way of writing stuff: https://kotlinlang.org/docs/type-safe-builders.html
They call it type-safe builders, which is really boring imo, but it is what it is
thanks ill have a read tomorrow
oh wow thats similar to html but just a different way of writing it
its like html x xml
yeah true they are very similar
But yeah, you get it. It's Kotlin's code diabetes (too much sugar) for writing builder patterns
https://kotlinlang.org/docs/type-safe-builders.html this link is killing my last 2 braincells
its so complex 😭
i think you're worrying about things you don't need to just yet
unless you plan on writing more complex build scripts than a basic java plugin + paper api dependency, there's no need to understand the ins and outs of kotlin for it
https://cdn.discordapp.com/attachments/555462289851940864/1424790537809956984/image.png?ex=68e53b17&is=68e3e997&hm=c67e8fcf206dcb0f2af81457dce99c93dcf6525ed3dfddb2d16ee2926aa57e5c&
My friend has that problem, it happens for every dependency that he adds, no matter what is it, does anyone know why? we use gradle
chances are it is either outdated jdk or IDE
jda and ide are updated
run a build and see what it says
the fact that it can find the package but not the class suggests you're using the wrong java version for the project or the IDEs caches are borked
if it builds fine, go to what I think was the file menu and hit invalidate caches or might be fix IDE now
which options do i choose
run a build first
I mean, you don't need the first one, but, basically, yes
it wont let me because other things from my api are broken they also cannot be found
it should still let you run gradle
Ctrl + Ctrl then gradle build
even if it errors
funny thing that after invalidating cache paper has worked but for example jda didnt lol
problems of big project...
the fact that JDA works on our discord api but it doesnt in discord bot is funny
I'm having a hard time setting up the gradle in intellij
Some dude apparently dragged his balls through the dependencies while trying to set up his environment it's the weirdest setup I've ever seen
You have to either describe the problem in more detail and or provide logs
You have to give us more context
I will send the configurations in a few hours
thanks i needed to hear this
i appreciate it
hey gang using the gradleup shadow plugin how do you choose which dependencies are shaded into the jar
by specifying a dependancy as api, implementation or runtimeOnly
api is a java-library only task, for the normal java plugin you'd use either compileOnly or implementation. Not even sure when you use runtimeOnly
for database drivers
I recently created a fork of Folia based on the paperweight-example and was looking at forks on GitHub like Luminol. It was actually pretty easy. The part I can't figure out is how to create the patches. If the .gitignore is ignoring paper-api, paper-server, folia-api and folia-server, I can't create them using the standard git format-patch. What's the best way to do this?
you either use the fixup task or create commits inside the correct repos and rebuild patches using the proper tasks
take a look at ./gradlew tasks output
Ok, I'll take a look!
Hi! I'm getting this error when I try to sync my project with run-paper:
Cannot set the value of property 'downloadsApiService' of type xyz.jpenilla.runtask.service.DownloadsAPIService using a provider of type xyz.jpenilla.runtask.service.DownloadsAPIServiceImpl.
The error disappears if I use the plugin in a single module, cus rn I have it on two modules
Yes, that is a known limitation, you need to add PW to the parent module with apply false
pw?
paperweight
Oh, derp
I'd guess the same applies, gradle limitation means that you can't really add that stuff to multiple modules, add it ot the parent project and define the tasks there
the paperweight test plugin project on github unironically has an example of this
I'm experiencing some issues with disabling spigot:
Unexpected added class from Spigot: cds$a - net/minecraft/world/entity/Display$BillboardConstraints
-# for snapshot 25w41a
don't you just have to set enabled property to false, what did you specify the build data ref and package version for
It complains about not finding spigot then 🤷
Is it possible for paper forks to update to snapshot versions?
yes if you also update paper itself and make that updated repo your upstream
that's smart wow thank you xd
> Could not find spark-paper-1.10.84-20240720.204128-1.jar (me.lucko:spark-paper:1.10.84-SNAPSHOT:20240720.204128-1).
Searched in the following locations:
https://repo.papermc.io/repository/maven-public/me/lucko/spark-paper/1.10.84-SNAPSHOT/spark-paper-1.10.84-20240720.204128-1.jar
Trying to build with (yeah, I know) 1.21
that artifact used to be published to central snapshots but a while ago they lowered the amount of time snapshots are kept for iirc
is the api depending on it or just the dev bundle
1.21(.0) is not a version worth fixing though
dev bundle
you can just exclude it, runDevBundleServer will break but everything else should be fine
should be available now
Im building someone elses plugin that doesnt have an api package published but does have the api source set, and i get this error in the jitpack log
Failed to execute goal on project MC_1_21_8: Could not resolve dependencies for project su.nightexpress.dungeonarena:MC_1_21_8:jar:8.3.0: Could not find artifact org.spigotmc:spigot:jar:remapped-mojang:1.21.8-R0.1-SNAPSHOT in papermc (https://repo.papermc.io/repository/maven-public/) -> [Help 1]
Is this a configuration error or something else?
you would need to run spigot's build tools first to get the spigot jar
This is on jitpack, is that possible?
no
wonderful
i assumed that if I just used org.spigotmc:spigot-api:1.21.8-R0.1-SNAPSHOT it would work or still no
because that package is actually on the papermc repo? idk how spigot builds work
if the plugin uses internals, which is most likely the case (because of the extra steps you need to do to get the full spigot jar), it wouldn't work
you could use userdev I suppose, but idk if it would since hard fork
at that point i would have to convert the build system of the project, very sad
we dont have the capacity to provide support for two different build systems
thankfully its pretty straightforward
gradle has a nice init task which converts your maven build to gradle
the generated gradle files should be good to go out of the box but may require minor changes to work properly in some cases
or you can just clone the example paper plugin and make probably minor adjustments to make it match the maven build
(btw theres also a paperweight userdev maven plugin that works but its unofficial so you wont get support here)
No i completely understand, just unfortunate that the author chose maven over gradle.
Way easier to work with from the dev side
While the user side is a hit or miss as we all know with gradle
Im currently trying to update my project from
userdev 2.0.0-beta.17 -> 2.0.0-beta.19
minecraft 1.21.1-R0.1-SNAPSHOT -> 1.21.8-R0.1-SNAPSHOT
I updated my gradle wrapper to 9.1.0 which supports java 25 as far as im aware.
My project uses java 25 as its jvm version.
When configuring the gradle project, i get an exception during the remapMinecraft step.
Execution of 'io.papermc.codebook.cli.Main' failed with exit code 1.
> Task :ability-api:paperweightUserdevSetup
Skipping vanillaServerDownloads (up-to-date)
Skipping extractFromBundler (up-to-date)
Executing remapMinecraft...
> Task :ability-api:paperweightUserdevSetup FAILED
Execution failed for task ':ability-api:paperweightUserdevSetup'.
> io.papermc.paperweight.PaperweightException: Exception executing remapMinecraft
The log file shows an "Unsupported class file major version 69" exception. Full log:
https://pastebin.com/BPcjNY7y
This means, something, somewhere, doesnt support java 25 class files. But im lost which part of the toolchain is failing with this, as all of them should be using java 25 by now.
codebook asm probably isn't on 9.9 then
Yeah was about to say that it looks like asm is on 9.6.
Is this pulled from Hypo? But this is part of the userdev dependency.
This means ill just have to wait, right?
Well or you can technically somehow run the step with a different jvm

but definitely something we should be fixing yea
Ill just wait. You guys do the hard work. Ill dabble in lobby plugins or whatever.
fair enough
ill just unpack the codebook jar and repack it with the new asm classes 
Are there any docs for io.papermc.paperweight.source-generator? I'd like to use it in a (non-fork) paper project to generate a file that contains access to all the EntityDataAccessors via reflection (or I just extract all the entity ids manually? Although thats more prone to errors on version upgrades)
Nope
not even any like small sample like fork-test?
guess I'll have to read through what you guys did on the paper repo then
No, it's internal tooling
Would it even be usable for my usecase? Or is it just completely out of the question?
I mean, the primary goal is that it just generates a bunch of classes based upon stuff it can derive from the vanilla mapped jar
that would be exactly what I want for this project
that generally smells in its wheelhouse at least from the data abilities, but, idk how far it will get you
did everything like on the docs but got this error im using gradle 9.1.0
see the note at the top of the docs:
This guide is written using the Gradle Kotlin DSL and assumes you have some basic knowledge of Gradle.
Hi, does someone know how I would go about using Mixins in a Paper plugin ?
I've tried to add the dependency (v 0.8.7) and manually call the MixinBootstrap.init();, but I get a classNotFoundException net.minecraft.launchwrapper.LaunchClassLoader
How would I go about modifying a method in the game's source code ?
you can’t through a plugin
you can however fork paper and make that change in the software itself
there are also third-party projects like Ignite which do add Mixin support via a javaagent
That feels like a very heavy option when I just want to change one single line of code
What are you trying to change?
I'm generating a custom structure in a custom dimention (all done through the datapack bundled in the plugin).
I can configure the structure to generate a single instance in the dimention, at very specific coordinates.
I want to TP the players in the start room of the structure, which I know the coordinates of.
Issue is by default, the JigsawPlacement.addPieces does Rotation random = Rotation.getRandom(worldgenRandom); to determine the rotation of the structure - that's not something I can configure in my structure config.
As a result, I dont know in which direction i should offset the spawnpoint for my players.
All i want to do is :
if (currentPool.toString().equals("myplugin:custom_structure/start")) {
return Rotation.CLOCKWISE_90;
} else {
return Rotation.getRandom(random);
}
I know how to write a mixin for it (I already have it), but my issue is I dont know how to inject it into the game's code
I know paper doesn't support Mixins, but I thought I could do the Mixin initialization manually
Is this a plugin you're distributing or just running for yourself? If the latter, I'd just use Ignite.
I would need to ask if we can switch to Ignite, but if we cant what can I do ?
Options are that or maintaining a lil paper fork
you don't have to switch to anything, it is an agent on top of paper
<@&748618676189528155>
Hi, any help is appreciated, this is with a fresh clone of 1.21.10 for a paper fork https://i.tricrotism.com/idea64_xekcVVQKEb.png
Im confused since the files dont actually exist aside from in the gradle cache???!?!?!?!
Not sure what I’m missing here exactly.
Generally wrong Java version, otherwise you get the joy of looking into it
Make sure that the versions of stuff is aligned with paper too, such as the decompiler versions
We doing 21 still?
I’ll check that next
ok, i think i fixed it? seems it was using mache 1.21.10+build.5 instead of .4 😭
wild
Paper generally aligns with whatever Minecraft uses at that point.
ye i assumed, mainly wanted to sanity check it
Gradle 9.1.0
JVM 25 (Eclipse Adoptium 25+36-LTS)
version("minecraft", "1.21.8-R0.1-SNAPSHOT")
version("userdev", "2.0.0-beta.19")
Since a few days im getting an exception when i try to load my gradle project containing userdev.
During the remapMinecraft step, i get an exception from codebook.
java.lang.IllegalArgumentException: Unsupported class file major version 69
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:200)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
at dev.denwav.hypo.asm.AsmClassData.readFile(AsmClassData.java:296)
at dev.denwav.hypo.asm.AsmClassDataProvider.parseClassData(AsmClassDataProvider.java:65)
at dev.denwav.hypo.model.AbstractClassDataProvider.lambda$findClass$0(AbstractClassDataProvider.java:139)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1724)
at dev.denwav.hypo.model.AbstractClassDataProvider.findClass(AbstractClassDataProvider.java:132)
at dev.denwav.hypo.model.ClassDataProviderSet.findClass(ClassDataProviderSet.java:101)
at dev.denwav.hypo.asm.AsmClassData.computeSuperClass(AsmClassData.java:239)
at dev.denwav.hypo.model.data.LazyValue.getOrThrow(LazyValue.java:121)
at dev.denwav.hypo.model.data.LazyClassData.superClass(LazyClassData.java:220)
at dev.denwav.hypo.hydrate.DefaultClassDataHydrator.hydrate(DefaultClassDataHydrator.java:55)
at dev.denwav.hypo.hydrate.DefaultHydrationManager.hydrate(DefaultHydrationManager.java:96)
at io.papermc.codebook.pages.InspectJarPage.exec(InspectJarPage.java:108)
at io.papermc.codebook.pages.CodeBookPage.exec(CodeBookPage.java:54)
at io.papermc.codebook.CodeBook.exec(CodeBook.java:88)
at io.papermc.codebook.CodeBook.exec(CodeBook.java:71)
at io.papermc.codebook.cli.Main.call(Main.java:370)
at io.papermc.codebook.cli.Main.call(Main.java:53)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at io.papermc.codebook.cli.Main.main(Main.java:332)
codebook's ASM version hasn't been updated yet so it doesn't support java 25
everything else does, just not codebook
Userdev requires j25 if i understood a previous exception right (thats why i updated). Which means im softlocked until asm updates?
userdev should work fine with 21
Ill try it out, but i had an exception similar to "no version of userdev found for java 21"
well, if it doesn't work properly in that userdev version for whatever reason, you can just downgrade to beta.18 I guess
but I don't think I had any issues with 21 last time I tried it
override the java toolchain used for setup in the paperweight extension
Im a noob, first time using Gradle, struggling hard. I keep getting this error
Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
plugins {
id 'java'
id("xyz.jpenilla.run-paper") version "2.3.1"
id("io.papermc.paperweight.userdev") version "1.7.7"
}
dependencies {
paperweight.paperDevBundle("1.21.5-R0.1-SNAPSHOT")
}
tasks {
// Configure the run-paper test server
runServer {
minecraftVersion("1.21") // the server version to run for testing
}
// Make sure the reobfuscated JAR is produced when you build
assemble {
dependsOn(reobfJar)
}
}
Just updated to latest userdev.
Try to execute wrapper to update Gradle and I get an error.
https://pastes.dev/Lh13zuZeNL
And here is my build.gradle
https://pastes.dev/zmie8GYmxp
when you get these kind of ugly selection errors and you don't understand it, it's one of the cases where I would actually use an llm 
but try editing the wrapper properties manually and then redoing the upgrade
Thank you that worked. Also updating userdev and gradle fixed my other error.
https://mclo.gs/mw2IT6L can some1 help me?
my server was on 1.20.4 and i has update to 1.21.4 and this happened
use #paper-help
Is their any big difference between kotlin and groovy? I didnt even realize at first I was using groovy until I kept trying to add kotlin code.
they are seperate programming languages so yeah there are differences
kotlin has a lot of exotic syntax compared to groovy
In comparison to Gradle vs Maven, where people are usually suggesting I use Gradle, is Kotlin vs Groovy like that at all or is it mostly just preference?
gradle team recommends kotlin these days, if you use intellij it has better ide support
Kotlin and Groovy are the available DSL languages to use in gradle
and kotlin is the preferred one
a lot easier to read and more supported
Cool thank you very much
i would argue it's groovy the one that is absolutely littered with exotic syntax 
Kotlin has exotic syntax, but at least feels consistent, Groovy feels incredibly inconsistent (braces are optional, the is like 3 types of strings you can use, etc), at least when using them as a Gradle dsl
when it comes to internal classes (OCB, NMS), does userdev only provide the compiled classes or can I make it generate source files somehow?
it generates source files unless you explicitly disabled it or are running with env.CI=true
I don't think I've ever set that environment variable but I'll check just to be sure
the .java files are sibling to the .class files in the final jar output by the setup task
you just click attach sources while viewing a decompiled file for intellij to realize
when I click attach sources in IntelliJ nothing happens, usually it opens the select sources window but it isn't right now so I guess I am having an issue with IJ itself right now
yeah it won't make you select anything, it should just magically start using source files once you click it
in the latest EAP I get a thread error instead though
(when attaching or download any source
)
you could try selecting the same jar though
running 2025.1.2 so that shouldn't be the case for me. Though it is the flatpak version so maybe that is messing with it
basically there is no proper way to have a connected sources and binary jar produced by a task and then consumable by normal means
so we abuse intellij behavior in merging the jars
there's better ways for eclipse but no one has asked for eclipse support yet
alright, thanks. I'll see if I figure out the IJ issue
(in v1 the setup was not a task and we used a different strategy to attach sources, but it had to be made a task for configuration cache compatibility; this is the same way ModDevGradle works for NeoForge)
it's kind of funny, I got the idea for paperweight v2's userdev task from ModDevGradle, which has influence from loom in it's file-based locking, which I PRd to loom based on paperweight code 
okay, just updating to 2025.2.3 (was previously in 2025.1.2) seemed to have fixed my issue, for whatever reason. I honestly thought paperweight just didn't generate source files for the longest time lol
This is what happens when you run ./gradlew wrapper --gradle-version latest once instead of ./gradlew wrapper --gradle-version latest && ./gradlew wrapper - see image
(i.e: always run the wrapper task twice when upgrading Gradle for a full upgrade)
This is because wrapper is a normal task that extracts the wrapper files from the current Gradle runtime and sets the new url in the properties file, as described in the Gradle docs!
https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper
@rapid fractal ^
could it be a cache issue?
seems like it was an intellij cache problem specifically, it builds fine from the terminal
Is there a way to apply feature patches fuzzily? Patches in the same region and file succeded with fuzzy apply on file patches but fail to 3-way-merge on feature patches
Its mainly just variable names that changed since something in paper was updated (is it mache?)
there isn’t any way to do that
Is there a way to make this easier to apply? There are no code changes except variable names
(Except doing stuff like patch editing)
Although I probably can just do that
eh not really, you could apply those patches using a wiggle script
and then commit/rebuild
Wiggle script?
will look at that thanks
yea I was aware of that
I think those are included in mache, is that right?
yes
Anyone know why Idea wont load ANY classes, not even from the jdk?
I managed to get it loading the KotlinSDK after adding "facets" to my modules, but its still not importing anytihng
ive reinstalled idea twice with no avail
deleted all cache directories and rebuilt them
reinstalled jdks
also, my buildscripts are completely unresolved, so it seems no gradle jars are getting loaded either (possbily symptom from not importing any classes)
but strangely, gradle syncs and builds.
So it is purely IDEA
ive been working on this for like three hours and no amount of googling or AI has helped, so im unsure what i could do next
notepad > IDEA
except i want debugging and semantic analysis 😭
idk how to fix it gng. i personally use vscode and have the problem highlighted in the image.
ive js gotten used to it atp after giving up trying to fix it
did you try deleting the project's .idea and then restarting idea
yes
its for every projcet
i generated a new project from scratch and had the same issue
CLion works great though! thats a relief
but yeah it seems IDEA just wants me to not make plugins
it may be something linux related but I dont know how thats possible, considering nothing massive changed since it was last working
All build steps work and I do get a plugin jar
meaning its literawy juts idea being angry
if anyone has ANY ideas, please ping me
hi, not sure where to ask, but I have problems running runServer/runClient in mache.
it seems that run configuration does not include default game assets, like version.json or default en_us lang file.
any ideas?
[13:51:32] [main/WARN]: Missing version information!
Exception in thread "main" java.lang.ExceptionInInitializerError
at net.minecraft.network.chat.contents.TranslatableContents.decompose(TranslatableContents.java:91)
at net.minecraft.network.chat.contents.TranslatableContents.visit(TranslatableContents.java:184)
at net.minecraft.network.chat.Component.visit(Component.java:103)
at net.minecraft.network.chat.FormattedText.getString(FormattedText.java:88)
at net.minecraft.network.chat.Component.getString(Component.java:47)
at net.minecraft.world.item.CreativeModeTabs.validate(CreativeModeTabs.java:1885)
at net.minecraft.server.Bootstrap.bootStrap(Bootstrap.java:58)
at net.minecraft.server.Main.main(Main.java:107)
Caused by: java.lang.NullPointerException
at java.base/java.io.Reader.<init>(Reader.java:168)
at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:123)
at net.minecraft.locale.Language.loadFromJson(Language.java:77)
at net.minecraft.locale.Language.parseTranslations(Language.java:70)
at net.minecraft.locale.Language.loadDefault(Language.java:38)
at net.minecraft.locale.Language.<clinit>(Language.java:32)
... 8 more
// Language.java
private static Language loadDefault() {
// ...
parseTranslations(biConsumer, "/assets/minecraft/lang/en_us.json");
// ...
}
tested both 1.21.4 and 1.21.10 to make sure I didn't mess anything when updating to the latest version
first run setup
I loved how I see channels notify me then a video shows and disappears lol, nice job !
I speedran that one lol. No need for the mods ping this time
They are really annoying lately because they themselves delete the messages shortly after posting, so you gotta be quick to grab their user lmao
Yeah i didn't have the time to see the vid lol
i guess having a big community like this would attract them always
how do i fix ./gradlew: Permission denied in github actions?
you need to mark it as executable
I use Git in Windows, and want to push the executable shell script into git repo by one commit.
Usually I need to do two steps (git commit).
$ vi install.sh
$ git add install.sh
$ git commit -am ...
What I did was add an extra step in the GH actions script which literally just runs chmod +x ./gradlew before running the actual build
Cool to know that it is possible with git as well though
no permanent fix?
I mean adding this to the actions script is permanent
That is literally the permanent fix
unless you remove the execute flag from the file it will remain executable
otherwise, as said, just add an actions step to mark the file as executable
hi can you tell me can I use JDK 22 with gradle 9.1.0 for paperweight?
what error are you getting?
im not that stupid 😄
It's gradle jdk issue i think
Its literally that what i have done
It worked thank you much! ❤️
Thats why i asked for java ver
Hello, I get this error when compiling a module using paper weight:
Execution failed for task ':NMS:V1_21_8:compileJava'.
> Could not resolve all files for configuration ':NMS:V1_21_8:compileClasspath'.
> Could not find net.kyori:adventure-text-serializer-ansi:.
Required by:
project :NMS:V1_21_8 > io.papermc.paper:dev-bundle:1.21.8-R0.1-SNAPSHOT:20250906.215025-55
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
- Log
- NMS:V_1_21_8:build.gradle.kts
- build.gradle.kts
- gradle.properties
- settings.gradle.kts
- Open source Link
I don't think I have any other useful information.
a command line build log is better, don't need all the intellij junk
there's something weird with your logs it should be showing a selection error about why it cant be resolved and what it tried
maybe try a build scan
Is this command correct? ./gradlew build --scan. I do not typically use gradle.
yes add --scan to the failing command
and then activate the scan in your browser before sharing it
I think I've found it, it contains private information. Can I send it to you in a private message?
Hey, I have a small issue where if I use runDevServer with debug in intellij. For example, i set it when the sheep spawns, so the debug starts, and when I click on resume program it shows an error and kills the gradle task
Can I somehow avoid this?
probably the watchdog
there was a system property to disable that, you'd need to check the docs unless somebody else has it
-Dpaper.disable-watchdog=true ?
yes
Amazing, thank you!
Something like this
`java-library`
id("io.papermc.paperweight.userdev") version "2.0.0-beta.18"
id("maven-publish")
}
group = "dev.lrxh"
version = "2.0-SNAPSHOT"
description = "BlockChanger library built with Paperweight"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
dependencies {
paperweight.paperDevBundle("1.21.8-R0.1-SNAPSHOT")
}
tasks {
compileJava {
options.release.set(21)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = "dev.lrxh"
artifactId = "BlockChanger"
version = "2.0-SNAPSHOT"
from(components["java"])
artifact(tasks.named("reobfJar")) {
classifier = "reobf"
}
}
}
repositories {
mavenLocal()
}
}
right, and how are you consuming the library?
I do publishToMavenLocal then use it in a diffrent plugin
yes, i mean in that other plugin
Wdym with how am I consuming it
I am just calling a method in the library itself
i mean not that you should be publishing a reobf'd library to begin with
what i'm asking is how are you depending on the library in that other plugin
in the build script
any reason you're doing that? you said you don't want spigot mappings
btw the latest beta is .19
use that
youll have to run the ./gradlew wrapper —gradle-version latest task twice before switching tho
ik the - are messed up but there are two of them before the gradle
@iron jungle
will that fix the issue?
I removed it I seem to have forgotten to remove it when I removed Spigot support
`java-library`
id("io.papermc.paperweight.userdev") version "2.0.0-beta.19"
id("maven-publish")
}
group = "dev.lrxh"
version = "2.0-SNAPSHOT"
description = "BlockChanger library built with Paperweight"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
dependencies {
paperweight.paperDevBundle("1.21.8-R0.1-SNAPSHOT")
}
tasks {
compileJava {
options.release.set(21)
options.encoding = Charsets.UTF_8.name()
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
}
paperweight {
reobfArtifactConfiguration.set(
io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
)
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = "dev.lrxh"
artifactId = "BlockChanger"
version = "2.0-SNAPSHOT"
from(components["java"])
}
}
repositories {
mavenLocal()
}
}
``` This is how it is now
yeah that should be fine as long as you don't reobf the plugin that consumes the library then
This my plugin:
<?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>dev.lrxh</groupId>
<artifactId>WorkingDolphin</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>WorkingDolphin</name>
<properties>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.lrxh</groupId>
<artifactId>BlockChanger</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>```
Any solution for my issue?
Some problems were found with the configuration of task ':mainResourceFactory' (type 'ExecuteResourceFactories').
- Type 'xyz.jpenilla.resourcefactory.ExecuteResourceFactories' property 'factories.$0.value.apiVersion' doesn't have a configured value.
name.set("FakePlayers")
version.set("1.0.0-21.8")
main.set("dev.suitsnap.fakeplayers.NPCPlugin")
bootstrapper.set("dev.suitsnap.fakeplayers.NPCBootstrapper")
authors.add("SuitSnap")
apiVersion.set("1.21")
}

it builds fine just wont compile
Yes, because the plugin is upset for some reason
updated the resource factory to 1.3.1 and it worked thank you :3
@smoky violet is it possible to have both the runPaper and runFolia tasks at the same time in one module? i added the register folia run task function from the wiki but now it deregistered the paper one
im hoping i dont have to manually register it
sorry for the ping, i did that because it’s your plugin so i thought i should ask u specifically as you’d know best 😔

