Add WriteSubMessage helper
This commit is contained in:
parent
71f78fa89c
commit
b563f3ed45
|
@ -261,7 +261,7 @@ namespace Feather
|
|||
chunkData.Write<int32_t>(biomes[i]);
|
||||
|
||||
sections.Finalize();
|
||||
chunkData.WriteData(sections.GetData(), sections.GetDataSize());
|
||||
chunkData.WriteSubMessage(sections);
|
||||
|
||||
// Block Ents
|
||||
chunkData.WriteVarInt(0);
|
||||
|
|
|
@ -77,6 +77,11 @@ namespace Feather
|
|||
Write<int64_t>(pos.Encode());
|
||||
}
|
||||
|
||||
inline void WriteSubMessage(const NetworkMessage& message)
|
||||
{
|
||||
WriteData(message.GetData(), message.GetDataSize());
|
||||
}
|
||||
|
||||
inline void Finalize()
|
||||
{
|
||||
PrependVarIntSize();
|
||||
|
|
Loading…
Reference in New Issue