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