Paper 26.x support, update Gradle to 9.5.1, migrate deprecated APIs - #4262
Paper 26.x support, update Gradle to 9.5.1, migrate deprecated APIs#4262taranovegor wants to merge 5 commits into
Conversation
|
Awesome port! Lots of big changes around the codebase for gradle, but they are definitely necessary. Now that it uses official mappings + paperweight, I think the paper wrapper should work for most future versions, rarely needing changes. The forge builds requiring gradle 8 is a bit weird. I see an announcement on their forums about ForgeGradle 7.x which should work with gradle 9. I don't build or use forge plugins though, no experience there. Wonder if it's even worth fixing, with NeoForge replacing Forge for modern MC versions. |
|
Thanks! Keeping the Gradle 8 workaround for Forge for now is on purpose. I don't have a Forge setup to test the builds. It's probably worth opening a separate issue for the ForgeGradle 7.x migration, especially considering where NeoForge seems to be heading for newer MC versions. |
|
26.2 came out recently and I noticed your PR could also be compatible with it (and potentially some future versions). Currently, in I have tested this idea under Spigot and it seems to work. |
|
Good point. Now that it's on official mappings + paperweight the helper isn't pinned to one minor version, so widening to 26. makes sense, thanks for testing it on 26.2. I'll get it in next time I'm on this. The next major should make things clearer, and this same approach might well carry over. |
i compiled your fork and had to add this updated |
|
I'm unable to build this branch, getting this error: |
you need to compile the 26.x with JDK 25 |
|
I am, otherwise it would have failed earlier |
compile Paper and Spigot to local maven on your computer . Do gradlew tasks for commands ,edit settings.gradle for stuff you don't want . start with JDK21 then switch to JDK25 . you need to update the models+1.txt . or get the compiled jar above. |
|
zipped jar zipped checksum updated texture_1.txt |
i think those are lighting errors get this plugin https://github.com/bergerhealer/Light-Cleaner , /tp to the center of the affected region and run the command . |
|
then run a /radiusrender |
Thanks so much! It worked |
PR webbukkit#4262 was written against the 26.1.2 dev bundle, where LevelChunk.loaded was accessible. In 26.2 (build 112) the field is declared private and there is no public getter, so :paper-helper-26x:compileJava fails with "loaded has private access in LevelChunk". ServerLevel.getChunkIfLoaded() returns null unless the chunk is loaded, so the extra field check was already redundant. Drop it rather than reaching for reflection. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR webbukkit#4262 ships the 26.x helper but not the render data for new blocks, so a jar built from it renders 26.x additions as unknown. These are the models_1.txt / texture_1.txt posted alongside the working build in the PR thread by Tsoccerguy3, and match the jar currently verified running on Paper 26.2. Also carries upstream typo fixes: Vy=1,0 -> Vy=1.0, [1-14-] -> [1.14-], and bell data=8d -> data=8. Caveat: these files also drop some legacy version-gated entries ([-1.16.5] grass_path, [-1.20.2] grass, the pre-1.17 rail variant) and change leaves from transparency=LEAVES to TRANSPARENT without a version gate. That degrades rendering for pre-26 servers, which this fork does not target. Do not upstream as-is. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks for this — it's the only thing making Dynmap usable on 26.x right now. Two things I hit building it for a Paper 26.2 server, in case they're useful to you or anyone else building from this branch. 1. It doesn't compile against a 26.2 dev bundleBumping
LevelChunk c = cw.getHandle().getChunkIfLoaded(chunk.x, chunk.z);
if (c == null) {
return Optional.empty();
}Worth flagging that jars compiled against the 26.1.2 bundle still read that now-private field, so they may hit an 2. No render data for 26.x blocksA jar built from this branch alone has zero definitions for the new 26.x blocks — @Tsoccerguy3's The Build notesFor anyone stuck on "Unable to resolve a dev bundle": I didn't need BuildTools or a local Maven install. The I also didn't need the JDK 21 → 25 switch — JDK 25 still accepts Verified running on Paper 26.2 build 112 / Java 25: plugin enables, web UI serves, all worlds render, no access errors in the log. |
|
Thanks for the detailed writeup, @blackfist666. On point 1: agreed. I'll take care of it soon and verify the build against the current versions. On point 2: this PR was primarily focused on the build-side refactor for the new versions (Gradle 9, paperweight, the helper module itself), not on adding render data for new blocks, that's already covered by #4263. @reusteur73, once I push the fix above, could you merge/rebase those changes on your side? Also curious what you think about moving the |
Sure, I'll rebase on my side once you push the fix No problem for me moving Also I just noticed yesterday beds (any color) don't render on my map in 26.2 (Fabric). I'll look into it soon, might be better to wait a bit before merging until this gets fixed |


Adds paper-helper-26x, a new helper module for Paper 26.x with Mojang mappings, using SerializableChunkData for thread-safe chunk access.
Paper 26.x requires paperweight 2.x, which requires Gradle 9. To support this: