protected override void EncodeImpl(sul.Utils.Buffer _buffer) { _buffer.WriteVaruint(Encoding.UTF8.GetByteCount(name)); _buffer.WriteString(name); _buffer.WriteVaruint(valuesIndexes.Length); foreach (ushort valuesIndexesChild in valuesIndexes) { _buffer.WriteLittleEndianUshort(valuesIndexesChild); } }
protected override void EncodeImpl(sul.Utils.Buffer _buffer) { _buffer.WriteVarint(id); if (id > 0) { _buffer.WriteVarint(metaAndCount); } if (id > 0) { _buffer.WriteLittleEndianUshort(nbt.Length); _buffer.WriteBytes(nbt); } }
protected override void EncodeImpl(sul.Utils.Buffer _buffer) { _buffer.WriteVarint(id); if (id > 0) { _buffer.WriteVarint(metaAndCount); } if (id > 0) { _buffer.WriteLittleEndianUshort(nbt.Length); _buffer.WriteBytes(nbt); } _buffer.WriteVaruint(canPlaceOn.Length); foreach (string canPlaceOnChild in canPlaceOn) { _buffer.WriteVaruint(Encoding.UTF8.GetByteCount(canPlaceOnChild)); _buffer.WriteString(canPlaceOnChild); } _buffer.WriteVaruint(canDestroy.Length); foreach (string canDestroyChild in canDestroy) { _buffer.WriteVaruint(Encoding.UTF8.GetByteCount(canDestroyChild)); _buffer.WriteString(canDestroyChild); } }
protected override void EncodeImpl(sul.Utils.Buffer _buffer) { _buffer.WriteVaruint(sections.Length); foreach (Section sectionsChild in sections) { sectionsChild.EncodeBody(_buffer); } foreach (ushort heightsChild in heights) { _buffer.WriteLittleEndianUshort(heightsChild); } foreach (byte biomesChild in biomes) { _buffer.WriteUbyte(biomesChild); } _buffer.WriteVaruint(borders.Length); _buffer.WriteBytes(borders); _buffer.WriteVaruint(extraData.Length); foreach (ExtraData extraDataChild in extraData) { extraDataChild.EncodeBody(_buffer); } _buffer.WriteBytes(blockEntities); }
protected override void EncodeImpl(sul.Utils.Buffer _buffer) { _buffer.WriteVaruint(key); _buffer.WriteLittleEndianUshort(@value); }