3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-09-29 06:30:16 +02:00

Hotfix registry and argument ser/de (#729)

* Hotfix argument parser missing

* Fix join game registry announcing.
Dieser Commit ist enthalten in:
Corey Shupe 2022-06-07 23:23:50 -04:00 committet von GitHub
Ursprung 28b6f6dcef
Commit c45597c885
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 15 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -273,7 +273,11 @@ public class JoinGame implements MinecraftPacket {
dimensionRegistryContainer = registryContainer.getCompound("minecraft:dimension_type") dimensionRegistryContainer = registryContainer.getCompound("minecraft:dimension_type")
.getList("value", BinaryTagTypes.COMPOUND); .getList("value", BinaryTagTypes.COMPOUND);
this.biomeRegistry = registryContainer.getCompound("minecraft:worldgen/biome"); this.biomeRegistry = registryContainer.getCompound("minecraft:worldgen/biome");
if (version.compareTo(ProtocolVersion.MINECRAFT_1_19) >= 0) {
this.chatTypeRegistry = registryContainer.getCompound("minecraft:chat_type"); this.chatTypeRegistry = registryContainer.getCompound("minecraft:chat_type");
} else {
this.chatTypeRegistry = CompoundBinaryTag.empty();
}
} else { } else {
dimensionRegistryContainer = registryContainer.getList("dimension", dimensionRegistryContainer = registryContainer.getList("dimension",
BinaryTagTypes.COMPOUND); BinaryTagTypes.COMPOUND);
@ -382,7 +386,9 @@ public class JoinGame implements MinecraftPacket {
dimensionRegistryEntry.put("value", encodedDimensionRegistry); dimensionRegistryEntry.put("value", encodedDimensionRegistry);
registryContainer.put("minecraft:dimension_type", dimensionRegistryEntry.build()); registryContainer.put("minecraft:dimension_type", dimensionRegistryEntry.build());
registryContainer.put("minecraft:worldgen/biome", biomeRegistry); registryContainer.put("minecraft:worldgen/biome", biomeRegistry);
if (version.compareTo(ProtocolVersion.MINECRAFT_1_19) >= 0) {
registryContainer.put("minecraft:chat_type", chatTypeRegistry); registryContainer.put("minecraft:chat_type", chatTypeRegistry);
}
} else { } else {
registryContainer.put("dimension", encodedDimensionRegistry); registryContainer.put("dimension", encodedDimensionRegistry);
} }

Datei anzeigen

@ -229,7 +229,11 @@ public class ArgumentPropertyRegistry {
register(id("minecraft:resource", mapSet(MINECRAFT_1_19, 44)), register(id("minecraft:resource", mapSet(MINECRAFT_1_19, 44)),
RegistryKeyArgument.class, RegistryKeyArgumentSerializer.REGISTRY); RegistryKeyArgument.class, RegistryKeyArgumentSerializer.REGISTRY);
empty(id("minecraft:uuid", mapSet(MINECRAFT_1_19, 45))); // added in 1.16 empty(id("minecraft:template_mirror", mapSet(MINECRAFT_1_19, 45))); // 1.19
empty(id("minecraft:template_rotation", mapSet(MINECRAFT_1_19, 46))); // 1.19
empty(id("minecraft:uuid", mapSet(MINECRAFT_1_19, 47))); // added in 1.16
// Crossstitch support // Crossstitch support
register(id("crossstitch:mod_argument", mapSet(MINECRAFT_1_19, -256)), ModArgumentProperty.class, MOD); register(id("crossstitch:mod_argument", mapSet(MINECRAFT_1_19, -256)), ModArgumentProperty.class, MOD);