1.6.5 multi-thread version