From 830d8e99e8d14c1be4c1dda956e3dd2719b4365d Mon Sep 17 00:00:00 2001 From: adepierre <24371370+adepierre@users.noreply.github.com> Date: Sun, 7 Apr 2024 16:55:26 +0200 Subject: [PATCH] Fix Chat not being written to protocol for versions > 1.20.2 --- protocolCraft/include/protocolCraft/Types/Chat/Chat.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/protocolCraft/include/protocolCraft/Types/Chat/Chat.hpp b/protocolCraft/include/protocolCraft/Types/Chat/Chat.hpp index b09b069f..1a16b580 100644 --- a/protocolCraft/include/protocolCraft/Types/Chat/Chat.hpp +++ b/protocolCraft/include/protocolCraft/Types/Chat/Chat.hpp @@ -61,12 +61,14 @@ namespace ProtocolCraft } -#if PROTOCOL_VERSION < 765 /* < 1.20.3 */ virtual void WriteImpl(WriteContainer& container) const override { +#if PROTOCOL_VERSION < 765 /* < 1.20.3 */ WriteData(raw_text, container); - } +#else + NBT::Tag::WriteUnnamedImpl(container); #endif + } #if PROTOCOL_VERSION < 765 /* < 1.20.3 */ virtual Json::Value SerializeImpl() const override