Write the network into nbt