Skip to content

Commit

Permalink
Fix Chat not being written to protocol for versions > 1.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
adepierre committed Apr 7, 2024
1 parent 8628179 commit 830d8e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions protocolCraft/include/protocolCraft/Types/Chat/Chat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string>(raw_text, container);
}
#else
NBT::Tag::WriteUnnamedImpl(container);
#endif
}

#if PROTOCOL_VERSION < 765 /* < 1.20.3 */
virtual Json::Value SerializeImpl() const override
Expand Down

0 comments on commit 830d8e9

Please sign in to comment.