mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-21 12:07:38 +01:00
Make chat_types handling in 1.19 protocols optional (#733)
This commit is contained in:
parent
9b8e65c59d
commit
99f6356230
@ -83,7 +83,7 @@ public final class EntityPackets1_19_3 extends EntityRewriter<ClientboundPackets
|
||||
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.getRegistryEntries(registry, "chat_type", new ListTag<>(CompoundTag.class));
|
||||
for (final CompoundTag chatType : chatTypes) {
|
||||
final NumberTag idTag = chatType.getNumberTag("id");
|
||||
chatTypeStorage.addChatType(idTag.asInt(), chatType);
|
||||
|
@ -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.removeRegistryEntries(registry, "chat_type");
|
||||
final ListTag<CompoundTag> chatTypes = TagUtil.removeRegistryEntries(registry, "chat_type", new ListTag<>(CompoundTag.class));
|
||||
for (final CompoundTag chatType : chatTypes) {
|
||||
final NumberTag idTag = chatType.getNumberTag("id");
|
||||
chatTypeStorage.addChatType(idTag.asInt(), chatType);
|
||||
|
Loading…
Reference in New Issue
Block a user