PolyhedralDev / Terra

Voxel world generation modding platform
MIT License
638 stars 83 forks source link

Updated Bukkit to 1.20.6 #458

Closed OakLoaf closed 2 months ago

OakLoaf commented 2 months ago

In this PR I have also set the Github gradle-build action to run on Java 21 as it is required by 1.20.6.

I am having some trouble getting the gradle dependencies to work so have been unable to test this at all.

OakLoaf commented 2 months ago

If anyone has any ideas as to why these dependencies aren't working that'd be really helpful:

A problem occurred configuring project ':platforms:bukkit:nms:v1_20_R6'.
> Failed to notify project evaluation listener.
   > Could not resolve all files for configuration ':platforms:bukkit:nms:v1_20_R6:paperweightDevelopmentBundle'.
      > Could not find io.papermc.paper:dev-bundle:1.20.6-R0.1-20240530.204353-104.
        Searched in the following locations:
          - https://repo.maven.apache.org/maven2/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://plugins.gradle.org/m2/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://maven.fabricmc.net/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://repo.codemc.org/repository/maven-public/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://papermc.io/repo/repository/maven-public/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://files.minecraftforge.net/maven/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://maven.quiltmc.org/repository/release/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://jitpack.io/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://s01.oss.sonatype.org/content/repositories/snapshots/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
          - https://repo.papermc.io/repository/maven-public/io/papermc/paper/dev-bundle/1.20.6-R0.1-SNAPSHOT/dev-bundle-1.20.6-R0.1-20240530.204353-104.pom
        Required by:
            project :platforms:bukkit:nms:v1_20_R6

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Arthurmeade12 commented 2 months ago

If you're not aware it looks like a lot of work has already been done on this branch here https://github.com/PolyhedralDev/Terra/commits/dev/1.20.6/

justaureus commented 2 months ago

If you're not aware it looks like a lot of work has already been done on this branch here https://github.com/PolyhedralDev/Terra/commits/dev/1.20.6/

Not really no, that's just the initial work required for 1.20.6. It's also only for Fabric not Paper.

OakLoaf commented 2 months ago

If you're not aware it looks like a lot of work has already been done on this branch here https://github.com/PolyhedralDev/Terra/commits/dev/1.20.6/

This is a pull request for that branch :)

IkyMax commented 2 months ago

Hey! This happens because in the paper repo is marked as

    `1.20.6-R0.1-20240530.204353-103`

But you're using

    `1.20.6-R0.1-20240530.204353-104`

this is in buildSrc/src/main/kotlin/Versions.kt, anyways, you should use the newest devbundle with

const val paperBuild = "$minecraft-R0.1-20240601.143523-105"

IkyMax commented 2 months ago

Forget what i Said LMAO

paperBuild and paperDevBundle are two separated repos and they're NOT synced in builds, so in order to use them both, you need to specify the versions for both! Use

    const val paperBuild = "$minecraft-R0.1-20240601.143523-106"

and this

    const val paperDevBundle = "$minecraft-R0.1-20240601.143523-105"

Anyways, this is actually weird. for some reason is asking for compiling in Java 17:

image

OakLoaf commented 2 months ago

Forget what i Said LMAO

paperBuild and paperDevBundle are two separated repos and they're NOT synced in builds, so in order to use them both, you need to specify the versions for both! Use

    const val paperBuild = "$minecraft-R0.1-20240601.143523-106"

and this

    const val paperDevBundle = "$minecraft-R0.1-20240601.143523-105"

Oooh ok, I'll give that a go!

IkyMax commented 2 months ago

Oooh ok, I'll give that a go!

Sure! also, check the java thing lol

OakLoaf commented 2 months ago

Yeahh I'll try to work out what's going on there

OakLoaf commented 2 months ago

Not having much luck with this one unfortunately. :platforms:bukkit:common:main: Could not resolve io.papermc.paper:paper-api:1.20.6-R0.1-20240601.143523-106.

IkyMax commented 2 months ago

weird, let me check your repo lol

OakLoaf commented 2 months ago

I'll commit my attempt real quick

IkyMax commented 2 months ago

Sorry, i was busy, but i find what you need to change the repo in DependencyConfig.kt and in build.gradle.kts from https://papermc.io/repo/repository/maven-public/ to https://repo.papermc.io/repository/maven-public/

Also you need to change the Java version to 21 in CompilationConfig.kt but this breaks fabric builds so idk

IkyMax commented 2 months ago

I did a bukkit build only with java version 21 and the Paper API error didn't happen but the NMS are totally broken, you also would need to migrate the bukkit API to the Bukkit long-standing API inside RegistryFetcher.java

OakLoaf commented 2 months ago

Sorry, i was busy, but i find what you need to change the repo in DependencyConfig.kt and in build.gradle.kts from https://papermc.io/repo/repository/maven-public/ to https://repo.papermc.io/repository/maven-public/

Also you need to change the Java version to 21 in CompilationConfig.kt but this breaks fabric builds so idk

Ahhh ok, didn't know about the dependency kotlin file, I'll give that one a go.

I'm not surprised that the NMS wasn't working, I've not been able to index so couldn't see any method names.

OakLoaf commented 2 months ago

I did a bukkit build only with java version 21 and the Paper API error didn't happen but the NMS are totally broken, you also would need to migrate the bukkit API to the Bukkit long-standing API inside RegistryFetcher.java

I'm confused, as I think this was done in my initial commit

Edit: It seems like the issee you were referring to was the issue in the Initializer interface. Resolving that at the moment

OakLoaf commented 2 months ago

I've tested this with the overworld pack on a 1.20.6 server, everything appears to be working as intended with no errors in console.

Aaron2550 commented 2 months ago

builds fine, runs overworld 2.0 fine but i do get some errors and warnings: https://files.catbox.moe/wdw1m4.txt

OakLoaf commented 2 months ago

builds fine, runs overworld 2.0 fine but i do get some errors and warnings: https://files.catbox.moe/wdw1m4.txt

Is this error from another pack? Based off of the error I would assume you need to change minecraft:skeleton to skeleton

Aaron2550 commented 2 months ago

its https://github.com/PolyhedralDev/TerraOverworldConfig/tree/2.0 and does not show up on 1.20.4 which is why i am mentioning this here

OakLoaf commented 2 months ago

its https://github.com/PolyhedralDev/TerraOverworldConfig/tree/2.0 and does not show up on 1.20.4 which is why i am mentioning this here

I've just tested on the latest modrinth release on a 1.20.4 server and the issue is still present.

Aaron2550 commented 2 months ago

no clue then, generated a 20kx20k world with chunky and didnt get it once

IkyMax commented 2 months ago

Hey! this is normal? lol

image

OakLoaf commented 2 months ago

Good spot, let me resolve this!

OakLoaf commented 2 months ago

That should be resolved in https://github.com/PolyhedralDev/Terra/pull/458/commits/9e60db4b0da03f59c7991a93659b9c4ea40f8362

OakLoaf commented 2 months ago

I've updated this pr for Bukkit 1.21, I'm unsure if this reflection here 4e7de50 is the best way to do this but it's the only thing I could personally see.

This is currently untested

TobyWarren commented 2 months ago

Doing a test build now. Will try and setup a server to test on.

TobyWarren commented 2 months ago

failure.txt Not sure if this is something on my end, but it still doesn't build.

IkyMax commented 2 months ago

failure.txt Not sure if this is something on my end, but it still doesn't build.

Have you builded the Spigot version only? this usually happens because you only ran gradle build instead of the specific platform build

TobyWarren commented 2 months ago

failure.txt Not sure if this is something on my end, but it still doesn't build.

Have you builded the Spigot version only? this usually happens because you only ran gradle build instead of the specific platform build

Whats the command for that again?

Aaron2550 commented 2 months ago

Built your branch and paper 1.21, heres the log: https://files.catbox.moe/si1g9m.log

OakLoaf commented 2 months ago

Built your branch and paper 1.21, heres the log: https://files.catbox.moe/si1g9m.log

Ahh, seems like cloud will need an update

Aaron2550 commented 2 months ago

There was one person who reported iit not even loading on spigot as of now

TobyWarren commented 2 months ago

Looks like there is an issue with Terra pulling version information on 1.21 Paper, have not tested Spigot. Log attached. latest.log

OakLoaf commented 2 months ago

Reverted 1.21 commits and moved them to https://github.com/PolyhedralDev/Terra/pull/461

Zahikusa commented 2 months ago

I really need your plugin for my new server :) Anything I can help with to get this running on paper for 1.20.6?

OakLoaf commented 2 months ago

It should run on 1.20.6 already if you compile it yourself

justaureus commented 2 months ago

These commits look good, tested this PR locally and all seems to be well. Thank you for your contributions!

Aaron2550 commented 2 months ago

1.20.6 test jar as of 500cf3c Terra-bukkit-6.5.0-BETA+500cf3c0b-shaded.zip