From 812519d14f08abd7b9a693e082ba0f65fa5b0a62 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Wed, 6 Dec 2023 13:45:12 -0700 Subject: [PATCH] Temp adventure update --- .gitmodules | 3 ++ adventure-temp | 1 + gradle.properties | 3 ++ patches/api/Temp-adventure-update.patch | 29 +++++++++++++++++++ .../HACK-id-string-codec-in-hover-event.patch | 21 -------------- settings.gradle.kts | 5 ++++ 6 files changed, 41 insertions(+), 21 deletions(-) create mode 160000 adventure-temp create mode 100644 patches/api/Temp-adventure-update.patch delete mode 100644 patches/server/HACK-id-string-codec-in-hover-event.patch diff --git a/.gitmodules b/.gitmodules index 7280fb743d..629d414712 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "work/Spigot"] path = work/Spigot url = https://hub.spigotmc.org/stash/scm/spigot/spigot.git +[submodule "adventure-temp"] + path = adventure-temp + url = https://github.com/KyoriPowered/adventure.git diff --git a/adventure-temp b/adventure-temp new file mode 160000 index 0000000000..6feacda2ee --- /dev/null +++ b/adventure-temp @@ -0,0 +1 @@ +Subproject commit 6feacda2eedef5edfb20e280540d00933861886e diff --git a/gradle.properties b/gradle.properties index 2b02b49f36..656dad40e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,9 @@ mcVersion=1.20.3 # Set to true while updating Minecraft version updatingMinecraft=false +# TODO remove with adventure included build +org.gradle.jvmargs=-Xmx1G + org.gradle.caching=true org.gradle.parallel=true org.gradle.vfs.watch=false diff --git a/patches/api/Temp-adventure-update.patch b/patches/api/Temp-adventure-update.patch new file mode 100644 index 0000000000..3ffcd59221 --- /dev/null +++ b/patches/api/Temp-adventure-update.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> +Date: Wed, 6 Dec 2023 13:38:10 -0700 +Subject: [PATCH] Temp adventure update + + +diff --git a/build.gradle.kts b/build.gradle.kts +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/build.gradle.kts ++++ b/build.gradle.kts +@@ -0,0 +0,0 @@ val apiAndDocs: Configuration by configurations.creating { + configurations.api { + extendsFrom(apiAndDocs) + } ++val extraRuntime: Configuration by configurations.creating ++configurations.runtimeClasspath { ++ extendsFrom(extraRuntime) ++} + + dependencies { + // api dependencies are listed transitively to API consumers +@@ -0,0 +0,0 @@ dependencies { + } + api("it.unimi.dsi:fastutil:8.5.6") + apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion")) ++ extraRuntime(platform("net.kyori:adventure-bom:4.15.0-SNAPSHOT")) + apiAndDocs("net.kyori:adventure-api") + apiAndDocs("net.kyori:adventure-text-minimessage") + apiAndDocs("net.kyori:adventure-text-serializer-gson") diff --git a/patches/server/HACK-id-string-codec-in-hover-event.patch b/patches/server/HACK-id-string-codec-in-hover-event.patch deleted file mode 100644 index 3b1951c7d8..0000000000 --- a/patches/server/HACK-id-string-codec-in-hover-event.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nassim Jahnke -Date: Wed, 6 Dec 2023 21:24:54 +0100 -Subject: [PATCH] HACK id string codec in hover event - -Temporary hack to remove serialization to the int array, since adventure has not been updated to deserialize this format - - -diff --git a/src/main/java/net/minecraft/network/chat/HoverEvent.java b/src/main/java/net/minecraft/network/chat/HoverEvent.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/network/chat/HoverEvent.java -+++ b/src/main/java/net/minecraft/network/chat/HoverEvent.java -@@ -0,0 +0,0 @@ public class HoverEvent { - public static final Codec CODEC = RecordCodecBuilder.create((instance) -> { - return instance.group(BuiltInRegistries.ENTITY_TYPE.byNameCodec().fieldOf("type").forGetter((content) -> { - return content.type; -- }), UUIDUtil.LENIENT_CODEC.fieldOf("id").forGetter((content) -> { -+ }), UUIDUtil.STRING_CODEC.fieldOf("id").forGetter((content) -> { - return content.id; - }), ExtraCodecs.strictOptionalField(ComponentSerialization.CODEC, "name").forGetter((content) -> { - return content.name; diff --git a/settings.gradle.kts b/settings.gradle.kts index f6aac1f56c..9d90b914d6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,6 +7,11 @@ pluginManagement { } } +// todo 1.20.3 +if (file("adventure-temp").exists()) { + includeBuild("adventure-temp") +} + plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0" }