PolyhedralDev / Terra

Voxel world generation modding platform
MIT License
671 stars 88 forks source link

Updated Bukkit to 1.21/1.21.1 #461

Closed OakLoaf closed 2 months ago

OakLoaf commented 5 months ago

This pr is waiting on the Cloud Framework to fix incompatibilities. I'll run some proper tests once paper's experimental builds are slightly less crashy.

If a dev/1.21 branch could be made so I can redirect the pr towards that branch that would be great

OakLoaf commented 5 months ago

This is now functional - for anyone compiling this pr themselves please note that commands do not work currently.

bagdydad commented 5 months ago

Thank you for your help.

Aaron2550 commented 5 months ago

1.21 test jar as of e7cc27534 Terra-bukkit-6.5.0-BETA+e7cc27534-shaded.zip

OakLoaf commented 3 months ago

I've updated cloud to v2 - I haven't tested this quite yet and I am having some issues when reloading gradle (specifically regarding 'mixin-lifecycle' but I'm unsure if this was an previous issue or something I've caused.

Edit: I tested this - getting some odd class not found exceptions, if someone else could try building that'd be great

JerichoTorrent commented 3 months ago

I've updated cloud to v2 - I haven't tested this quite yet and I am having some issues when reloading gradle (specifically regarding 'mixin-lifecycle' but I'm unsure if this was an previous issue or something I've caused.

Edit: I tested this - getting some odd class not found exceptions, if someone else could try building that'd be great

I was able to successfully build this just for bukkit. Not sure if this helped but I did run ./gradlew dependencies first. Then I built it specifically for bukkit: ./gradlew :platforms:Bukkit:build

I didn't care to look through the stacktrace to see what went wrong, but I suspect it has to do with something fabric related. Testing the jar now, but if anyone wants to test it themsevles, it won't let me upload here so contact me on Discord: torrentstaff

OakLoaf commented 3 months ago

This is a build only for bukkit, I won't add fabric 1.21 support. If anyone is wanting to use a working build on 1.21 I'd use Aaron's build https://github.com/PolyhedralDev/Terra/pull/461#issuecomment-2185312911 until I've got Cloud v2 working

OakLoaf commented 3 months ago

If someone could test this version on 1.21.1 that'd be great as I have only done testing on 1.21

wiktor-jozwiak commented 3 months ago

If someone could test this version on 1.21.1 that'd be great as I have only done testing on 1.21


java.lang.ExceptionInInitializerError: null
    at Terra-bukkit-6.4.3-BETA+ab60f14ff-shaded.jar/com.dfsek.terra.bukkit.TerraBukkitPlugin.onEnable(TerraBukkitPlugin.java:68) ~[Terra-bukkit-6.4.3-BETA+ab60f14ff-shaded.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:640) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:589) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:293) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1215) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
    at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
    at Terra-bukkit-6.4.3-BETA+ab60f14ff-shaded.jar/com.dfsek.terra.bukkit.nms.Initializer.<clinit>(Initializer.java:11) ~[Terra-bukkit-6.4.3-BETA+ab60f14ff-shaded.jar:?]
    ... 11 more```
OakLoaf commented 3 months ago

If someone could test this version on 1.21.1 that'd be great as I have only done testing on 1.21

java.lang.ExceptionInInitializerError: null
  at Terra-bukkit-6.4.3-BETA+ab60f14ff-shaded.jar/com.dfsek.terra.bukkit.TerraBukkitPlugin.onEnable(TerraBukkitPlugin.java:68) ~[Terra-bukkit-6.4.3-BETA+ab60f14ff-shaded.jar:?]
  at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
  at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
  at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
  at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
  at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:640) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
  at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:589) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
  at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:293) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
  at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1215) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
  at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.1.jar:1.21.1-52-e08e667]
  at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
  at Terra-bukkit-6.4.3-BETA+ab60f14ff-shaded.jar/com.dfsek.terra.bukkit.nms.Initializer.<clinit>(Initializer.java:11) ~[Terra-bukkit-6.4.3-BETA+ab60f14ff-shaded.jar:?]
  ... 11 more```

Make sure you're building my PR as the version mentioned in your error is the latest commit from the Terra main branch

TobyWarren commented 2 months ago

@ReferTV That is not the correct branch. You've built the master not the 1.21.1 version.

wiktor-jozwiak commented 2 months ago

@ReferTV That is not the correct branch. You've built the master not the 1.21.1 version.

@TobyWarren I can't build this version:

Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Configure project :platforms:fabric
Architectury Loom: 1.6.395
This version of Architectury Loom is in beta! Please report any issues you encounter: https://github.com/architectury/architectury-loom/issues
Architect Plugin: 3.4.155
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

> Configure project :platforms:mixin-common
fabric-installer.json not found in dependencies!
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

> Configure project :platforms:mixin-lifecycle
fabric-installer.json not found in dependencies!
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':platforms:fabric:compileJava'.
> Could not resolve all task dependencies for configuration ':platforms:fabric:compileClasspath'.
   > Could not resolve project :common:implementation:base.
     Required by:
         project :platforms:fabric
      > No matching variant of project :common:implementation:base was found. The consumer was configured to find a library for use during compile-time, compatible with Java 17, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally but:
          - Variant 'apiElements' declares a library for use during compile-time, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 21 and the consumer needed a component, compatible with Java 17
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'mainSourceElements' declares a component, and its dependencies declared externally:
              - Incompatible because this component declares a component of category 'verification' and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its usage (required compile-time)
          - Variant 'runtimeElements' declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 21 and the consumer needed a component, compatible with Java 17
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'testResultsElementsForTest':
              - Incompatible because this component declares a component of category 'verification' and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its usage (required compile-time)

* Try:
> Review the variant matching algorithm at https://docs.gradle.org/8.7/userguide/variant_attributes.html#sec:abm_algorithm.
> No matching variant errors are explained in more detail at https://docs.gradle.org/8.7/userguide/variant_model.html#sub:variant-no-match.
> 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 16s
4 actionable tasks: 1 executed, 3 up-to-date
OakLoaf commented 2 months ago

@ReferTV That is not the correct branch. You've built the master not the 1.21.1 version.

@TobyWarren I can't build this version:

Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

> Configure project :platforms:fabric
Architectury Loom: 1.6.395
This version of Architectury Loom is in beta! Please report any issues you encounter: https://github.com/architectury/architectury-loom/issues
Architect Plugin: 3.4.155
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

> Configure project :platforms:mixin-common
fabric-installer.json not found in dependencies!
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

> Configure project :platforms:mixin-lifecycle
fabric-installer.json not found in dependencies!
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':platforms:fabric:compileJava'.
> Could not resolve all task dependencies for configuration ':platforms:fabric:compileClasspath'.
   > Could not resolve project :common:implementation:base.
     Required by:
         project :platforms:fabric
      > No matching variant of project :common:implementation:base was found. The consumer was configured to find a library for use during compile-time, compatible with Java 17, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally but:
          - Variant 'apiElements' declares a library for use during compile-time, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 21 and the consumer needed a component, compatible with Java 17
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'mainSourceElements' declares a component, and its dependencies declared externally:
              - Incompatible because this component declares a component of category 'verification' and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its usage (required compile-time)
          - Variant 'runtimeElements' declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 21 and the consumer needed a component, compatible with Java 17
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'testResultsElementsForTest':
              - Incompatible because this component declares a component of category 'verification' and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
                  - Doesn't say anything about its elements (required them preferably in the form of class files)
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
                  - Doesn't say anything about its target Java version (required compatibility with Java 17)
                  - Doesn't say anything about its usage (required compile-time)

* Try:
> Review the variant matching algorithm at https://docs.gradle.org/8.7/userguide/variant_attributes.html#sec:abm_algorithm.
> No matching variant errors are explained in more detail at https://docs.gradle.org/8.7/userguide/variant_model.html#sub:variant-no-match.
> 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 16s
4 actionable tasks: 1 executed, 3 up-to-date

This PR is Bukkit only follow the instructions on the README to build a single platform

TobyWarren commented 2 months ago

@ReferTV "./gradlew :platforms:bukkit:build"

PapiCapi commented 2 months ago

If someone could test this version on 1.21.1 that'd be great as I have only done testing on 1.21

Don't know if you still want feedback but i don't have any issue (so far) after upgrading to 1.21.1 with your PR. Thanks a lot ! :)