3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-25 15:50:14 +01:00

Use Jitpack for Adventure to fix boolean string serialization

Fixes #2596
Dieser Commit ist enthalten in:
Camotoy 2021-10-29 10:59:59 -04:00
Ursprung a257211b01
Commit 362a21a4b1
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
2 geänderte Dateien mit 22 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -11,7 +11,7 @@
<artifactId>connector</artifactId>
<properties>
<adventure.version>4.9.2</adventure.version>
<adventure.version>3d6eaaf63f</adventure.version>
<fastutil.version>8.5.2</fastutil.version>
<jackson.version>2.12.4</jackson.version>
<netty.version>4.1.66.Final</netty.version>
@ -160,6 +160,10 @@
<groupId>com.github.steveice10</groupId>
<artifactId>mcauthlib</artifactId>
</exclusion>
<exclusion> <!-- TEMPORARY -->
<groupId>net.kyori</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@ -223,7 +227,20 @@
</dependency>
<!-- Adventure text serialization -->
<dependency>
<groupId>net.kyori</groupId>
<groupId>com.github.KyoriPowered.adventure</groupId>
<artifactId>adventure-text-serializer-gson</artifactId> <!-- TEMPORARY until https://github.com/KyoriPowered/adventure/commit/3d6eaaf63f44ddd981a4b3bbb1e0018aa6252da8 is in release -->
<version>${adventure.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.KyoriPowered.adventure</groupId>
<artifactId>adventure-text-serializer-gson-legacy-impl</artifactId> <!-- TEMPORARY until https://github.com/KyoriPowered/adventure/commit/3d6eaaf63f44ddd981a4b3bbb1e0018aa6252da8 is in release -->
<version>${adventure.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- <groupId>net.kyori</groupId>-->
<groupId>com.github.KyoriPowered.adventure</groupId>
<artifactId>adventure-text-serializer-legacy</artifactId>
<version>${adventure.version}</version>
<scope>compile</scope>

Datei anzeigen

@ -56,10 +56,10 @@ public class BasicItemTranslator extends NbtItemStackTranslator {
return;
}
ListTag loreTag = displayTag.get("Lore");
if (loreTag != null) {
Tag loreTag = displayTag.get("Lore");
if (loreTag instanceof ListTag listTag) {
List<Tag> lore = new ArrayList<>();
for (Tag tag : loreTag.getValue()) {
for (Tag tag : listTag.getValue()) {
if (!(tag instanceof StringTag)) continue;
lore.add(new StringTag("", MessageTranslator.convertMessageLenient(((StringTag) tag).getValue(), session.getLocale())));
}