#build-tooling-help

1 messages · Page 19 of 1

quaint marlin
crude kernel
#

did you run shadow

static urchin
#

somethine something single file

#

check the task list

quaint marlin
#

I get this after stopping the server but everything seems to work fine. Is this anything to worry about?

static urchin
#

presumably this being the run-task plugin?

#

no

#

that is fine

quaint marlin
#

ok

crude kernel
quaint marlin
#

Is it ok to add run task server folder to gitignore?

#

And what is this /.kotlin/sessions/ folder it keeps creating?

crude kernel
quaint marlin
main mica
#

You can put some files there (e.g. configs) if they are required for testing. But yeah, I really wouldn't track that entire folder

latent galleon
#

hello guys, i have a trouble with paperweight, i can't use this on my plugin...

Error:

Unable to resolve a dev bundle, which is required for paperweight to function

I have all, what be in 1.21 paper development docs

quaint raven
latent galleon
# quaint raven Show the full error and your gradle build script

This is full error.

plugins {
    id 'java'
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
}

group = 'pr.flx'
version = '1.0'

repositories {
    mavenCentral()
    gradlePluginPortal()
    maven("https://repo.papermc.io/repository/maven-public/")
    maven {
        name = "papermc-repo"
        url = "https://repo.papermc.io/repository/maven-public/"
    }
    maven {
        name = "sonatype"
        url = "https://oss.sonatype.org/content/groups/public/"
    }
}

dependencies {
    compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
}

def targetJavaVersion = 21
java {
    def javaVersion = JavaVersion.toVersion(targetJavaVersion)
    sourceCompatibility = javaVersion
    targetCompatibility = javaVersion
    if (JavaVersion.current() < javaVersion) {
        toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'

    if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
        options.release.set(targetJavaVersion)
    }
}

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('plugin.yml') {
        expand props
    }
}
crude kernel
#

i mean you have the userdev plugin applied but not using a userdev bundle

latent galleon
crude kernel
#

well, do you want to use userdev or the api

latent galleon
#

logical

crude kernel
#

...?

crude kernel
#

Can repro on the examples repo

swift sleet
#

Can anyone try compiling this plugin for me, I want to know if it is an error with me or it

limpid heart
#

what error are you getting when you build?

swift sleet
#

n exception occurred applying plugin request [id: 'io.freefair.lombok', version: '8.6']

Failed to apply plugin [class 'io.freefair.gradle.plugins.lombok.LombokBasePlugin']
Could not create an instance of type io.freefair.gradle.plugins.lombok.LombokExtension.
Receiver class io.freefair.gradle.plugins.lombok.LombokExtension_Decorated does not define or inherit an implementation of the resolved method 'abstract org.gradle.api.provider.Property getVersion()' of abstract class io.freefair.gradle.plugins.lombok.LombokExtension.

limpid heart
#

what command did you run, exactly?

swift sleet
#

./gradlew build

lament scarab
#

Probably outdated gradle or something hasn't been defined sonewhere properly

swift sleet
#

any way to fix it?

lament scarab
#

Check your grade version?

swift sleet
#

8.6

lament scarab
#

Latest is like 8.12

limpid heart
#

that project is using gradle 5.2.1

#

it's using the 8.6 version of the lombok plugin

#

try updating both the lombok plugin & gradle wrapper versions?

swift sleet
#

ok

#

I also tried it in intellij and returned same error btw

limpid heart
lament scarab
#

because it's using a stupidly old version of lombok

#

Which will need a stupidly old jdk to build

swift sleet
#

Ah

lament scarab
#

and you to use the wrapper to run the stupidly old version of gradle

#

sounds like the project just also isn't configured properly

swift sleet
#

yeah i figured

limpid heart
#

it seems like when they updated it 11 months ago they only updated the build.gradle

#

they probably didn't use the gradle wrapper

#

cuz it's way too out of date for that lombok version (gradle 5.2.1 vs 8.6)

lament scarab
#

yea

swift sleet
#

How hard would it be to fix?

limpid heart
lament scarab
#

update gradle, update the plugin

#

probably wouldn't need anything else

swift sleet
#

i updated gradle

lament scarab
#

then, update lombok

swift sleet
#

ok thanks

lament scarab
#

Bleh, summarising; use gradle and lombok 8.12, change the 'compile' to 'implementation', and then make sure that all the repos are https

#

do that, then it works

#

Now that this is no longer a distraction, going to disappear as my eye is ouch

mild fog
#
plugins {
    id("java")
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
}

group = "dev.shedux"
version = "v0.1"

repositories {
    mavenCentral()
    maven {
        name = "papermc-repo"
        url = "https://repo.papermc.io/repository/maven-public/"
    }
}

dependencies {
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

def targetJavaVersion = 21
java {
    def javaVersion = JavaVersion.toVersion(targetJavaVersion)
    sourceCompatibility = javaVersion
    targetCompatibility = javaVersion
    if (JavaVersion.current() < javaVersion) {
        toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'

    if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
        options.release.set(targetJavaVersion)
    }
}

tasks.assemble {
    dependsOn(tasks.reobfJar)
    paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
}

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('paper-plugin.yml') {
        expand props
    }
}

https://pastes.dev/QQ8jB0xIo6

crude kernel
crude kernel
#

like I said, the same thing happens on the example repo on the v2 branch

grim dock
#
1 actionable task: 1 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':paperweightUserdevSetup'.
> io.papermc.paperweight.PaperweightException: Exception executing applyDevBundlePatches

* 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 21s
``` what is wrong?
#

my java version 21 and gradle version is 12.1

#

I don't know why, but foliadevbundle doesn't give this error.

smoky violet
#

the error log there makes it pretty obvious what's going on

crude kernel
distant mango
#

what issue

cerulean cypress
#

Ahh, after N days

agile rivet
#

yo why is id("io.papermc.paperweight.userdev") version "2.0.0-beta.14" missing

#

}

distant mango
#

update gradle

crude kernel
feral wedge
#

how do I make my plugin that also uses userdev be compatible with a library (InvUI) that uses spigot mappings?

void hill
#

Hey! I'd like to exclude adventure / minimessage api from paper due to my multi structure. and tried

                <exclusion>
                    <groupId>net.kyori</groupId>
                    <artifactId>adventure-api</artifactId>
                </exclusion>
            </exclusions>```

but somehow it's still there? 😦
lament scarab
#

I mean, adventure is made up of multiple components

#

also, might have to content with transitives

#

but, snippets like that provide 0 context as to where anything is setup, etc

void hill
#

true, fixed it 😄 didn't have all the required exlusions ^^ so didn't include the required ones! ty

wild meteor
#

Hello 👋 Does anyone have an idea of what's wrong here?

lament scarab
wild meteor
# lament scarab at the very least, update gradle

Tried to update it to 8.12, now I can't even apply patches 😭

* What went wrong:
Execution failed for task ':purpur:paper:downloadSpigotDependencies'.
> Cannot create consumable configurations in detached resolvers
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':purpur:paper:downloadSpigotDependencies'.
Caused by: org.gradle.api.InvalidUserCodeException: Cannot create consumable configurations in detached resolvers
    at io.papermc.paperweight.tasks.DownloadSpigotDependencies.run(download-task.kt:205)
lament scarab
#

truncated logs are useless

covert horizon
#

publishing to maven local no longer likes it when the file is different than expected, which happens when using paperweight userdev reobfjar. not really sure how i should resolve this. only began happening when i updated paperweight-userdev from 1.7.1 to 2.0.0-beta.14

Execution failed for task ':generateMetadataFileForMavenJavaPublication'.
> Cannot publish module metadata because an artifact from the 'java' component has been removed. The available artifacts had these problems:
  - build\libs\Core-1.0.jar:
      - file differs (relative to root project 'Core'): (expected) build\libs\Core.jar != (actual) build\libs\Core-1.0.jar

https://gist.github.com/partydev/1f4384a33bebcd708c84e9e2536ee716 build.gradle.kts

lament scarab
#

gradle stuff is often sensitive to you messing with things like the names of stuff

#

really should just use a copy jar task instead of messing with the build

#

having the version inside of the project name and then writing even that out is weird

#

(random googling generally recomends a dozen different ways to rename the output in various means, which is part of the fun as some cause more sideeffects than others is my understanding)

#

overriding classifiers also tends to result in causing issues with jars conflicting with other jars in the build process

full dome
#

is there anyone who can dev a plugin? i got a code i just need someone to set that up? dm me or reach me out here.

lament scarab
#

This is not the place for solicitation

full dome
lament scarab
#

Find a place which offers such services?

#

builtbybit, and various dozen other places

full dome
#

can u sned me link via dm

lament scarab
#

No

full dome
#

thats rude but okay

lament scarab
#

I'm not starting up a DM session with you for something you can literally copy and paste into google

full dome
#

DM session?

#

lol

#

theres a button

#

if u didnt know

lament scarab
#

I have my DMs set on approval, pretty sure that that doesn't require re-approval; also, I've already said the name of the place, I'm not sure why you would need that DM'd to you

shrewd crestBOT
#

(67a0034e6ed5010734cf1b32) // @full dome (@yclouds / 946536965145264159) has been timed out by @torn sonnet (71627708521512960)
Reason: Hassling staff

covert horizon
#

even if I don't specify any of that it still has the same error

lament scarab
#

I mean, you moved the jar

#

it's upset because the jar went bye bye

#

publishing won't auto publish the shadowed jars

#

what you're doing in the shadowJar task is going to override the final output jar and then yeet it

covert horizon
#

yeah I do that because i don't like how it adds the version name to the jar. guess i have to find a different way

#

now that it looks like i shouldnt have to worry about reobfuscating i should change things regardless

lament scarab
#

if you want the jar without the ver name use a copy task

covert horizon
#

will do, thanks

dim pelican
#

Since the project hard-forked, I no longer see the createMojmapBundlerJar or createReobfBundlerJar gradle tasks, or anything like them under paperweight.. anyone able to point me to the new way of preparing a paper server jar for running & distribution?

lucid mulch
#

Did you apply the patches first? the tasks should be there after u apply the patches

#

also don’t use reobf

dim pelican
#

yup, applied patches, I'm looking under paperweight & don't see it still?

dim pelican
#

like hosting it on Github for instance

lucid mulch
#

no u need the paperclip jar for that

#

reobf is unsupported and should not be used

#

./gradlew createMojmapPaperclipJar

#

you can’t redistribute the bundler jar afaik

dim pelican
#

I ran that & was like "no way this will work i didn't see that task anywhere"

#

but it worked

#

thanks I found all the tasks, they're under "bundling" now it looks like

crude kernel
#

also happening on the paper repo

#

disabling my global gitconfig does not fix it

lament scarab
#

I mean, the issue is usually a global gitignore file

iron jungle
#

I am trying to build but get this error

`A problem was found with the configuration of task ':paper-server:applyResourcePatches' (type 'ApplyFilePatches').

  • Gradle detected a problem with the following location: 'C:\Users\nodyt\IdeaProjects\Paper\paper-server\src\minecraft\resources'.
  • 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 976ms
27 actionable tasks: 5 executed, 22 up-to-date
Configuration cache entry reused.`

lament scarab
#

That would generally not he th full error, but, try a shorter path or do it in WSL

iron jungle
bronze ember
#

its hard to say without knowing what it would do internally

#

its generally not a goal to implement worldedits api, but if there is stuff we can do for multi block placing without diving too deep into internal hacks, that seems fair

#

should open an issue with details about what you want to achieve and how you plan on doing it

iron jungle
#

Its really stable I haven't had any issues with it

lament scarab
#

There has been discussions around providing a bit lower level of access to modifying the world state over the years, the answer is that generally, yes, we're open to it, but, it would be one of those things that we'd need a proepr discussion over to ensure that we set a sane scope and that there is actually some interest in using it

iron jungle
iron jungle
#

oops

#

and also I have tested it, it works fine

crude kernel
lament scarab
#

if your global git ignore was busted, you might need to reclone the repo

#

otherwise, you need to work out what is preventing that folder from being commited

#

I'd imagine that the target name is the key here

crude kernel
#

oh, I disabled my gitconfig, not gitignore

crude kernel
hasty sigil
#

does anyone know how i can publish the reobfJar'ed sources of code to a maven repo instead of plain java sources (components["java"])

lament scarab
#

There is no reobf'd sources

#

nor do we recommend publishing reobf'd stuff

#

at least for dev time, everything should be mojmap'd, otherwise you cause a whole bunch of issues

dim pelican
#

Ok, so I'm testing out a new feature patch on the main from the hardfork, something is different.. the paper-server directory is no longer a git repo, and feature patching doesn't seem to work like it used to (I get no new patch file in paper-server/patches/features anymore)

#

did I miss a step? Tried to follow the latest CONTRIB readme to do this

#

for reference here's my local copy of the paper repo from 1.21.1

#

so either the git add . isn't working bc not a git repo, or I missed something needed to make it one?

#

ahhh now it's really bothering me too that LICENCE is mispelled..

#

just staring at me from two screenshots...

lucid mulch
dim pelican
#

thanks karmuss, but again it looks like the procedure there is also to run a git add . inside a specific subdirectory, which implies a .git folder in that subdirectory, which my repo no longer has with the main branch of the PaperMC repo.. Did something change?

#

I can do the per-file patches fine, it's the feature patch process I'm stuck on here

lucid mulch
#

i also don’t have the .git folder on my local repo but it works

dim pelican
#

for you it creates a .patch file inside paper-server/patches/features??

lucid mulch
#

yea it does

dim pelican
#

I'm missing a setup step then prbly, I just stashed everything & went into src/main/java, rando edit, followed the steps and ran every kind of rebuildWhateverPatches task gradle had, still no new patch file in features..

#

I did re-fork and re-download all the code for the 1.21.4 hardfork, so maybe I did something with my old 1.21.1 repo i forgot to do here

lucid mulch
#

src/minecraft/java

dim pelican
#

the link you sent for paperweight says u can, but let me test in the minecraft subfolder anyways

#

I feel like prbly some of the docs aren't caught up with all the recent changes yet

lucid mulch
lucid mulch
dim pelican
#

ahhhhhhhhh dangit

#

yeah it does work in the minecraft directory... I was trying to patch changes to ca.spottedleaf stuff in main/

lucid mulch
#

you would have to use file patches for that or just modify it directly

dim pelican
#

drat.. 😖

#

thanks for the help karmuss! glad at least I know things r working

lucid mulch
#

glad i could help :))

bronze ember
#

I am confused, did you try to use the fork examples to do something on the main paper repo?

#

That obviously doesn't work, fork work differently than the main repo. Creating a feature patch for the paper repo is covered in the contributing.md

iron jungle
lament scarab
#

did you apply patches?

iron jungle
lament scarab
#

no idea then, see if there is more info in the logs/see the flags for more info

iron jungle
#

Okay, thanks

iron jungle
lament scarab
#

wrong jar see the root build folder

iron jungle
#

ah your right sorry about that

#

I was copying the wrong file the whole time

crude kernel
#

Am I gonna have to remake my fork repo lmao

crude kernel
#

I did end up doing that and it works

crude kernel
#

how can I have a test plugin in my fork

#

oh I just need to add the project

#

lovely

crude kernel
#

How does publishing the devbundle look like now

main mica
#

you just run the publishing task with -PpublishDevBundle

strong merlin
#

this is the result when I try to apply patches on my fork (currently I don't even have any patches) and it's always missing purpur folder for server and api and I can't figure why what do I have wrong

paper -> purpur -> divinemc -> myfork

build scripts main and patched server
https://pastebin.com/nq5S0ViS

any help will be appreciated

hasty sigil
hollow sleet
#

Hi. I am using paperweight-userdev toolchain to build my plugin on 1.21.4. Because of one of the plugins I use, I need to use spigot mappings. I tried changing MOJAND_PRODUCTION to REOBF_PRODUCTION like so:
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
but this is not working. Plugin is still mojang mapped. How can I accomplish that and check the mappings of my jar?
(P.S. I use shadow too)

static urchin
#

You need to invoke reobfJar

hollow sleet
#

Do you mean like this:

    dependsOn(reobfJar)
}```
My build script contains this.
crude kernel
#

pretty sure you want dependsOn(tasks.reobfJar)

hollow sleet
bleak lark
crude kernel
#

Could you just dependsOn("publish -PpublishDevBundle")?

lament scarab
#

depends on takes a task

crude kernel
#

Yea hence my question

lament scarab
#

you'd need to depend on that task and somehow set the property if you wanted to do that automatically

#

No, because -P is not a task, it's a gradle argument to set a property

crude kernel
#

Can I not just throw it into the gradle.props

#

seems like I can, cheers

chilly shard
#

hi there, struggling with the mojang mappings for paperweight userdev... keep getting gradle error:
A problem occurred evaluating root project 'deathcats'.

No such property: MOJANG_PRODUCTION for class: io.papermc.paperweight.userdev.ReobfArtifactConfiguration

#

Here's my plugin build file if anyone wants to help: import io.papermc.paperweight.userdev.ReobfArtifactConfiguration

plugins {
id 'java'
id("com.gradleup.shadow") version "9.0.0-beta7"
id("io.papermc.paperweight.userdev") version '2.0.0-beta.14'
}

repositories {
mavenCentral()
mavenLocal()
gradlePluginPortal()
maven {
name = "papermc-repo"
url = "https://repo.papermc.io/repository/maven-public/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven {
name = "aikar-repo"
url = "https://repo.aikar.co/content/groups/aikar/" }
maven {
url = 'https://repo.codemc.io/repository/maven-public/' // CodeMC Repo
}

}

dependencies {
//compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
implementation('org.postgresql:postgresql:42.7.4')
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")
compileOnly('com.comphenix.protocol:ProtocolLib:5.3.0')
compileOnly('net.luckperms:api:5.4')
implementation('io.netty:netty-handler:4.1.117.Final')

}

def targetJavaVersion = 21
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}

tasks.assemble {
paperweight.userdev.reobfArtifactConfiguration = ReobfArtifactConfiguration.MOJANG_PRODUCTION

}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = System.getProperty("java.home") + "/bin/javac"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}

smoky violet
#

mojang production is default

#

there is no need to set it

sharp trellis
#

hi, what's the correct way of patching library files in a fork? when I modify CommandNode and run

./gradlew fixupMinecraftSourcePatches
./gradlew rebuildAllServerPatches
./gradlew applyAllPatches

I get a

Execution failed for task ':RoxyPaper:roxypaper-server:runRoxypaperSetup'.
> java.nio.file.FileAlreadyExistsException: /home/glicz/projs/RoxyPaper/roxypaper-server/.gradle/caches/paperweight/taskCache/runRoxypaperSetup/com/mojang/brigadier/tree/CommandNode.java

lucid mulch
#

I think you have to wait until the next paperweight release afaik it was fixed in the snapshot buikd

crude kernel
#

How does one properly update their userdev bundle

#

I've tried running with -U and cleaning the userdev cache but it hasn't helped

#

I've only had success with removing the dev bundle call, reloading and adding it back

tawny socket
#

Hi, anyone still looking at https://github.com/PaperMC/bibliothek ? I'm working on a simple CLI that lets you update your Paper server quicker, by interrogating what versions are available and offering to copy the .jar in the right place (and maybe create a systemd Unit file etc);
I'd like to know if there are any plans to also expose what plugins are available for download?
Would be a nice bonus to be able to download those using the same tool

GitHub

The PaperMC downloads API. Contribute to PaperMC/bibliothek development by creating an account on GitHub.

distant mango
#

use hangar or modrinth or spigots web ap

proud maple
#

bibliothek only serves as an api for downloads for paper projects, nothing more

#

hangar and modrinth both have apis that your tool can use to search and download plugins

tawny socket
proud maple
tawny socket
#

Most likely I'd start just offering to update ones that are already installed (I'll have to see if filename + maybe some metadata extracted from each jar/zip would be enough to id the plugins and their version in the API), maybe allow for search, maybe offer a list of the most popular later down the line (if I can request such a sort, and I'd paginate)

proud maple
#

if the plugin is installed through your tool in the first place you could store the id for it in some metadata file, but reading the plugin name from the plugin.yml would also get you quite far

feral wedge
#

What is this?

> Failed to notify project evaluation listener.
   > Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
   > Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

I'm encountering this after I added userdev to my gradle project and I can't seem to fix it. I have another plugin with the same gradle configuration and it works fine. I also tried searching for "paperweightDevelopmentBundle" but it appears nowhere inside any of my files

proud maple
#

what are your userdev and dev bundle versions

feral wedge
#

userdev 1.7.7 with 1.21.4 dev bundle

#

and gradle 8.12-bin

proud maple
#

try updating to 2.0.0-beta.14, the old versions won't work with the newer dev bundles

feral wedge
#

oh yeah that is working, thank you for helping me

hazy cradle
#

Hey, hoping someone might be able to help me out here.

io.papermc.paperweight.PaperweightException: Exception executing applyDevBundlePatches
Operation has non zero exit code: 1

I'm getting these as error outputs while trying to refresh my gradle. I've recently returned to MC development after about a years break and I'm trying to update old projects. I'm using userdev 2.0.0-beta.14 with 1.21.4 dev bundle and 8.12-bin gradle. I'm on Java 17.

static urchin
#

java 21 is required

hazy cradle
#

ah

#

Thank you kindly

pure beacon
#

does anyone know why Armor Stand Editor won't compile? I managed to compile Coreprotect from source successfully, but Armor Stand Editor is giving me issues. Here is the error message:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.2:install (default-install) on project armorstandeditor: Failed to install artifact io.github.rypofalem.armorstandeditor:armorstandeditor:jar:optional:1.21.4-48: C:\Users\USERNAME\Documents\modtemplates\ArmorStandEditorTEST\ArmorStandEditor\target\armorstandeditor.jar -> [Help 1]

proud maple
#

that error says nothing

#

the full log would help

pure beacon
#

i tried compiling through command prompt, and this is the only thing that shows

proud maple
#

you could also not run install if youre just trying to compile it

pure beacon
#

okay. should i open this in intellij and build artifacts instead?

proud maple
#

you basically never want to use build artifacts

#

always use a build tool like youre already doing

pure beacon
proud maple
#

build tool refers to maven and gradle

pure beacon
#

i should just use compile right?

proud maple
#

you want to use lifecycle -> package

#

or just mvn package from the command line

pure beacon
#

thanks!

iron drum
quiet tree
#

Hi, I'm trying to port a Purpur patch to a personal fork of Paper and after doing all changes and rebuilding patches, this is what I see in the "Push Commits" screen. I think I did something wrong but I'm not sure what 😅 Any ideas? (I pulled from upstream and updated the local branch before making any changes)

bronze willow
#

You only want to push to your repo and not java, atleast that was my issue

quiet tree
#

Alright, thanks. Will try to do that then. 🙂

#

I think I had this before, but it was over a month ago and I already forgot haha

bronze willow
#

so only pick your remote

#

or try via command line

quiet tree
#

Looks like it is working fine. Thank you. I'd still like to know what's happening and if I should be worried about these commits to resources and java.

bronze willow
#

I also dont get these ig its for the offical paper repo or smth

echo sapphire
#

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':ijDownloadSources60f5a351-844'.

Could not resolve all dependencies for configuration ':downloadSources_a137dceb-764f-4eb3-b5db-b886e1a2f196'.
Cannot resolve external dependency io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT because no repositories are defined.
Required by:
root project :

  • 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 3s

#

Could not determine the dependencies of task ':ijDownloadSources60f5a351-844'.

Could not resolve all dependencies for configuration ':downloadSources_a137dceb-764f-4eb3-b5db-b886e1a2f196'.
Cannot resolve external dependency io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT because no repositories are defined.
Required by:
root project :

Possible solution:

#

Can't download source please help

echo kilnBOT
static urchin
#

share your build.gradle.kts

echo sapphire
static urchin
#

im guessing make sure you are using a java 21 at best?
the pw plugin should be configuring the paper repo for you so uh

echo sapphire
#

yes I am using java 21

indigo rapids
#

hello! i want to use several versions at the same time in my plugin to support several versions, but this

dependencies {
    paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.21.4-R0.1-SNAPSHOT")
    paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.20.4-R0.1-SNAPSHOT")
    compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
}

just don't works, of course. how i can make it work?

lament scarab
#

Well, you can't have different versions of the same classes in the classpath

#

you'd need to setup a multimodule project and split off the different versions of paper there

lament scarab
#

the test plugin repo has an example of it

#

it's mostly just standard gradle with a small quirk of how you apply the paperweight plugin

#

(i.e. need to declare it in a parent module with apply false)

indigo rapids
#

ty

wide gorge
#

hello, i'm trying to use paperweight, but everytime i run runServer i get:

14:35:22: Executing 'runServer -Dcom.mojang.eula.agree=true'…

> Task :paperweightUserdevSetup UP-TO-DATE
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE

> Task :runServer
Located Paper 1.21.4 build 144 in local cache.
Starting Paper...

Starting org.bukkit.craftbukkit.Main
2025-02-09T13:35:23.940983400Z ServerMain WARN Advanced terminal features are not available in this environment
[14:35:24 INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.6+7-LTS; Eclipse Adoptium Temurin-21.0.6+7) on Windows 11 10.0 (amd64)
[14:35:24 INFO]: [bootstrap] Loading Paper 1.21.4-144-main@edacfdf (2025-02-09T10:56:49Z) for Minecraft 1.21.4
[14:35:24 INFO]: [PluginInitializerManager] Initializing plugins...
[14:35:24 INFO]: [PluginRemapper] Remapping plugin 'C:\Users\nicol\.gradle\caches\run-task-jars\plugins\paper\hangar\placeholderapi\2.11.6\placeholderapi-PAPER-2.11.6.jar'...
[14:35:25 INFO]: [PluginRemapper] Done remapping plugin 'C:\Users\nicol\.gradle\caches\run-task-jars\plugins\paper\hangar\placeholderapi\2.11.6\placeholderapi-PAPER-2.11.6.jar' in 526ms.
[14:35:25 INFO]: [PluginInitializerManager] Initialized 4 plugins
[14:35:25 INFO]: [PluginInitializerManager] Bukkit plugins (4):
 - FastAsyncWorldEdit (2.12.4-SNAPSHOT-1038;1fddb83), LuckPerms (5.4.153), PlaceholderAPI (2.11.6), PvPFighterPlugin (1.0)
[14:35:29 INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
#

i even added the flag eula true, but does not seem to change

#

My build.gradle is setup like this:

dependencies {
    testImplementation(platform("org.junit:junit-bom:5.10.0"))
    testImplementation("org.junit.jupiter:junit-jupiter")
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

java {
    toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

tasks {
    runServer {
        minecraftVersion("1.21.4")

        downloadPlugins {
            url("https://download.luckperms.net/1570/bukkit/loader/LuckPerms-Bukkit-5.4.153.jar")
            url("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/artifact/artifacts/FastAsyncWorldEdit-Paper-2.12.4-SNAPSHOT-1038.jar")
            hangar("placeholderapi", "2.11.6")
        }
    }

    build {
        paperweight.reobfArtifactConfiguration =
            io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
    }

    test {
        useJUnitPlatform()
    }
}
bronze ember
#

That doesn't have anything to do with paperweight?

#

Just edit the Eula file in the run folder, lol

#

The system prop prolly isn't passed to the paper process by run paper, you would have to configure it in that gradle plugin somehow

wide gorge
wide gorge
royal hawk
#

when gradle is building is there a way i can change the module that is exported in the build ? when i build, the jar only contains classes in the main module but the classes i need are in rediskript

zenith flower
#

all patches are applied as commits

lament scarab
royal hawk
#

i installed shadowjar as a plugin. i tested it out and an error tells me gradle is recognizing java 17 but my project is using java 21. is there a unique way im supposed to tell gradle im using java 21 and not java 17 ?

lament scarab
#

gradle has its own run config thing

#

there is also the toolchain config inside of your build config too

royal hawk
#

ok thank you. i just looked at the winrar of the jar and it looks to have everything i wanted. thanks for helping

tough pike
#

Do I have to remake my patches for the new system?

tough pike
#

oh, so there's probably no reason to be trying to update lol

main mica
#

the new system is like 100 times nicer to work with

#

absolutely worth it

#

and you don't have to manually write every line of code again.
What I did was take the old patch files and apply them with IntelliJs "Apply Patch" window, and then just rebuild patches with the new tooling

tough pike
main mica
#

you can also look e.g. Purpur or another fork that is already using it

#

and Papers contributing.md document is updated too, so for how to use it see there

tough pike
#

Okay, thanks

tough pike
#

How do I modify a Paper class in this?

#

Also the fork I'm forking should change it, but I don't seem to have that version?

main mica
#

theres a fork-of-a-fork example too, did you use that?

#

as a branch on the repo

tough pike
#

Yeah

tough pike
#

The fork is there and everything, but I can only see files it added and not its modifications to Paper files

#

Actually I do for the API but not for the server

main mica
#

I have never forked a fork, but that sounds like you didn't apply the patches from that?

tough pike
#

I ran applyAllPatches ¯_(ツ)_/¯

main mica
#

Theres way too many gradle tasks now kek
but if you run gradlew tasks it should give you a list of all of them. And it should say "apply <upstream fork name> patches" or similar on one of them. Try running that manually

tough pike
#

It really doesn't want to generate the paper-patches and fork-patches folders for the server

main mica
#

but do the changes from the fork show up in the end result (the files in <your fork name>-server?

tough pike
#

yeah I don't even have a fork-server folder with the other server and api folder thonk

#

I have fork-api

main mica
#

thats odd

#

probably best to wait for someone who made fork-of-a-fork before, no idea sorry

#

this is how it should look like with a direct fork of Paper

tough pike
#

huh, I don't have paper-api-generator lol

bronze willow
tough pike
#

And paper-api and paper-server are there

static urchin
#

That does not look pre hardfork

#

Pre hardfork you didn't have the paper dirs

bronze willow
#

but I don't have a generator

#

in post hard fork

static urchin
#

You need to register it yourself I'd guess

tough pike
#

The default example doesn't

static urchin
#

See the fork setup in your build file

bronze willow
#

Whats is that even?

static urchin
#

For how it does it for the API

bronze willow
#

Why do i need that

static urchin
#

You don't

#

Well, you may. But not really for a basic fork unless you are editing things in there

tough pike
#

Hey while you're here, do you have any idea why my fork-of-a-fork doesn't include paper and the fork server sources?

#

I have all of the API changes, but none of the server changes

#

I ran applyAllPatches after getting everything setup

#

Lynx, I mean

worn smelt
#

Is there a way to code custom dimensions to plugins?

narrow wigeon
#

Hey I'm having issues with the Purpur fork, they suggested I come here to ask, so right now I have:

> Could not resolve all files for configuration ':mache'.
   > Could not find mache-1.21.4+build.7.zip (io.papermc:mache:1.21.4+build.7).
     Searched in the following locations:
         https://repo.purpurmc.org/snapshots/io/papermc/mache/1.21.4+build.7/mache-1.21.4+build.7.zip

This is my build.gradle.kts: https://gist.github.com/Codingale/e57b5f6202b50329e746f977e2e266e5 (ignore the mess I've avoided touching the file if I can help it)

So right now it fails with that message if I try a version I saw another person build with (1.7.1) I get:
> Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
And searching that says to update the paperweight version.

Any ideas cause I'm way outta my knowledge. Thanks. Please leave mentions on or @ me.

lucid mulch
lucid mulch
#

and to the dev bundle too if u want

proud maple
lucid mulch
#

it was in the purpur discord so yea fair

lucid mulch
brisk belfry
#

purpur?

proud maple
#

use a paste site pls

brisk belfry
#

-# ah ok that has been communicated already

lucid mulch
proud maple
#

it's alright

#

while we're recommending improvements, you should also really use vault api 1.7.1

lucid mulch
#

@narrow wigeon i tried adding the paper maven repo as the first under repositories and it works for me

#

above the purpur one

#

try doing that

narrow wigeon
#

also thanks, I try not to touch the gradle stuff if it works I don't look at it again lol, my friend set it up and messed it up I think but that's all for now

smoky violet
#

gradle checks repos in declaration order, not random order

#

and if some repo has broken metadata for an artifact it won't search the next one for it

#

kind of disappointing that someone would be sending their users here when their repo is clearly the problemomegaroll

tough pike
#

Okay I'm very confused, how do I modify the build script in a new fork?

static urchin
#

you modify it and re-create the patch for it via the single file rebuilding tasks

tough pike
#

Okay

tough pike
#

I'm trying to setup a fork of a fork

woven light
lament scarab
#

update gradle and java

bronze willow
woven light
unique igloo
lament scarab
#

you're usig gradle 8.8 and have set it to require java 17

#

or, no, nvm the 17

unique igloo
static urchin
#

The system gradle version may not be the one used

#

Check the wrapper version in the project

lament scarab
#

your gradle wrapper is using 8.8

#

update the wrapper

shrewd crestBOT
#

(67ae1e7f6ed5010734cf1b6c) // @oblique heart (@smekker11 / 622512432149037057) has been banned by @lament scarab (126975485493248000)
Reason: Quick-banned for sending a message in #build-tooling-help

unique igloo
#

Ok ^^

pallid elbow
static urchin
pallid elbow
static urchin
#

no

#

just clean

pallid elbow
#

but you said cache you monster

static urchin
#

sad_cat the, the build cache 😦

pallid elbow
pallid elbow
static urchin
#

👍

faint hill
#

How do I rebuild the changes inside of fork-server/src/minecraft/java? I've ran git add ., git commit --amend (which commits them to the file patches, but then rebuildServerFilePatches doesn't seem to be updating the patch at all? It's an existing file patch that I need to modify

#

jk I figured it out, it's rebuildMinecraftFilePatches instead

woven light
#

does paperweight provide any way to start a server quickly for testing?

#

i meani think i saw a gradle task or smth for it, but i dont remember at all and ./gradlew tasks doesnt show any, so im wondering if thats a seperate thing

lucid mulch
#

you can use the ./gradlew runDev task

#

but they should all be listed there after applying patches

foggy knot
#

Hi, hoping someone might be able to help me out here. I am getting this error when trying to use applyAllPatches or gradle reload:

Patching tasks not present upstream for paperServer
errant sky
#

Hello, is it possible to use the paperweight version 2.0.0 for 1.20.4? Because I am currently updating my project, I need NMS 1.20.4, 1.20.6, 1.21, 1.21.1, 1.21.3, and 1.21.4. Unfortunately when I try to add the 1.20.4 it is impossible to compile the project

smoky violet
#

only the latest version of paperweight is supported

errant sky
#

So I’m forced to drop the 1.20.4 ? Pepecry because I tried to use both versions of paperweight but it doesn’t work

bronze ember
#

Current paperweight supports older dev bundles

static urchin
#

You should be able to use latest paperweight for 1.20.4 no?

#

Yea

errant sky
#

I tried, and it tells me that there is a conflict

#

so I have all my sub modules, I added 1.21.4 with the new paperweight, but if I leave others with version 1.7.5 its does not work

torn sonnet
#

You're describing what happens if you don't update them. But both mini and lynx said the latest paperweight works with them, so why not update them?

errant sky
#

I updated everything, the problem is that it does not work for 1.20.4

#

and if i used the old version of paperweight, i have this error

dusk quail
foggy knot
#

Hi, I am trying to fork a fork of Folia, I am getting this error when trying to rebuildAllServerPatches:

A problem was found with the configuration of task ':testfork-server:rebuildLuminolServerFilePatches' (type 'RebuildFilePatches').
  - Type 'io.papermc.paperweight.core.tasks.patching.RebuildFilePatches' property 'input' specifies directory '/home/adabugra/Projects/TestFork/luminol-server' which doesn't exist.
glass warren
bronze ember
#

Did you actually apply the patches first before trying to rebuild? Lol

smoky violet
smoky violet
#

you can only have one version of paper api on the classpath at a time (i.e. in each subproject)

#

and paper-mojangapi was merged into paper-api, so you can't have mismatched versions of those on the classpath either

#

if you follow the structure multi project test branch you won't run into either of those problems basically

errant sky
#

okay I’ll try it tomorrow, I don’t know very well gradle so I’m a little lost

foggy knot
#

I fixed that issue, but now when trying to use createMojmapPaperclipJar I am gettings this error:

/home/adabugra/Projects/TestFork/testfork-server/src/minecraft/java/io/papermc/paper/threadedregions/RegionizedServer.java:62: error: cannot find symbol
        new RegionizedServerInitEvent().callEvent();
            ^
  symbol:   class RegionizedServerInitEvent
  location: class RegionizedServer
bronze ember
#

Well that's a compiler error

#

Fix it

#

Maybe a missed import

foggy knot
bronze ember
#

I can try to help with tooling, I can't help with code I don't know anything about

#

Go search for it

barren grail
tough pike
lucid mulch
#

im curious as to the more technical differences between file patches and feature patches in the sense of for eg. which ones would be less-likely to conflict on upstream updates, can file patches be applied fuzzily and if so then how but i assume not and like the general main differences

#

cuz like from what ive seen file patches do not have the index nor some blobs (they have _,6 for eg) would that make it less likely to break on a change to that file or the opposite

static urchin
#

Feature patches are generally gonna be nicer for updating a lot

#

File patches can be applied fuzzy but when they break, they break hard

#

Where feature patches allow for a 3way merge and also can be nicer handled with git in case things change

#

I am honestly surprised purpur ended up using per file patches, maybe you can ask there how they been using them/how painful they were

lucid mulch
#

oh i see, i thought that they’d be less likely to break lol

#

thanks for the quick response!

echo sapphire
#

what this error

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':common:common-paper'.

class io.papermc.paperweight.userdev.internal.setup.UserdevSetup$Inject cannot be cast to class io.papermc.paperweight.userdev.internal.setup.UserdevSetup (io.papermc.paperweight.userdev.internal.setup.UserdevSetup$Inject is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @11c3648e; io.papermc.paperweight.userdev.internal.setup.UserdevSetup is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @dafbd68)

  • Try:
echo sapphire
pallid karma
#

how do I install paper dev bundle ?

#

It told me that I'm mising io.papermc.paper:dev-bundle

main mica
pallid karma
#

yes but I already included it it in

main mica
#

did you add the bundle to your dependencies too?

pallid karma
#
> Could not resolve all files for configuration ':paperweightDevelopmentBundle'.
    Unable to resolve a dev bundle, which is required for paperweight to function.
> Could not resolve io.papermc.paper:dev-bundle:1.21.4.
     Required by:
         root project :
> Could not resolve io.papermc.paper:dev-bundle:1.21.4.
> Could not get resource 'https://jitpack.io/io/papermc/paper/dev-bundle/1.21.4/dev-bundle-1.21.4.pom'.
> Could not GET 'https://jitpack.io/io/papermc/paper/dev-bundle/1.21.4/dev-bundle-1.21.4.pom'. Received status code 401 from server: Unauthorized

* Try:
> 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).
> Run with --scan to get full insights.```
#

oh wait

main mica
#

that looks like the wrong repo, it should look it up in repo.papermc.io. Maybe you didn't add the Paper repo?

pallid karma
#

I forgot this paperweight.paperDevBundle('1.21.4-R0.1-SNAPSHOT')

#

-R0.1-SNAPSHOT

#

I'm dump sorry

#

and thank you

dense spindle
#

i tried forking Mache for the client but when i publish it to maven local it says the pom file is invalid?
me and @sharp trellis have the same issue

ss on the left is glicz and the one on the right is mine

static urchin
#

pretty sure sculptor just does not define how to create a client output

dense spindle
boreal dew
#

Is there any guide on how to upgrade to the new fork format with paperweight?

brisk belfry
#

-# nvm it links to the correct message.

#

maybe this can help you owen ^^

main mica
#

I went with Minis recommendation there, was pretty easy to do with IJ's "apply patch" thingy

woeful gate
#

I am not able to add userdev version 2.0.0-beta.8, I mean I tried updating gradle but probably not the right way, how should I update gradle?

static urchin
#

2.0.0-beta.14 iirc is the latest

#

but yea, updating gradle is required

#

To upgrade, you usually just run ./gradlew wrapper --gradle-version=8.12.1 twice

#

do that before updating to new paperweight tho

woeful gate
#

oh twice? 😄

static urchin
#

it is a bit ass KEKW

woeful gate
woeful gate
#

I just oversaw how to upgrade it in gradle docs (it was right on top)

#

Seems that running ./gradlew wrapper --gradle-version 8.12.1 once was enough, thank you again!

static urchin
#

Well the second run iirc updates the wrapper

#

the first one bumps the version number in the wrapper properties (or something) could be completely wrong

crude kernel
#

you only have to run it once

#

it updates the props and the wrapper itself

dense spindle
static urchin
#

no

#

I think mini answered you on that

#

the sculptor plugin was not designed for that

dense spindle
#

well oof

stuck rivet
#
-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
java.lang.RuntimeException: java.lang.IllegalArgumentException: Directory 'plugins/.paper-remapped/custom-items-1.0-SNAPSHOT.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
    at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:86) ~[paper-1.21.1.jar:1.21.1-110-6d7a438]
    at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:52) ~[paper-1.21.1.jar:1.21.1-110-6d7a438]
    at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:17) ~[paper-1.21.1.jar:1.21.1-110-6d7a438]
    at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:15) ~[paper-1.21.1.jar:1.21.1-110-6d7a438]
    at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:113) ~[paper-1.21.1.jar:1.21.1-110-6d7a438]
    at net.minecraft.server.Main.main(Main.java:123) ~[paper-1.21.1.jar:1.21.1-110-6d7a438]
    at io.papermc.paper.PaperBootstrap.boot(PaperBootstrap.java:21) ~[paper-1.21.1.jar:1.21.1-110-6d7a438]
    at org.bukkit.craftbukkit.Main.main(Main.java:281) ~[paper-1.21.1.jar:1.21.1-110-6d7a438]
    at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IllegalArgumentException: Directory 'plugins/.paper-remapped/custom-items-1.0-SNAPSHOT.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
    ... 10 more
#

yml file is existing, also linked as resource in pom

torn sonnet
#

Are you building with maven or using the IDE's build

stuck rivet
#

using build from IDE

torn sonnet
#

Try building using maven itself.

stuck rivet
#

you know the cmd by any chance?

torn sonnet
#

mvn clean package is what you want.

stuck rivet
#

wait I gotta install maven

#

IntelliJ uses its own one

torn sonnet
#

What happens if you try running it from the IDE, like hit ctrl twice and then type it in there

brave widgetBOT
torn sonnet
stuck rivet
#

yeah

torn sonnet
#

JAR will be empty - no content was marked for inclusion!
🤔

#

Share your pom.xml

stuck rivet
torn sonnet
#

Share the whole thing.

brave widgetBOT
torn sonnet
#

I meant the whole log from the failed build.

#

but taht's enough

#

See those last lines at the bottom of what you pasted?

stuck rivet
brave widgetBOT
severe pulsar
#

Hey, I followed paperweight-examples @ v2-fork trying to set up my own paper fork of 1.21.4, but I can't seem to get the patches in fork-api to work. There is no src directory and its not a git repository (can't really commit my patches), and when running various (basically all) rebuild<...> tasks, no patch for the given ForkFile.java is being created

smoky violet
#

it literally says so on the docs

#

running the task with a version (different to current runtime) passed will set the properties and then running it again with that version of gradle will update the wrapper itself based on whats shipped with the now running version

crude kernel
#

i've only ever had to run it once to fully update

smoky violet
#

if you've only ever run it once to update then you probably did not fully update it

#

it might seem like it's working since the jar file gets changed sometimes, but that means if you start at v1 then update to v2, the wrapper will still be from v1 until you update to v3, at which point it'll update to v2's wrapper

#

assuming those three example versions actually change the wrapper

crude kernel
#

I mean that's how I fixed my PW 2.0.0 gradle version requirement

8.10.2+ required
gradlew wrapper --gradle-version 8.12.1
works

lament scarab
#

iirc you basically need to run the thing twice

#

first one will update the values and such, the second one will actually get it to pull stuff

#

if you've not been doing it properly, then your wrapper jar will be outdated

crude kernel
#

it did have changes when I committed

lament scarab
#

to the jar or just the properties file?

crude kernel
#

both

lament scarab
lucid carbon
#

how can i use paperweight-userdev using maven?

lament scarab
#

you can't

lucid carbon
#

why?

lament scarab
#

There was an alt community maintained maven plugin out there

#

Because paperweight is a gradle plugin

lucid carbon
#

hmm i see

#

is there any way to convert a maven plugin to gradle?

lament scarab
#

if you mean your project, you can init a gradle project inside of the folder and it will prompt you to migrate it

lucid carbon
#

okay alright, thanks

#

Is there an documentation how to add paperweight-userdev?

echo kilnBOT
lucid carbon
#

If i do it it just print errors

main mica
#

make sure your gradle is up-to-date

#

and if thats not it, post the error log please

hollow condor
#

I have this error: https://pastes.dev/IAOLaggXnR

I have this custom fork, based on the v2-fork branch in paperweight-examples. I want to modify the build.gradle.kts. Here's what I already did:

  • I ran applyServerFilePatches, and fixed the error with the server build.gradle.kts implementing the incorrect project (e.g. fork-api).
  • Then I tried running fixupServerFilePatches (or fixupPaperServerFilePatches), but got this error
  • I subsequently also tried to add the files to git, and then running fixupServerFilePatches, but still got the error.
lament scarab
#

build.gradle.kts is not a file patch in the tree, it's a single external file

#

you'd use the task specific to that iirc

hollow condor
lament scarab
#

I mean, I can't provide support for random softwares docs

#

There should be a task for the single file patch

tardy quartz
#

I'm learning how to code plugins, and was pretty successful using maven, seems simpler.
But I saw that gradle is more recommended, but I can't get the plugin to work since "Directory 'plugins\.paper-remapped\helloplayer_gradle.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!"
Even though I checked countless times and the plugin.yml is there.

To set up the environment, I'm using IntelliJ Idea and Minecraft development plugin, which should've set all the files automatically.

#

And when I open the jar with 7z, there's only a single file here: D:\Server Tests\plugins\helloplayer_gradle.jar\me\eltodofull\helloplayer_gradle\Helloplayer_gradle.class

smoky violet
#

show your projects expanded file tree in intellij

#

(resources go in src/main/resources)

smoky violet
#

are you building with gradle

#

i.e. .\gradlew.bat build

tardy quartz
smoky violet
#

im not sure thats doing the same thing

#

you can go into tasks in that menu on the right

#

and run the build task

#

if you don't want to use the terminal

#

but intellij is notorious for hiding errors when running gradle

tardy quartz
smoky violet
#

yeah you don't want that

#

do what I said instead and get the jar from build/libs

tardy quartz
#

Beautiful, finally it worked

#

tysm!

silk edge
#

I want a Minecraft server programmer

rapid fractal
abstract juniper
main mica
#

the patch command changed to applyAllPatches, and reobf jars haven't really be something published since 1.20.5, use the mojang-mapped tasks instead

vital terrace
#

So I’m recieving this error:

/Users/***/Desktop/reforging/src/main/java/org/plugin/reforging/reforging.java:[10,28] cannot find symbol
symbol: class InventoryType
location: package org.bukkit.inventory

#

-# My Imports:

#

package org.plugin.reforging;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

#

-# Dependecy:

#

dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

#

Based off the error its most likely something in the pom.xml or an issue in the import section

bronze ember
#

Hat seems like you are pulling in two paper API versions, share your full pom

gray sparrow
#

Hello, i'm trying to switch to Mojang mappings with a plugin that uses shadowJar.
Here is the relevant part of my build.gradle.kts file :

tasks {
    assemble {
        dependsOn(reobfJar)
        //paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
    }

    compileJava {
        options.encoding = Charsets.UTF_8.name()
        options.release.set(21)
    }
    javadoc {
        options.encoding = Charsets.UTF_8.name()
    }
    processResources {
        filteringCharset = Charsets.UTF_8.name()
    }

    shadowJar {
        dependencies {
            include(dependency("org.reflections:reflections:0.10.2"))
            include(dependency("org.javassist:javassist"))
        }
    }
}

My issue is that when I use paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION , the shadowed dependencies are not included. However, when using dependsOn(reobfJar) , those dependencies are included.
Did I do something wrong ?

lament scarab
#

Because your build process is depending on reobfJar?

#

if you want the shaded artifacts in you'd want to depend on the shadowJar task

gray sparrow
#

OK, thanks for your help !
I changed the assemble section to :

    assemble {
        dependsOn(shadowJar)
        paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
    }

And now it works fine 🙂

meager hemlock
#

build.gradle.kts because i use userdev

novel knoll
#

not familiar with ebean but you probably want ebean-test to be testImplementation instead?

meager hemlock
#

damn

#

how many iq do you have

#

to be that fast it must be over 200

#

thank you it did generate the migration

torn sonnet
#

@vital terrace don't crosspost, thanks.

vital terrace
torn sonnet
#

Because I can't think of any other way you'd be pointing at org.bukkit.inventory.InventoryType which doesn't exist. 🤔

vital terrace
echo kilnBOT
#
:exclamation: ChatGPT is not a replacement for learning a language

When you seek community support, we expect you to have a basic understanding of Java and to have already invested a certain level of effort in troubleshooting issues before asking for help here. The community volunteers are not here to review your ChatGPT-generated code nor to spoon-feed you solutions.

Please note that ChatGPT is not an ideal tool to answer questions.

torn sonnet
#

We have no interest in debugging AI-generated code. Please do not waste our time in the future if you do not wish to learn how to code.

#

Your issue is that you need to import InventoryType properly, pointing at its package. You can find this using your IDE's completion tools or by looking at our javadocs.

vital terrace
#

this isnt the orignal code though, I asked AI to troubleshoot why it wasn't working and it said to add this, sorry :>

torn sonnet
#

Same comment applies about us not wanting to waste time on AI-hallucinated bullshit (bullshit is the technical term for what AI generates a lot of the time)

wintry skiff
#

Hi,
I'm trying to build a server(forky) with paperweight-patcher hardfork and I found some exceptions:

I followed the guide in paperweight-example but some of the source codes in upstream is not copied into my project, so I can not build the server jar.

Here's part of my build.gradle.kts for server:
https://pastebin.com/wgZVcUyv

If u need more info, please notice me, thank you!

vital terrace
lucid carbon
#

i got this error but idk why: ```Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

#
    id("java")
    id 'io.papermc.paperweight.userdev' version '1.5.12'
}

repositories {
    mavenCentral()
    maven {
        url = "https://repo.papermc.io/repository/maven-public/"
    }
}



dependencies {
    implementation("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
    paperweightDevelopmentBundle("io.papermc.paper:dev-bundle:1.21.4-R0.1-SNAPSHOT")
}


tasks.jar {
    manifest {
        attributes["paperweight-mappings-namespace"] = "mojang"
    }
}
static urchin
#

update g radle to 8.12.1

#

then update paperweight userdev to latest

#

(in that order, otherwise you are not gonna have fun)

smoky violet
#

you should not be manually configuring the mappings manifest attribute when using paperweight

#

if you don't know exactly what you are doing it's likely to break things, the proper value will be set by default

fading vapor
lucid carbon
#

?

#

How should I get access then?

fading vapor
lucid carbon
#

Hmm I see

fading vapor
#

the dev bundle contains both

finite crypt
#

If a task of a plugin gets invalidated (I mean when it's not UP-TO-DATE) when I change a project property does it mean that the developer of the plugin has handled it or is it default behavior?

lament scarab
#

Gradle generally considers properties to be a task input, iirc

#

I believe that gradle requires that you define your incoming properties to be able to detect that kinda thing

deft tangle
#

Is there an "easy" way to update rejected file patches when updating paper on my fork?

finite crypt
#

k thanks, happen to know how to exclude java file generated from proto?

tough pike
#

How exactly does createMojmapPaperclipJar keep running out of memory with Xmx set to 8G

bronze ember
#

I think it uses a forked jvm so your settings might not apply

#

Can't check rn, but maybe we have a property to override it

tough pike
#

I thought that had to be in the actual Java installation

bronze ember
#

We fork new processes so you don't need to give the Gradle daemon more ram

tough pike
#

oh

wintry skiff
# tough pike How exactly does `createMojmapPaperclipJar` keep running out of memory with Xmx ...

There should be some bugs here, My project can't completely clone the upstream project https://github.com/PaperMC/paperweight-examples/issues/30

GitHub

Hi, I'm trying to build a forky server with paperweight-patcher hardfork and I found some exceptions (I've already send this message to the #build-tooling-help in the discord but it's n...

tough pike
#

forky doesn't work out of the box with a fork of Paper after just changing some directories and the main build script

#

mostly the active fork stuff and adding certain source sets

wintry skiff
#

Wow tysm

#

I’ll try it this weekend

tough pike
#

Yeah

#

applyAllPatches works fine, it just runs out of memory when it tries to compile

wintry skiff
#

I have same condition when I clone the upstreams repo by hand lol

tough pike
#

why does Gale have a go mod file thonk

static urchin
#

github hack to pretend it uses other projects as dependencies

tough pike
#

huh

static urchin
#

its just useless advertisement

tough pike
#

oh

#

Advertisement for Minecraft server software that's just a fork of forks and mods is wild

static urchin
#

For a while, github would basically show a list of projects that "depend" on your project

#

so gale smacks their collection of upstreams/whatever into a go file and, bam, gale server link on papers github repo page

tough pike
#
> Task :zirkonium-server:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':zirkonium-server:compileJava'.
> Java heap space
#

yeah

#

fun

tough pike
#

Xmx doesn't seem to do anything

#

Yeah, allocated 8G and it's not even using as much as IDEA is, so definitely what MiniDigger said

bronze ember
#

I think we have a property somewhere

#

But it's strange that you run into issues

lucid carbon
#

Hallo, ich habe folgenden Fehler erhalten: https://hastebin.de/tifexeqiwa.rust während ich versucht habe mein Projekt mit Gradle zu reloaden.

    id 'java'
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
}

group = 'org.example'
version = '1.0-SNAPSHOT'

dependencies {
    // Other Dependencies
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

test {
    useJUnitPlatform()
}```
bronze ember
#

Please keep stuff to English

lucid carbon
#

oh sorry

lucid carbon
bronze ember
#

And it kinda tells you what's wrong, you need to update Gradle

lucid carbon
#

which version do i need?

tough pike
#

🗿

bronze ember
#

It also tells you that, 8.12

#

I wish Gradle would add a "suggested fixes" section to that giant error...

tough pike
bronze ember
#

Idk why they show what is essentially debug info instead of just telling you what to do

tough pike
#

I think Rust is still the only language I've seen that actually suggests fixes

bronze ember
#

JavaScript has it via linters

tough pike
#

Not built into the compiler though

bronze ember
#

JS has no compiler ^^

tough pike
#

well technically

bronze ember
#

And you will not find more lenient parsers than stuff in browsers

tough pike
#

yeah I forgot it wasn't compiled and shipped 🗿

bronze ember
#

Your html can be horribly broken and the browser will still try very hard to render something that comes close to your intent, it's amazing

bronze ember
#

Anyways, off topic, lol

tough pike
#

yeah

lucid carbon
#

All right, I have now updated it to 8.12, let it go and it works as far, but I still have no NMS

wintry skiff
lucid carbon
#

sure

#
    id 'java'
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
}

group = 'net.sabermc'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    testImplementation platform('org.junit:junit-bom:5.10.0')
    testImplementation 'org.junit.jupiter:junit-jupiter'
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

test {
    useJUnitPlatform()
}```
static urchin
#

looks good

#

tho a bit weird, is that a kotlin or groovy file omegaroll

lucid carbon
#

groovy

static urchin
lucid carbon
#

im not familiar with kotlin

wintry skiff
#

have u try reload gradle project?

static urchin
#

the definitions are for kotlin

woven light
tough pike
bronze ember
#

If you search for the task name, you will find where it's registered and the class name of the task, then you can jump to that task and look at the properties/inputs it supports

tough pike
#

Oh

#

Okay

#

I wish GitHub weren't completely hopeless at searching through Kotlin sources

#

Okay so it looks like it's just jvmargs

#

or not

#
@get:Internal
abstract val jvmargs: ListProperty<String>
#

Would this just be jvmargs or the old org.gradle.jvmargs

tough pike
#

oh I think this is it

#
options.forkOptions.memoryMaximumSize = "6G"
#

in JavaCompile tasks

#

yep, that appears to have allowed it to use more

#

finally

warm zinc
#
A problem occurred configuring root project 'RPG'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.14.
     Required by:
         root project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.14
      > No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.14 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')
#

I seem to have issues w paperweight

#

am using Gradle v 8.10 w java 21, project java is set to 21 as well

#
plugins {
    kotlin("jvm") version "2.1.10"
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
}

group = "gg.aquatic.rpg"
version = "1.0.0"

repositories {
    maven {
        name = "papermc"
        url = uri("https://repo.papermc.io/repository/maven-public/")
    }
    mavenCentral()
}

dependencies {
    //paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

kotlin {
    jvmToolchain(21)
}
#

this is my build gradle

#

(error shows while reloading gradle project)

#

^ solved, had to update gradle to 8.12

crude kernel
#

oh lol didn't see

minor stratus
#

Hey, I'm trying to use paperweight userdev.
but I keep getting this error:
Expected configuration ':NMS:v1_21_4:paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

smoky violet
#

use latest gradle and paperweight

spark chasm
#

Hi there! I'm trying to use paperweight gradle plugin, but using 2.0.0-beta.14 cannot be found ("Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.14")

I am able to specify 1.5.11 tho, but it fails on building saying something weird:

Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
paperweight.paperDevBundle('1.21.4-R0.1-SNAPSHOT')
static urchin
#

do you have more of a log file?

echo kilnBOT
static urchin
#

paste the output of just, I guess ./gradlew build

#

presumably it cannot resolve that because your gradle version is too low

spark chasm
#

Here's my build.gradle:

plugins {
    id 'java'
    id 'io.papermc.paperweight.userdev' version '2.0.0-beta.14'
}

group = 'net.itsthesky'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    maven {
        name = "papermc-repo"
        url = "https://repo.papermc.io/repository/maven-public/"
    }
    maven {
        name = "sonatype"
        url = "https://oss.sonatype.org/content/groups/public/"
    }
}

dependencies {
    paperweight.paperDevBundle('1.21.4-R0.1-SNAPSHOT')
}

java {
    toolchain.languageVersion = JavaLanguageVersion.of(21)
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'

    if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
        options.release.set(targetJavaVersion)
    }
}

tasks.assemble {
    dependsOn(tasks.reobfJar)
}

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('plugin.yml') {
        expand props
    }
}
static urchin
#

Yea

#

you need gradle 8.12

#

remove paperweight as a plugin for now

#

upgrade the gradle wrapper to 8.12

#

and add it again

spark chasm
#

Gotcha I'll do that

#

Yay it worked like a charm, thanks for the help love_rainbow

cunning folio
#

I'm having some issues setting the output to be mojang mapped using userdev. I'm not using the Kotlin DSL, but the Groovy one, so I converted the
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
to

paperweight {
    reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
}

however, when gradle syncing, theres an error:
'Unable to resolve a dev bundle, which is required for paperweight to function.'
I have a dependencies block under it, with paperweightDevelopmentBundle 'io.papermc.paper:dev-bundle:1.21.4-R0.1-SNAPSHOT' in it:
https://pastebin.com/z3Wvr6ZF
Anyone know what I'm doing wrong?

lucid mulch
#

i would suggest you take a look at the example plugin since you have not only declared the dev bundle wrongly
you should use the paperweight.paperDevBundle and you have redundantly declared a dependency on paper api which is already provided by the dev bundle

cunning folio
#

yes, however that is using the Kotlin DSL, so paperweight.paperDevBundle won't work with the groovy dsl, which is why I'm using paperweightDevelopmentBundle with the other syntax, since that was in the example plugin before it got removed (?)

cunning folio
#

okay nevermind, seems like I just insisted paperweight.paperDevBundle wouldn't work with groovy, but it does and I missed the If you are using Gradle with the Groovy DSL, you should instead access the fields via static methods like getMOJANG_PRODUCTION(). notice

#

Is there an easy way to verify that a plugin is mojang mapped? I have the reobfArtifactConfiguration set to mojang mapped (see above), and the reobfJar task isn't ran, yet the plugin still gets remapped on the server

cunning folio
#

nevermind- was using the wrong file

cobalt lotus
#

I'm not sure if this is the right place to ask, but what is the proper way to manually apply a patch to my own fork from another fork? I'm working on creating a fork for a server I manage that includes patches we'd like from multiple other forks we've considered using, and just dropping in the patch files doesn't work due to bad hashes or slight differences. Is there a way to fix this within git, or do I have to apply these changes manually and rebuild the patches as if I'd written them?

smoky violet
#

you can add the repo with the patch applied as a remote to the target repo and fetch to bring in objects for a 3 way merge

#

for example add upstream-server/src/minecraft/java as a remote to my-server/src/minecraft/java and fetch before trying to apply a patch from upstream-server

#

if that doesn't work then you need to apply it using some manual method

tough pike
#

Okay this is more of a GitHub runs problem, but I just don't have any idea what's happening

#

Somehow after everything for createMojmapPaperclipJar other than the actual createMojmapPaperclipJar runs, the jar doesn't actually exist

#
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':zirkonium-server:createMojmapPaperclipJar'.
> java.nio.file.NoSuchFileException: /home/runner/work/Zirkonium/Zirkonium/zirkonium-server/build/libs/Zirkonium-paperclip-1.21.4-R0.1-SNAPSHOT-mojmap.jar
> Task :zirkonium-server:createMojmapPaperclipJar FAILED
[Incubating] Problems report is available at: file:///home/runner/work/Zirkonium/Zirkonium/build/reports/problems/problems-report.html
* Try:
> 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.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':zirkonium-server:createMojmapPaperclipJar'.
#

The jar exists when I run the same task on my machine, in the same place other than the obvious difference of mine being under my project folder and GitHub having it under /home/runner/work/repoName/repoName/

lament scarab
#

I mean, outside of making sure that you applied patches, as well as things like file casing, we have no idea what you did or have done

tough pike
smoky violet
#

you probably have some sort of invalid configuration that is masked by case insensitivity of your local fs

tough pike
#

Guess I should try it on WSL

tough pike
#

Well I found the problem

tough pike
#

Okay confused about something again, how in the world do I replace the Paper logo?

#

Because right now I don't have a logo file where paperweight wants it and it seems to be ignoring all new feature patches I make because of it

#

I make my changes in fork-sever/src/minecraft/java, add them to git, them commit them and run rebuildServerFeaturePatches and the patch is never created and sources added are removed

static urchin
#

that is the wrong folder

tough pike
#

what

static urchin
#

fork-server is for your own new files

#

you are changing a paper file

tough pike
#

Yes

#

I'm saying I can't do that, and it seems like the missing icon is the problem because paperweight complains about not being able to find one every time I try to create the patch

#
> Task :zirkonium-server:rebuildPaperServerFilePatches
[ERROR] Failed to read file: src/main/resources/logo.png
Rebuilt 0 patches
static urchin
#

Guess paperweight doesn't support that then

#

like, patches for upstream resources

#

tho uh a bit weird

#

Wait

#

omg, you are doing it via file patches KEKW

#

@tough pike I don't think binary diff is allowed in source patches KEKW

#

you'll need to make that a feature patch

tough pike
#
$ ./gradlew rebuildServerFeaturePatches
Reusing configuration cache.

> Task :zirkonium-server:rebuildGaleServerFilePatches
Rebuilt 0 patches

> Task :zirkonium-server:rebuildLeafServerFilePatches
Rebuilt 0 patches

> Task :zirkonium-server:rebuildGaleServerFeaturePatches
Formatting patches for gale-server...

> Task :zirkonium-server:rebuildLeafServerFeaturePatches
Formatting patches for leaf-server...

> Task :zirkonium-server:rebuildPaperServerFilePatches
[ERROR] Failed to read file: src/main/resources/logo.png
Rebuilt 0 patches

> Task :zirkonium-server:rebuildPaperServerFeaturePatches
Formatting patches for paper-server...
static urchin
#

that error just looks like you merged a change to logo.png into the file commit

tough pike
#

Yeah except that was when I hadn't touched logo.png or tried to add it

static urchin
#

can you just ensure that, on a clean setup, e.g. after applyAllPatches

#

you can modify the logo.png in paper-server/src/main/resources

#

commit it as its own commit into a feature commit

#

and then rebuild

#

I'd like to avoid having to pull the examples repo to test this

tough pike
#

Okay so for whatever reason I'm still getting failed to read file for the logo

#

but I now have a paper-server patch under fork server and it has the binary diff for the logo

#

Is the resolution limit perhaps under 512x512?

#

The logo is there now and overwriting the other one, but paperweight still complains about not being able to open it

smoky violet
#

if you need proof just look at folia

static urchin
#

Figured omegaroll

smoky violet
#

I wouldn't bother patching the logo file, just add your own logo as source and adjust the file path where it's referenced

#

I told leaf to do that but he wanted to have a massive binary diff in the patch still for fun

static urchin
#

Otherwise, how are you going to rebuild a patch every other day to look busy smart

tough pike
static urchin
#

Well you cannot name it logo.png I don't think

#

that would clash

#

but yea, just, fork-logo.png or something and then update the place in the server that reads the logo

tough pike
#

Okay

#

What about this paperweight complaint anytime rebuildPaperServerFilePatches runs lol

static urchin
#

idk, clean your project probably?

#

maybe some outdated something somewhere

tough pike
#

Also how do I undo the logo file change now lol

#

We'll just pasting the original file in undo it?

static urchin
#

just apply patches again?

#

it should reset that file

#

or drop the patch if you already created a patch

tough pike
static urchin
#

Well then do that

lucid mulch
#

Hi i'm new to access transformers and i'm trying to modify this field to be public final instead of private final
does anyone have any idea how i could achieve that? i tried multiple ways but i can't quite get it to work

private final ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<net.minecraft.world.entity.Entity> entities = new ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<>(); // Paper - rewrite chunk system
#

i even tried wildcard ats but to no avail

lucid mulch
#

i already read it but the logs say that it couldn't find the target field everytime

#

im dumb at these ats lol

tough pike
#

I was going to say you might also not be able to modify the visibility or finality of non-vanilla things with it

lucid mulch
#

well this class is in the minecraft package it's just the field type is from moonrise

tough pike
#

Yes that's my point, it was added later and isn't from vanilla

#

The AT is likely applied before it even exists

lucid mulch
#

oh yeah that would make sense paperOhhh

tough pike
#

Just change it to public in the patch and add a comment

lucid mulch
#

got it thx

robust arrow
#

How to build paperclipdeobf.jar? from paperclip.jar file

tough pike
#

huh?

#

Why would you want a deobf jar

robust arrow
#

The paperweight documentation is out of date, all commands seem to have been changed

#

in examples at github

tough pike
#

What are you trying to do? Build from source?

rapid fractal
robust arrow
#

Yeah

tough pike
#

yeah still why would you want a deobf jar

#

that's basically useless assuming you intend to run a server with the jar

bright agate
#

if you just type in paperclip itll tell you what options there are

bright agate
#

apparently 😂

tough pike
#

or like

robust arrow
#

This is very difficult for me, I'm starting to build plugins for Folia, and I'm not used to Intellij

#

XD

tough pike
#

So you're trying to develop a plugin for Folia, not get a paperclip jar?

robust arrow
#

Yes, I need to access the bukkit API that the paper provides, as a coupling to craftbukkit is used within paperclip

tough pike
#

All you you should have to do for Folia using that is uncomment the Folia dev bundle and remove the normal dev bundle, then run the build task when you're done with your plugin. There are also runServer tasks for testing in IDEA. Use of userdev hasn't changed afaik, only patcher.

robust arrow
#

This information is worth gold, thank you very much

tough pike
#

well crap

#

somehow while trying to remove the icon change I managed to split my feature patch into file patches

#

Now how do I drop those patches

#

Wait, better idea, the icon is gone now because I can just drop that commit. Is there some way that I can turn the file patches into a feature patch?

robust arrow
#

I thought I would have to clone the paperweight project to run such commands through tasks

pallid elbow
#

When I get this updating from upstream, how do I actually fix it?

proud maple
#

the steps that I took to fix it:

  1. cry
  2. apply each hunk manually
bronze ember
#
  1. PR a git mode to diffpatch
pallid elbow
#

what's the stage that rebuilds that fork-server build.gradle.kts.patch?

tough pike
#

So if you're just forking Paper then it's just rebuildPaperSingleFilePatches, but if you forked something else on top of Paper, Purpur for example, rebuildPurpurSingleFilePatches

#

It's always the highest fork (excluding the one being worked on) that you rebuild for that

barren grail
#

Using jpenillas run-task gradle plugin, how can I specify where to get the jar from (multi project setup, need to get the final shaded jar instead of just the paper code)

static urchin
barren grail
#

disablePluginJarDetection doesn't exist :cri:

static urchin
#

thats on the extension

#

not the task

#
runPaper {
    disablePluginJarDetection()
}
barren grail
#

ah

#

thanks

#

nope it still loads the jar from itself, not the root

smoky violet
#

I keep telling people to read the task list :p

cobalt lotus
#

Are forks of forks of forks of paper possible with paperweight? I’m trying to get my fork to build with no patches, and I run into “out of memory: Java heap space” even with 32g of ram and the correct Jvm Args set to use it. I’m starting to think my configuration is incorrect since I’ve just been testing what I think will work, since there isn’t an example for this in paperweight-examples. I’m able to compile the upstream fork just fine, so I’m thinking I must be writing my build script wrong. Is this even something that paperweight supports?

bronze ember
#

Forks of forks are supported, the paperweight examples repo has a branch

#

Jvm args to Gradle might not do what you expect since some processed are forked into their own jvm so they can use more ram without people needing to give their Gradle daemon more ram

cobalt lotus
bronze ember
#

3 deep sounds like actual pain

#

2 deep was already pain to test

#

No clue if somebody actually tested that, but the system is designed to handle it at least

#

There was a guy in here couple days ago with an oom too, he figured out how to configure the tasks to use more memory, try searching

cobalt lotus
#

Thanks

tough pike
#

Paper -> Gale -> Leaf -> My fork

#

It was mostly just figuring out fork registration in the fork-server buildscript though, other than the memory thing

cobalt lotus
#

I just checked your repo, looks like I did write my script right, just didn’t allocate enough memory

#

Thanks for dealing with this problem before me so I don’t have to go through the pain again lol…

tough pike
#

lol np

smoky violet
#

all you need is options.isFork = true

#

the default memory for a forked jvm is fine, just you need to fork since the gradle jvm doesn't have enough spare

#

we added that to paper a while back, missed it in the fork example

#

or no

tough pike
#

I already had that and it was still running out of memory

smoky violet
#

it is there

#

if it's missing then it's because it wasn't in the v1 example

#

fair enough, 6g is still too much

#

1g should be good

tough pike
#

Isn't 1G what it defaults to?

smoky violet
#

I think its 512

#

if it starts at 1 then go to 1.5

#

etc

tough pike
#

huh

#

Apparently 1G is enough

#

Assuming it doesn't OOM while trying to make the paperclipjar

#

yeah there, huh

#

That also seemed faster than before

#

🗿

lucid mulch
#

ik im a bit late

gusty mantle
#

why does it keep creating these files instead of actual file patches

#

i'm literally stuck

#

it adds every change to these files

#

instead to do it per actual server file patch

#

and it still keeps adding the changes to 0004

gusty mantle
#

i will try to fix it by removing the minecraft-patches/sources and applying that big patch file without interfering with the repository

#

and temporarily moving the feature patches to another dir

#

as the big file seems to contain all the per file changes

#

yeah it worked

gusty mantle
#

and don't have any patch for logo

tough pike
#

You can ignore it

gusty mantle
#

this is the only file with logo.png

#

and i have no patches for it

#

nor for the logo

tough pike
#

You can ignore it

gusty mantle
#

yeah i see

tough pike
#

It's complaining that there isn't a logo.png there under your server

#

It isn't required

gusty mantle
#

ignoring it for about a week now

#

just wanted to know if it needs to be fixed lol

tough pike
gusty mantle
#

i think its my fault

#

probably did some magic with git

#

and paperweight kept putting my changes after fixupMinecraftSourcePatches to these patches

tough pike
#

Why are you using fixup?

gusty mantle
#

wdym

#

thats how you make per file patches

tough pike
#

I swear half of the contributing doc looks like it hasn't been updated thonk

#

Okay yeah, fixupMinecraftSourcePatches then rebuildMinecraftFilePatches

gusty mantle
#

ofc its different

#

but its easier to type

#

it requires less hand movement on the keyboard

fossil topaz
#

gradle doesn't care about a few missing letters

crude kernel
#

Even works for projects: :g:rDBS -> :games:runDevBundleServer

peak dove
#

Hey I'm trying to port my plugin from 1.21.1 to 1.21.4 but i got some troubles with my build.gradle, I don't know if its because theres no paperDevBundle for 1.21.4 or just that now there are mutliples files but it says
Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

The error seems to occur when i change this line paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT"), from 1.21.1 to 1.21.4
heres the dependencies of my gradle, does anyone know how to help me ?

repositories {
    mavenCentral()
    mavenLocal()
    maven { url = "https://repo.codemc.org/repository/maven-public/" }
    maven {
        name = 'papermc'
        url = 'https://repo.papermc.io/repo/repository/maven-public/'
    }
    maven { url 'https://mvn.lumine.io/repository/maven-public/' }
    maven { url "https://maven.enginehub.org/repo/" }
}

dependencies {
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")

    implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")

    compileOnly 'io.lumine:Mythic-Dist:5.6.1'
    compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT'
    implementation 'org.jetbrains:annotations:23.0.0'

    compileOnly "dev.jorel:commandapi-bukkit-core:9.5.3"
    compileOnly "dev.jorel:commandapi-annotations:9.5.3"
    annotationProcessor "dev.jorel:commandapi-annotations:9.5.3"

    compileOnly 'org.projectlombok:lombok:1.18.34'
    annotationProcessor 'org.projectlombok:lombok:1.18.34'
    testCompileOnly 'org.projectlombok:lombok:1.18.34'
    testAnnotationProcessor 'org.projectlombok:lombok:1.18.34'
}```
crude kernel
#

update gradle to 8.13 and paperweight to 2.0.0-beta.14

turbid moon
#

8.13 is out already? Wow time runs

crude kernel
#

it is yea

peak dove
#

Thanks ill try when i go home !

sharp trellis
#

hi, how can I add access transformers to my fork?

#

I created build-data/*fork name*.at file and it seems that ats should be applied (because when I make a typo in them, applyAllPatches task fails), but it seems that the constructor I want to access is still package-private even tho I make it public in my at

peak dove
# peak dove Hey I'm trying to port my plugin from 1.21.1 to 1.21.4 but i got some troubles w...

Okay so I tried lots of things that didnt work but changed some things
i went to try and follow the tutorial on paperDevbundle and got an error
with this line that it said to put in the settings.gradle the console says :

> Could not find method maven() for arguments [https://repo.papermc.io/repository/maven-public/] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.```


setting.gradle :
```GRADLE
pluginManagement {
    repositories {
        gradlePluginPortal()
        maven("https://repo.papermc.io/repository/maven-public/")
    }
}
rootProject.name = 'LVEPlugin'```

build.gradle :
```GRADLE
plugins {
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
}
dependencies {
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}

tasks.build {
    dependsOn(reobfJar)
}
compileJava.options.encoding = 'UTF-8'
```*
static urchin
#

Why is everything in your plugins block

#

in your build.gradle

peak dove
#

block ?

#

Oh just my bad xD

static urchin
#

like, why do you declare your dependencies inside the plugins { }

peak dove
#

Not im my build.gradle*

#

copied wrongly

static urchin
#

Well

#

in any case, you are using kotlin methods in gradle's groovy DSL

#

rename the files to settings.gradle.kts and build.gradle.kts respectively

peak dove
#

👍🏻

#

Okay so i don't have anymore errors with the settings.gradle doing that but it can't resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.1

static urchin
#

you need gradle 8.12 wrapper

peak dove
#

well i tried isntalling locally gradle 8.13 and changing my intellij's gradle to that but maybe it didnt worked

static urchin
#

Well, run ./gradlew build and post the error

echo kilnBOT
crude kernel
peak dove
#

x)

static urchin
peak dove
brave widgetBOT
crude kernel
#

8.5

static urchin
#

Welcome to Gradle 8.5!

crude kernel
#
./gradlew wrapper --gradle-version 8.13
./gradlew wrapper
static urchin
#

you will need to remove the paperweight plugin first ^

peak dove
#

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'LVEPlugin'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.14.```
peak dove
#

So i remove the paperwieght plugfin from my build.gradle then place it back ?

crude kernel
#

yea

static urchin
#

Yea

peak dove
#

Okay so it fixed lots of things thanks ! But still
can't resolve this line

tasks.build {
dependsOn(reobfJar)
}

e: file:///C:/Users/Utilisateur/Desktop/Test/LVEPlugin/build.gradle.kts:54:15: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val TaskContainer.reobfJar: TaskProvider<RemapJar> defined in org.gradle.kotlin.dsl