mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-21 12:07:38 +01:00
Check both namespaced and implicit key when replacing registries
This commit is contained in:
parent
ce0e01abec
commit
e9db3f040f
@ -68,7 +68,7 @@ import java.util.logging.Logger;
|
||||
|
||||
public interface ViaBackwardsPlatform {
|
||||
|
||||
String MINIMUM_VV_VERSION = "4.10.0";
|
||||
String MINIMUM_VV_VERSION = "4.10.1";
|
||||
|
||||
/**
|
||||
* Initialize ViaBackwards.
|
||||
|
@ -155,12 +155,7 @@ public final class EntityPackets1_19 extends EntityRewriter<ClientboundPackets1_
|
||||
tracker(wrapper.user()).setBiomesSent(biomes.size());
|
||||
|
||||
// Cache and remove chat types
|
||||
CompoundTag chatTypeRegistry = (CompoundTag) registry.remove("minecraft:chat_type");
|
||||
if (chatTypeRegistry == null) {
|
||||
chatTypeRegistry = (CompoundTag) registry.remove("chat_type");
|
||||
}
|
||||
|
||||
final ListTag<CompoundTag> chatTypes = chatTypeRegistry.getListTag("value", CompoundTag.class);
|
||||
final ListTag<CompoundTag> chatTypes = TagUtil.removeRegistryEntries(registry, "chat_type");
|
||||
for (final CompoundTag chatType : chatTypes) {
|
||||
final NumberTag idTag = chatType.getNumberTag("id");
|
||||
dimensionRegistryStorage.addChatType(idTag.asInt(), chatType);
|
||||
|
@ -81,6 +81,7 @@ public final class EntityPackets1_19_3 extends EntityRewriter<ClientboundPackets
|
||||
handler(wrapper -> {
|
||||
final ChatTypeStorage1_19_3 chatTypeStorage = wrapper.user().get(ChatTypeStorage1_19_3.class);
|
||||
chatTypeStorage.clear();
|
||||
|
||||
final CompoundTag registry = wrapper.get(Type.NAMED_COMPOUND_TAG, 0);
|
||||
final ListTag<CompoundTag> chatTypes = TagUtil.getRegistryEntries(registry, "chat_type");
|
||||
for (final CompoundTag chatType : chatTypes) {
|
||||
|
@ -103,7 +103,7 @@ public final class Protocol1_19To1_19_1 extends BackwardsProtocol<ClientboundPac
|
||||
chatTypeStorage.clear();
|
||||
|
||||
final CompoundTag registry = wrapper.get(Type.NAMED_COMPOUND_TAG, 0);
|
||||
final ListTag<CompoundTag> chatTypes = TagUtil.getRegistryEntries(registry, "chat_type");
|
||||
final ListTag<CompoundTag> chatTypes = TagUtil.removeRegistryEntries(registry, "chat_type");
|
||||
for (final CompoundTag chatType : chatTypes) {
|
||||
final NumberTag idTag = chatType.getNumberTag("id");
|
||||
chatTypeStorage.addChatType(idTag.asInt(), chatType);
|
||||
|
@ -3,7 +3,7 @@ metadata.format.version = "1.1"
|
||||
[versions]
|
||||
|
||||
# ViaVersion
|
||||
viaver = "4.10.0"
|
||||
viaver = "4.10.1-SNAPSHOT"
|
||||
|
||||
# Common provided
|
||||
netty = "4.0.20.Final"
|
||||
|
Loading…
Reference in New Issue
Block a user