Changed metadata reading and writing into nbt