changed mode switching to NBT from metadata