[Bukkit] Allow 1.21 Paper adapter to load on 1.21.1

This commit is contained in:
Madeline Miller 2024-08-09 22:55:17 +10:00
parent 350dfa107c
commit 3e6708a6f3
No known key found for this signature in database
GPG Key ID: B8EA2E5693115D81
3 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ jfrog-buildinfo = "org.jfrog.buildinfo:build-info-extractor-gradle:5.2.0"
fabric-mixin = "net.fabricmc:sponge-mixin:0.13.3+mixin.0.8.5"
paperweight = "io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.7.1"
paperweight = "io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.7.2"
linBus-bom = "org.enginehub.lin-bus:lin-bus-bom:0.1.0"
linBus-common.module = "org.enginehub.lin-bus:lin-bus-common"

View File

@ -6,5 +6,5 @@
dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21-R0.1-20240618.005323-5")
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21-R0.1-20240807.125219-129")
}

View File

@ -217,8 +217,8 @@ public PaperweightAdapter() throws NoSuchFieldException, NoSuchMethodException {
CraftServer.class.cast(Bukkit.getServer());
int dataVersion = CraftMagicNumbers.INSTANCE.getDataVersion();
if (dataVersion != 3953) {
throw new UnsupportedClassVersionError("Not 1.21!");
if (dataVersion != 3953 && dataVersion != 3955) {
throw new UnsupportedClassVersionError("Not 1.21(.1)!");
}
serverWorldsField = CraftServer.class.getDeclaredField("worlds");